Shared musefs SQLite-store contract for the beets and Picard plugins
Project description
python-musefs
The shared store-contract library behind the beets,
Picard, and Lidarr musefs
plugins. It is the single source of truth for how a plugin writes the musefs
SQLite store: the schema-version check, the tags / art / track_art
writes, sha256 art content-addressing, the realpath_key path normalization,
the musefs scan shell-out (run_scan), and the per-file sync write-loop
(Record / sync_files).
Field mapping stays in each plugin — beets expands multi-valued
genres/composers into one tag each, Picard takes the first value — so this
library deliberately does not own it.
Consumers
-
beets depends on this package via pip (
contrib/beets/pyproject.toml). -
Picard cannot pip-install plugin dependencies, so the package is vendored into
contrib/picard/musefs/_common/byvendor_to_picard.py. After any change here, re-run:python contrib/python-musefs/vendor_to_picard.pyThe Picard test
tests/test_vendor_sync.pyfails if the committed copy drifts. -
Lidarr depends on this package via pip (
contrib/lidarr/pyproject.toml).
Schema coupling
musefs_common/schema.py (SCHEMA_SQL, USER_VERSION) is generated from
the Rust migrations in musefs-db/src/schema.rs — do not edit it by hand.
EXPECTED_USER_VERSION (in constants.py) derives from it. When the Rust
schema bumps, regenerate and re-vendor:
MUSEFS_REGEN_SCHEMA_PY=1 cargo test -p musefs-db schema_py
python contrib/python-musefs/vendor_to_picard.py
A musefs-db unit test fails if the generated file drifts. This is all
independent of the package's own __version__ (its release SemVer).
Tests
cd contrib/python-musefs
python -m venv .venv && source .venv/bin/activate
pip install -e ".[test]"
python -m pytest -v
ruff check . && ruff format --check .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_musefs-0.0.1.tar.gz.
File metadata
- Download URL: python_musefs-0.0.1.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec65d06017eba090ee86aefbae7599319f9e6a1d51146047dc315083049dbae6
|
|
| MD5 |
e89487de9002d96d35427eced9f2a875
|
|
| BLAKE2b-256 |
bb71f84b4844e9be05493698837a018d59468f2859f49ff54a0375d6d41c4cdd
|
File details
Details for the file python_musefs-0.0.1-py3-none-any.whl.
File metadata
- Download URL: python_musefs-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d37875efd2c3a76737ec8232c59ad62fd7a7b5b057e4082a08c8a95400c86e7
|
|
| MD5 |
38279394384992ea11b46694cec1d394
|
|
| BLAKE2b-256 |
d73e2f02553581c77eda0f0dca61cf2f7c5c17109f78671c9dcb6b08a199b124
|