海康威视iSecure Center综合安防管理平台OpenAPI网关Artemis接口请求签名模块
Project description
Hikvision-OpenAPI-Signer: 海康威视iSecure Center综合安防管理平台OpenAPI网关Artemis接口请求签名Python模块
功能
对OpenAPI网关Artemis接口请求进行签名。
安装
pip install hikvision-openapi-signer
示例
- 使用requests作为HTTP客户端
>>> import requests
>>> from hikvision_openapi_signer import HikvisionOpenAPISigner
>>> signer = HikvisionOpenAPISigner("https://isc.example.com",
... 12345678, 'abcdefghijklmnopqrst', headers={'tagId': 0})
>>> method, url, headers, body = signer.sign('POST', '/api/resource/v1/org/advance/orgList',
... jsons={'pageNo': 1, 'pageSize': 1}, accept='application/json')
>>> response = requests.request(method, url, headers=headers, data=body)
>>> response.json()
{'code': '0', 'msg': 'success', 'data': ...}
- 使用HTTPX作为异步HTTP客户端
>>> import httpx
>>> from hikvision_openapi_signer import HikvisionOpenAPISigner
>>> client = httpx.AsyncClient()
>>> signer = HikvisionOpenAPISigner("https://isc.example.com",
... 12345678, 'abcdefghijklmnopqrst', headers={'tagId': 0})
>>> method, url, headers, body = signer.sign('POST', '/api/resource/v1/org/advance/orgList',
... jsons={'pageNo': 1, 'pageSize': 1}, accept='application/json')
>>> response = await client.request(method, url, headers=headers, content=body)
>>> response.json()
{'code': '0', 'msg': 'success', 'data': ...}
参考文档
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 hikvision_openapi_signer-1.0.0.tar.gz.
File metadata
- Download URL: hikvision_openapi_signer-1.0.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cee5eb32f79f12cb400efadce93b790f93843a40d18788de19de81aa2b7d867
|
|
| MD5 |
a8047d24ed65315781a1c1044d1479a0
|
|
| BLAKE2b-256 |
71999c1a8f3db7dfc0f4c7b06d5293a484dc5c48b493f3a2ca72c7f81dc4c939
|
Provenance
The following attestation bundles were made for hikvision_openapi_signer-1.0.0.tar.gz:
Publisher:
publish.yml on Accurio/Hikvision-OpenAPI-Signer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hikvision_openapi_signer-1.0.0.tar.gz -
Subject digest:
8cee5eb32f79f12cb400efadce93b790f93843a40d18788de19de81aa2b7d867 - Sigstore transparency entry: 205338387
- Sigstore integration time:
-
Permalink:
Accurio/Hikvision-OpenAPI-Signer@2d528ac963809c31ffb32aa223138b4afe136d75 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Accurio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2d528ac963809c31ffb32aa223138b4afe136d75 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hikvision_openapi_signer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: hikvision_openapi_signer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af457ee962d8f082c95f4b89df54b3e86fa0dfa58d356766eb8929051f0b0543
|
|
| MD5 |
eaa8c86740f84e7e5200040787e46703
|
|
| BLAKE2b-256 |
60742b3f5ae7f684be6851a6f6708231c3e9fa8a523a3bad421c46395b5f429c
|
Provenance
The following attestation bundles were made for hikvision_openapi_signer-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on Accurio/Hikvision-OpenAPI-Signer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hikvision_openapi_signer-1.0.0-py3-none-any.whl -
Subject digest:
af457ee962d8f082c95f4b89df54b3e86fa0dfa58d356766eb8929051f0b0543 - Sigstore transparency entry: 205338390
- Sigstore integration time:
-
Permalink:
Accurio/Hikvision-OpenAPI-Signer@2d528ac963809c31ffb32aa223138b4afe136d75 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Accurio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2d528ac963809c31ffb32aa223138b4afe136d75 -
Trigger Event:
push
-
Statement type: