drop2beets
A Beets plug-in that imports files as soon as they are dropped in a folder.
You can provide a function to set meta-data
or custom attributes depending on the sub-folder in which the file has been dropped.
The examples
folder contains some examples of on_item functions you may
adapt to your needs.
We use Beets' auto-tagger in quiet mode, and inotify to detect dropped files.
Get started
You'll need Python3 and an existing Beets library. Run:
pip install drop2beets
Enable and configure the plug-in by running beet config -e and set at least
one of default or singleton in dropbox_paths.
debounce_window defaults to 10, but we advise you set to at least 60 if you'd like to
import albums.
plugins: drop2beets
drop2beets:
debounce_window: 10 # Seconds to wait for file events to stop before importing.
dropbox_paths:
default: ~/beets-dropbox/albums
singleton: ~/beets-dropbox/singles
We advise you configure Beets to always move files out of the Dropbox,
and set quiet_fallback:
import:
move: yes
copy: no
quiet_fallback: asis
quiet_fallback tells Beets what to do when the auto-tagger is not sure about
the song's identifiaction.
Set it to skip to abort the importation in case of ambiguity,
or asis to import using tags as they are in the incoming file.
This will avoid surprises in case of ambiguous matches,
because this script invokes Beet's auto-tagger in quiet mode (as beet import -q)
after your custom function.
This function is on_item. It is written in Python,
and lets you set some tags depending of which sub-folder the file is dropped in.
If you want one, define it in the configuration from this template:
drop2beets:
on_item: |
def on_item(item, path):
"""
Parameters:
item: the beets Item that we're about to import
path: its sub-folders path in our dropbox ; if the items has been dropped at the root, then it's empty.
Returns:
A dict of custom attributes (according to path, maybe) ; return None if you don't want to import the file right now.
"""
return {}
Now you're ready to test by calling beet dropbox on the command line and
dropping a few files in the folder.
Note that drop2beets starts a few seconds after the last event it received about a file,
to ensure that the file has been copied or moved completely.
Hit Ctrl+C to close the script.
For a longer-term installation, configure a log file path
drop2beets:
log_path: ~/drop2beets/log.log
Linux users can install this as a user-lever systemd service by running beet install_dropbox
(in a shell where the virtual environment is activated).
Note that you'll have to restart the service when you update the on_item function.
Examples wanted !
I'd be happy to include your own variations of this script or the on_item function
in the examples folder,
feel free to post them in
Issues or
Pull Requests.
Metadata
Release files for drop2beets 3.0.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 | |
|---|---|---|---|
| drop2beets-3.0.0.tar.gz | 7.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| drop2beets-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.2 kB
Release files / drop2beets-3.0.0.tar.gz
| Download URL | drop2beets-3.0.0.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5ecff2c09efa5a5977dd16f19fbb2ff594ae038d4d6ded94fd10385acd98c5c
|
|
BLAKE2b-256 checksum How to use checksums |
cb608f4ab2566130ac11345ec9cce65779e0dc7b6f790d5f71d820c51e12a16c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 18, 2026.
Transparency logRelease files / drop2beets-3.0.0-py3-none-any.whl
| Download URL | drop2beets-3.0.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96d135b3c74e38addd519503d9c8e71d240e2b7fa2c9b52ad50a084942297238
|
|
BLAKE2b-256 checksum How to use checksums |
0760d89b9a05f8df787acf1907b88bbde35d6eb4bcefb949f00e2096564bfea5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 18, 2026.
Transparency log