beets-plex
Beets plugins to synchronize a music library with a Plex Media Server.
Beets and Plex index the same files on a shared mount, so matching is by exact file path — no fuzzy matching, no discovery. Two plugins ship in one package:
ratingtag— stores a rating in the beets database and in file tags.plex— targeted library scans on import/move/remove, two-way rating sync, a one-way pull of Plex play statistics, and one-way push of query-defined playlists and track collections.
Install
pip install beets-plex
Requires Python 3.10–3.14. Then enable and configure the plugins in your beets config — see Configuration.
For development, from a checkout:
pip install -e '.[test]'
Configuration
Enable the plugins and configure them under a shared plex: section in your
beets config. ratingtag needs no configuration for defaults; plex needs at
least a token and the library_name of your Plex music library.
plugins: ratingtag plex
plex:
# Connection
host: localhost # Plex server host
port: 32400 # Plex server port
token: "" # Plex auth token (required)
library_name: Music # name of the Plex music library section
secure: no # yes connects over https instead of http
# Path translation (beets and Plex see the same files on a shared mount)
beets_dir: "" # beets-side path prefix; defaults to beets' `directory`
plex_dir: "" # Plex-side path prefix; defaults to `beets_dir`
# Rating sync
rating_conflict: plex # who wins a genuine conflict: plex | beets | skip
# Playlists and collections (one-way, beets query -> Plex)
playlists: [] # list of {name, query} pushed as Plex playlists
collections: [] # list of {name, query} pushed as Plex collections
prune_empty: no # delete a playlist/collection whose query now matches nothing
# Auto-scan on import/move/remove
auto_scan: no # trigger targeted Plex scans from beets operations
scan_threshold: 100 # above this many touched directories, do one full refresh
beets_dir/plex_dir are the fixed prefixes that rewrite a beets file path to
its Plex-side path; leave them equal when beets and Plex mount the library at the
same path. playlists and collections each take a list of mappings, for
example:
plex:
playlists:
- name: Favourites
query: "rating:8..10"
collections:
- name: Recently Rated
query: "plex_lastratedat:-4w.."
Replacing plexupdate
plex.auto_scan replaces beets' built-in plexupdate plugin: instead of a full
library refresh, it triggers targeted scans of just the directories an import,
move, or remove touched. To use it, remove plexupdate from your plugins
line and set plex.auto_scan: yes — running both would scan twice.
Usage
beet plex status # connection, library size, match counts
beet plex stats [QUERY] # pull Plex play counts/timestamps into beets
beet plex sync [QUERY] # two-way rating sync
beet plex playlists [NAME ...] # push configured playlists (all, or the named ones)
beet plex collections [NAME ...] # push configured collections
Pass -p/--pretend to any subcommand to print what would change without
writing anything. With no subcommand, beet plex runs status.
Contributing
See CONTRIBUTING.md: small pull requests, each closing its
own issue; Conventional Commits; ruff and pytest green.
License
MIT — see LICENSE.
Metadata
Release files for beets-plex 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| beets_plex-0.1.0.tar.gz | 48.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| beets_plex-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.4 kB
Release files / beets_plex-0.1.0.tar.gz
| Download URL | beets_plex-0.1.0.tar.gz |
|---|---|
| Size | 48.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b215c67c343d48ba4c93ecc2523dc6be51140aa1ab936b622e3c528abba61a15
|
|
BLAKE2b-256 checksum How to use checksums |
b0bfc797a0b5ff85bf8d5d3ecef7ce26db5bb1900cfa6cdbb27a60bec07819db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.
Transparency logRelease files / beets_plex-0.1.0-py3-none-any.whl
| Download URL | beets_plex-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4f2b9b14933c7fc9475e56f843c5363408681aedb91df251b4437d64e941049
|
|
BLAKE2b-256 checksum How to use checksums |
fc52f23c3c89247b9909781c28f3c3e8f5c74b647fee2ad65976c0e2ce8dd1de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.
Transparency logSecurity for beets-plex 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for beets_plex-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.
Transparency logA 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.