Skip to main content

chives

chives is a collection of personal helper utilities for managing, validating, and maintaining local media archives.

I store my local media archives as static websites and use Python scripts to keep everything running smoothly. This package bundles the common, reusable code I share across multiple archives and sites.

Features

Here's what chives includes:

  • Media inspection and processing: get information like image dimensions and video duration, and convert subtitle files.
  • Metadata validation: ensure high-quality metadata by verifying that files in metadata actually exist on disk, and enforcing consistent timestamp formats.
  • Static site testing: pytest fixtures to check that static sites can be loaded without console or network errors.
  • HTTP and date utilities: standardised helpers for downloading web pages (for bookmarking/archiving) and handling common date patterns.

Design goals

My media archives are saved on my personal computer and I want them to last for years (ideally decades), which influences the design of this library:

  1. Human comprehensibility: I want to understand every line of code, so everything is written by hand. I understood it once, which gives me a decent chance of understanding it later.

  2. Minimal dependencies: I keep third-party dependencies to a minimum. This is to reduce my exposure to supply-chain attacks and reduce the risk of dependency rot.

  3. Rock-solid reliable: Everything is fully type-checked and throughly tested. I want this to be a reliable foundation for my media archive.

Versioning and stability

This library is monotonically versioned (releases simply go up sequentially).

I make breaking changes regularly, and I make no promise of compatibility between versions. When I make a breaking change, I update all my local media archives to the latest version immediately and fix the breakage at the same time.

I've made this repository public because it's convenient for my deployment and to contribute to the public corpus of open-source code for everybody to learn from, but expect things to shift around without warning.

Installation and usage

Because this is a personal utility library, I recommend you copy the code: duplicate the relevant functions and tests into your codebase (with a link back to this repo for attribution!). Having your own copy will protect you from disruption caused by my breaking changes.

If you really want the full package, you can install it from PyPI (but pin the version):

$ pip install alexwlchan-chives==42

For detailed usage instructions, check the docstrings inside the individual functions.

Development and feedback

Want to contribute or tweak something? Check out CONTRIBUTING.md for local setup instructions.

License

This project is shared under the MIT license.

Metadata

Release files for alexwlchan-chives 46

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

Source distribution (sdist)

Source distribution for alexwlchan-chives 46
File Size Uploaded Provenance Actions
alexwlchan_chives-46.tar.gz 30.3 kB Without provenance Details for alexwlchan_chives-46.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for alexwlchan-chives 46
File Interpreter ABI Platform Actions
alexwlchan_chives-46-py3-none-any.whl Python 3 none any Details for alexwlchan_chives-46-py3-none-any.whl

Total release size: 51.6 kB

Release files / alexwlchan_chives-46.tar.gz

Download URL alexwlchan_chives-46.tar.gz
Size 30.3 kB
Tags Source
SHA-256 checksum
How to use checksums
53a053079881bc4e60082c24652a598b2afb4f7da8101306f40d885d92abf861
BLAKE2b-256 checksum
How to use checksums
21389b0b10ddc28890f40e2b40662f5e401c2e486345d229b97c455836026324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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 / alexwlchan_chives-46-py3-none-any.whl

Download URL alexwlchan_chives-46-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f0f85781e1bd278f4cb60cb1b23f2b15d0dee5ce605f18bdf5314986d988bd0
BLAKE2b-256 checksum
How to use checksums
ccd3f01e621d99412cd443f216cd761c2995b21d193bd8bd15de47277bf78244
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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 alexwlchan-chives 46

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

46 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