New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

iclockhelper

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iclockhelper

Helper library to parse income request from IClock ADMS(like ZKTeco)

  • 0.0.4
  • PyPI
  • Socket score

Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc