Skip to main content

海康威视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': ...}

参考文档

综合安防管理平台(iSecure Center)文档

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

hikvision_openapi_signer-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hikvision_openapi_signer-1.0.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file hikvision_openapi_signer-1.0.0.tar.gz.

File metadata

File hashes

Hashes for hikvision_openapi_signer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8cee5eb32f79f12cb400efadce93b790f93843a40d18788de19de81aa2b7d867
MD5 a8047d24ed65315781a1c1044d1479a0
BLAKE2b-256 71999c1a8f3db7dfc0f4c7b06d5293a484dc5c48b493f3a2ca72c7f81dc4c939

See more details on using hashes here.

Provenance

The following attestation bundles were made for hikvision_openapi_signer-1.0.0.tar.gz:

Publisher: publish.yml on Accurio/Hikvision-OpenAPI-Signer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hikvision_openapi_signer-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hikvision_openapi_signer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af457ee962d8f082c95f4b89df54b3e86fa0dfa58d356766eb8929051f0b0543
MD5 eaa8c86740f84e7e5200040787e46703
BLAKE2b-256 60742b3f5ae7f684be6851a6f6708231c3e9fa8a523a3bad421c46395b5f429c

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page