Skip to main content

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/ by vendor_to_picard.py. After any change here, re-run:

    python contrib/python-musefs/vendor_to_picard.py
    

    The Picard test tests/test_vendor_sync.py fails 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


Download files

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

Source Distribution

python_musefs-0.0.1.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

python_musefs-0.0.1-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

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

Hashes for python_musefs-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ec65d06017eba090ee86aefbae7599319f9e6a1d51146047dc315083049dbae6
MD5 e89487de9002d96d35427eced9f2a875
BLAKE2b-256 bb71f84b4844e9be05493698837a018d59468f2859f49ff54a0375d6d41c4cdd

See more details on using hashes here.

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

Hashes for python_musefs-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d37875efd2c3a76737ec8232c59ad62fd7a7b5b057e4082a08c8a95400c86e7
MD5 38279394384992ea11b46694cec1d394
BLAKE2b-256 d73e2f02553581c77eda0f0dca61cf2f7c5c17109f78671c9dcb6b08a199b124

See more details on using hashes here.

Supported by

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