Skip to main content

iclockhelper

Build Status

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/.

Metadata

Release files for iclockhelper 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iclockhelper 0.0.4
File Size Uploaded Provenance
iclockhelper-0.0.4.tar.gz 27.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for iclockhelper 0.0.4
File Interpreter ABI Platform
iclockhelper-0.0.4-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 35.7 kB

Release files / iclockhelper-0.0.4.tar.gz

Download URL iclockhelper-0.0.4.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
462fcf19f55e9763c3bd57c222e887a863079b3320e4218d7e4e0fa3a6b5fdba
BLAKE2b-256 checksum
How to use checksums
6a6da72f98577510980d20d7c75899c5c9ca39299ffe7e14f34d4419210ea282
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / iclockhelper-0.0.4-py2.py3-none-any.whl

Download URL iclockhelper-0.0.4-py2.py3-none-any.whl
Size 8.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d029b9efcb97578780fd21f8039fbe9f92c02e82e2990f22480df37b6ee5b7a6
BLAKE2b-256 checksum
How to use checksums
7f38b3d6a0f642a1bc11332a6f11458e4181039453c0e3c85b45848632efed0e
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for iclockhelper 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page