update README
This commit is contained in:
parent
685262fab8
commit
93f95e4a73
53
README.md
53
README.md
@ -1,6 +1,6 @@
|
|||||||
# pyzk
|
# pyzk
|
||||||
|
|
||||||
pyzk is unofficial library of zksoftware the fingerprint attendance machine.
|
pyzk is unofficial library of zksoftware the fingerprint attendance machine.
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
@ -44,33 +44,52 @@ try:
|
|||||||
print ' Password : {}'.format(user.password)
|
print ' Password : {}'.format(user.password)
|
||||||
print ' Group ID : {}'.format(user.group_id)
|
print ' Group ID : {}'.format(user.group_id)
|
||||||
print ' User ID : {}'.format(user.user_id)
|
print ' User ID : {}'.format(user.user_id)
|
||||||
|
|
||||||
# don't forget to re-enable device
|
|
||||||
zk.enable_device()
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print "Process terminate : {}".format(e)
|
print "Process terminate : {}".format(e)
|
||||||
finally:
|
finally:
|
||||||
if conn:
|
if conn:
|
||||||
|
# don't forget to re-enable device
|
||||||
zk.disconnect()
|
zk.disconnect()
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* Connect/Disconnect
|
||||||
|
|
||||||
|
```
|
||||||
|
zk.connect()
|
||||||
|
zk.disconnect()
|
||||||
|
```
|
||||||
|
|
||||||
|
* Disable/Enable Connected Device
|
||||||
|
|
||||||
|
```
|
||||||
|
zk.disable_device()
|
||||||
|
zk.enable_device()
|
||||||
|
```
|
||||||
|
|
||||||
* Ger Firmware Version
|
* Ger Firmware Version
|
||||||
|
|
||||||
```
|
```
|
||||||
zk.get_firmware_version()
|
zk.get_firmware_version()
|
||||||
```
|
```
|
||||||
|
|
||||||
* Create User
|
* User Operation
|
||||||
|
|
||||||
```
|
```
|
||||||
|
# Create user
|
||||||
zk.set_user(uid=1, name='Fanani M. Ihsan', privilege=const.USER_ADMIN, password='12345678', group_id='', user_id='123')
|
zk.set_user(uid=1, name='Fanani M. Ihsan', privilege=const.USER_ADMIN, password='12345678', group_id='', user_id='123')
|
||||||
```
|
# Get all users (will return list of User object)
|
||||||
|
|
||||||
* Get User
|
|
||||||
|
|
||||||
```
|
|
||||||
users = zk.get_users()
|
users = zk.get_users()
|
||||||
|
# Delete User
|
||||||
|
zk.delete_user(uid=1)
|
||||||
|
```
|
||||||
|
|
||||||
|
* Attendance Record
|
||||||
|
```
|
||||||
|
# Get attendances (will return list of Attendance object)
|
||||||
|
attendances = zk.get_attendance()
|
||||||
|
# Clear attendances record
|
||||||
|
zk.clear_attendance()
|
||||||
```
|
```
|
||||||
|
|
||||||
* Test voice
|
* Test voice
|
||||||
@ -79,25 +98,19 @@ users = zk.get_users()
|
|||||||
zk.test_voice()
|
zk.test_voice()
|
||||||
```
|
```
|
||||||
|
|
||||||
* Shutdown Device
|
* Device Maintenance
|
||||||
|
|
||||||
```
|
```
|
||||||
|
# shutdown connected device
|
||||||
zk.power_off()
|
zk.power_off()
|
||||||
```
|
# restart connected device
|
||||||
|
|
||||||
* Restart
|
|
||||||
|
|
||||||
```
|
|
||||||
zk.restart()
|
zk.restart()
|
||||||
```
|
```
|
||||||
|
|
||||||
# Todo
|
# Todo
|
||||||
|
|
||||||
* Create better documentation
|
* Create better documentation
|
||||||
* Clear user
|
|
||||||
* Finger template downloader & uploader
|
* Finger template downloader & uploader
|
||||||
* Get attendance record
|
|
||||||
* Clear attendance record
|
|
||||||
* HTTP Rest api
|
* HTTP Rest api
|
||||||
* Create real time api (if possible)
|
* Create real time api (if possible)
|
||||||
* and much more ...
|
* and much more ...
|
||||||
|
Loading…
Reference in New Issue
Block a user