Skip to main content

A Python library for interacting with Hikvision devices via ISAPI.

Project description

hikvision-isapi-utils

一个用于与海康威视 (Hikvision) 设备进行通信的 Python 库,支持同步和异步操作。

重要提示 (Important Notice)

本项目仅为技术交流与学习目的而创建。

  • API 文档来源: 海康威视 ISAPI 协议文档是海康威视公司的专有财产。所有开发者必须通过官方渠道 海康开放平台 申请并获取正式的 API 文档。
  • 法律风险: 任何通过非官方渠道(例如网络搜索到的直接链接)获取和使用 ISAPI 文档的行为,均可能构成对海康威视知识产权的侵犯。使用此类非官方文档所产生的一切风险和责任,由使用者自行承担。
  • 项目免责: 本项目作者及贡献者不提供任何官方支持,也不对因使用本库或非官方文档而导致的任何设备故障、数据丢失或法律纠纷负责。

安装

pip install hikvision-isapi-utils

快速开始

同步客户端

from hikvision_isapi_utils import Client

# 创建客户端
client = Client(
    ip="192.168.1.64",
    username="admin",
    password="your_password",
    protocol="http"
)

# 发送请求
response = client._request("GET", "/ISAPI/System/capabilities")
print(response.text)

# 关闭客户端
client.close()

异步客户端

import asyncio
from hikvision_isapi_utils import AsyncClient

async def main():
    async with AsyncClient(
        ip="192.168.1.64",
        username="admin",
        password="your_password",
        protocol="http"
    ) as client:
        response = await client._request("GET", "/ISAPI/System/capabilities")
        print(response.text)

# 运行异步函数
asyncio.run(main())

依赖

  • Python >= 3.8
  • requests
  • httpx

许可证

本项目采用 MIT 许可证。详情请见 LICENSE 文件。

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_isapi_utils-0.1.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

hikvision_isapi_utils-0.1.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file hikvision_isapi_utils-0.1.1.tar.gz.

File metadata

  • Download URL: hikvision_isapi_utils-0.1.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hikvision_isapi_utils-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dc82e793e06fc8695017725ee1c57fb5c178b23f3d42e7f9e6a1c2f700594573
MD5 d050e6ea10acebe8404961a3916901be
BLAKE2b-256 58a0a497c7053a164eeab0f11bcb5242638d7bf57ee0e1cdcb17e2505f46b8a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for hikvision_isapi_utils-0.1.1.tar.gz:

Publisher: python-publish.yml on sunbos/hikvision-isapi-utils

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_isapi_utils-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hikvision_isapi_utils-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5770103b78c67d283c418f34ce4a8f0a4c0724642680ae1c0f4e70d515fff0f
MD5 798e518c6669ad7e42287004cc9af6cc
BLAKE2b-256 42c4293a0c340396609e63054b599f4a1f9bd5ef33b4f2cdee05de4497785736

See more details on using hashes here.

Provenance

The following attestation bundles were made for hikvision_isapi_utils-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on sunbos/hikvision-isapi-utils

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