iclockhelper
Helper library to parse income request from IClock ADMS(like ZKTeco)
Install
pip install iclockhelper
Usage
from urllib.request import Request
from django.core.handlers.wsgi import WSGIRequest
from django.http import HttpResponse
import iclockhelper
# /iclock/cdata
def cdataView(request: WSGIRequest):
#get data from device
zk_request = create_request(request)
cdata_req = iclockhelper.CdataRequest.from_req(zk_request)
print(cdata_req)
return HttpResponse('OK')
# /iclock/fdata
def fdataView(request: WSGIRequest):
# not implemented
return HttpResponse('OK')
# /iclock/getreq
def getreqView(request: WSGIRequest):
zk_request = create_request(request)
get_req = iclockhelper.GetRequest.from_req(zk_request)
print(get_req)
return HttpResponse('OK')
# /iclock/devicecmd
def devpostView(request: WSGIRequest):
# not implemented
return HttpResponse('OK')
def create_request(req: WSGIRequest)->iclockhelper.Request:
return Request(
headers=req.headers,
method=req.method,
url=req.get_raw_uri(),
data=req.body,
)
Note
This project has been set up using PyScaffold 3.2.3. For details and usage information on PyScaffold see https://pyscaffold.org/.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
iclockhelper-0.0.4.tar.gz
(27.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iclockhelper-0.0.4.tar.gz.
File metadata
- Download URL: iclockhelper-0.0.4.tar.gz
- Upload date:
- Size: 27.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
462fcf19f55e9763c3bd57c222e887a863079b3320e4218d7e4e0fa3a6b5fdba
|
|
| MD5 |
e3726ea519016662f30c677fe3a7dee5
|
|
| BLAKE2b-256 |
6a6da72f98577510980d20d7c75899c5c9ca39299ffe7e14f34d4419210ea282
|
File details
Details for the file iclockhelper-0.0.4-py2.py3-none-any.whl.
File metadata
- Download URL: iclockhelper-0.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d029b9efcb97578780fd21f8039fbe9f92c02e82e2990f22480df37b6ee5b7a6
|
|
| MD5 |
fd0687a9db0730314f2786e496f7423a
|
|
| BLAKE2b-256 |
7f38b3d6a0f642a1bc11332a6f11458e4181039453c0e3c85b45848632efed0e
|