Add a short description here!
Project description
Helper library to parse income request from IClock ADMS(like ZKTeco)
Install
pip install iclockhelper
Usage
django example
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/.
Project details
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.1.tar.gz
(27.3 kB
view hashes)
Built Distribution
Close
Hashes for iclockhelper-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d2fee8367e2a3c03e519e078ee8bb66c16e21bfe7966c4fc2520f20a9c58191 |
|
MD5 | 8ed28a8c8cc39da961dab95d0427b98a |
|
BLAKE2b-256 | ec7c5f62e6c0ea2e812db635ec686d5ccb46cbf3e04cc7e4db1865df7a227aed |