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)
  • 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cang-2026.8.12.4.tar.gz (41.0 kB view details)

Uploaded Source

Built Distribution

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

cang-2026.8.12.4-py3-none-any.whl (50.2 kB view details)

Uploaded Python 3

File details

Details for the file cang-2026.8.12.4.tar.gz.

File metadata

  • Download URL: cang-2026.8.12.4.tar.gz
  • Upload date:
  • Size: 41.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

File hashes

Hashes for cang-2026.8.12.4.tar.gz
Algorithm Hash digest
SHA256 d762ad0facea970c30d132d92c6f52c51e627f50430856365cc283919475e1b0
MD5 aca568ab4b100ec65a43c035ae82d8ed
BLAKE2b-256 fc4faf3a19167f856d7fc8268c87081a9bc5ff9663d3e40f7536497da08faae2

See more details on using hashes here.

File details

Details for the file cang-2026.8.12.4-py3-none-any.whl.

File metadata

  • Download URL: cang-2026.8.12.4-py3-none-any.whl
  • Upload date:
  • Size: 50.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

File hashes

Hashes for cang-2026.8.12.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c0a9f19a241e7d8d2db256c4517c2d96b5a212c6ff0f29b57c891d599cc27425
MD5 556dd054d7b5006a7c2dcbd114e01537
BLAKE2b-256 68519ccc637eb84eb35af3ba46c2373e625f5ecaaeb0a6a959eda8c4efe2e39d

See more details on using hashes here.

Release history Release notifications | RSS feed

2026.9.6.1

2 files

2026.8.24.1

2 files

This release

2026.8.12.4 This release

2 files

2026.8.12.3

2 files

2026.8.12.2

2 files

2026.8.12

2 files

2026.8.4

2 files

2026.7.25

2 files

2026.7.24

2 files

2026.7.23

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.12

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

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