Skip to main content

OpenDahua

PyPI - Version GitHub License

Python SDK for interacting with Dahua NVRs (Network Video Recorders) over their proprietary peer-to-peer protocol.

Installation

You can install OpenDahua with your favorite python package manager!

pip install opendahua

or

uv add opendahua

Usage

import asyncio
from datetime import datetime, timedelta

from opendahua import DahuaNVR


async def main() -> None:
    async with DahuaNVR("SERIAL_NUMBER_HERE", "USERNAME_HERE", "PASSWORD_HERE") as nvr:
        all_video = await nvr.get_videos(
            channel=1,
            time_start=datetime.now() - timedelta(days=1),
        )
        
        for video in all_video:
            path = await nvr.download_video(video, "videos/")
            
            # Example: videos/ExampleNVR_ch1_20260601135935_20260601140002.dav
            print(f"Video path: {path}")
        
if __name__ == "__main__":
    asyncio.run(main())

Special thanks to

  • khoanguyen-3fc/dh-p2p: The reverse engineering work and proof-of-concept that make this project possible.

Metadata

Release files for OpenDahua 1.0.8

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

Source distribution (sdist)

Source distribution for OpenDahua 1.0.8
File Size Uploaded Provenance Actions
opendahua-1.0.8.tar.gz 28.1 kB Without provenance Details for opendahua-1.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for OpenDahua 1.0.8
File Interpreter ABI Platform Actions
opendahua-1.0.8-py3-none-any.whl Python 3 none any Details for opendahua-1.0.8-py3-none-any.whl

Total release size: 93.8 kB

Release files / opendahua-1.0.8.tar.gz

Download URL opendahua-1.0.8.tar.gz
Size 28.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6e921bbf571f544c3a21afdf1728a0b99cc25da00dd24c2a20f573b947bf4ad0
BLAKE2b-256 checksum
How to use checksums
547f375d836231b3dbec9a6924ee60189f647c38308fcb7a944cda5d074629f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / opendahua-1.0.8-py3-none-any.whl

Download URL opendahua-1.0.8-py3-none-any.whl
Size 65.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9b7f8b9bd59fcb64764f094231b0596c141b44166f8095bb34e0f101ec4241c
BLAKE2b-256 checksum
How to use checksums
726c7cace04ad24395f301ae13cd4aee53a7eccf4e3f84ce03c23730851fa19c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for OpenDahua 1.0.8

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