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.

Download files

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

Source Distribution

alexwlchan_chives-45.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

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

alexwlchan_chives-45-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file alexwlchan_chives-45.tar.gz.

File metadata

  • Download URL: alexwlchan_chives-45.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for alexwlchan_chives-45.tar.gz
Algorithm Hash digest
SHA256 ae21418f6789628e42889eb229a5c41f349cac2f7fede8f20e291196af33504b
MD5 16b27433f05f5f15bd51b1b5c01efe25
BLAKE2b-256 fdaff787136dead9c1937993d08302429001caaebbb272b7e68977cd47367f28

See more details on using hashes here.

File details

Details for the file alexwlchan_chives-45-py3-none-any.whl.

File metadata

  • Download URL: alexwlchan_chives-45-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for alexwlchan_chives-45-py3-none-any.whl
Algorithm Hash digest
SHA256 e9fe289b6b85c61b0dbc5cafee1b291a27919b8e143e1978fe12c81cb5a4de1a
MD5 82d6cb915d495e05a97e66c3630e146f
BLAKE2b-256 b7f6f4e87761396c58f39459b5617379e3d2102f4be8297be1fd65e6f4a62390

See more details on using hashes here.

Release history Release notifications | RSS feed

52

2 files

51

2 files

50

2 files

49

2 files

48

2 files

47

2 files

46

2 files

This release

45 This release

2 files

44

2 files

43

2 files

42

2 files

41

2 files

40

2 files

39

2 files

38

2 files

37

2 files

36

2 files

35

2 files

34

2 files

33

2 files

32

2 files

31

2 files

30

2 files

29

2 files

28

2 files

27

2 files

26

2 files

25

2 files

24

2 files

23

2 files

22

2 files

21

2 files

20

2 files

19

2 files

18

2 files

17

2 files

16

2 files

15

2 files

14

2 files

13

2 files

12

2 files

11

2 files

10

2 files

9

2 files

8

2 files

7

2 files

6

2 files

5

2 files

4

2 files

3

2 files

2

2 files

1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page