Skip to main content

cang

Cang (藏) — Snapshot Archiver for IP Cameras

Licence: AGPL-3.0-or-later Status: Late beta Python 3.12+ Documentation Forgejo CI pepy downloads gitleaks pysentry ty complexipy

Cang (藏, cáng, roughly "tsang" with a rising tone) — Chinese for "to store / to archive". Secondary meaning: "hidden", quietly apt for security footage. The name reflects the project's philosophy: cameras do all the clever work; Cang just keeps what they send.

A lightweight snapshot archiver for IP cameras. Cameras handle motion detection and object recognition themselves, deposit snapshot images into watched folders, and Cang indexes, groups, and serves them through a clean FastAPI web UI.

Cang is split into two processes:

  • cangcang — the ingest daemon that scans camera directories, indexes snapshots into SQLite, and handles retention cleanup. No network surface.
  • cangjian — the FastAPI web server that serves the calendar browse, snapshot scrubber, and live views.

Both share one SQLite database and snapshot store. The split prevents web UI hangs during periodic camera scans.

Inspired by LazyNVR, written in Python.

What it does

  • Watches camera directories for snapshot JPEGs deposited by cameras
  • Ingests all snapshots into SQLite with motion-event metadata
  • Groups consecutive motion snapshots into events using a configurable time-gap threshold (60 s), and chains per-camera events into cross-camera journeys presented as one card, played in the snapshot scrubber
  • Applies tiered retention: motion snapshots (default 30 days), background snapshots (14 days) — both configurable
  • Serves a FastAPI + Jinja2 web UI with a scrubber for browsing snapshots by day and camera
  • Runs as two processes — cangcang (ingest daemon) + cangjian (web server) — or in a container pod

What it does not do

  • No RTSP / live-stream pulling
  • No video clip processing or storage
  • No multi-user roles or cloud sync

Status

Late beta — core functionality (Dahua adapter, snapshot ingestion, event grouping, tiered retention, web UI) is working. See the documentation for installation and configuration.

Licence

Copyright (C) 2026 Marvin8

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

See LICENCE for the full text.

Metadata

Release files for cang 2026.9.7.1

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

Source distribution (sdist)

Source distribution for cang 2026.9.7.1
File Size Uploaded Provenance
cang-2026.9.7.1.tar.gz 45.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cang 2026.9.7.1
File Interpreter ABI Platform
cang-2026.9.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 100.0 kB

Release files / cang-2026.9.7.1.tar.gz

Download URL cang-2026.9.7.1.tar.gz
Size 45.2 kB
Tags Source
SHA-256 checksum
How to use checksums
312ca0fd96e3d2951731d7634384973780d9fe2cc66231080d628a5fc28132a3
BLAKE2b-256 checksum
How to use checksums
7f69f519bede1b660b00329c655520b6a119f4b3d2f005c47389b990e83d2bbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cang-2026.9.7.1-py3-none-any.whl

Download URL cang-2026.9.7.1-py3-none-any.whl
Size 54.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff64f204b8600c819af05a3b925e60d01bd9b6d0b187f09236bf665fe32f4b47
BLAKE2b-256 checksum
How to use checksums
c66119386d0dd4ac6b49b0375bec3008e6f87a5b49a0172c4798175c5da16dfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for cang 2026.9.7.1

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.

Release history Release notifications | RSS feed

This release

2026.9.7.1 This release

2 release files No provenance

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