Skip to main content

PyPI version

Beets REST API Plugin

This is a plugin for the music management tool beets.
This plugin provides a simple REST API for your music library.

The API is similar to the API provided by the official beets web plugin. In contrast to the web plugin this plugin does not provide a web interface though. With this plugin I addressed some issues in the official web plugin's api that made it unusable for me.

API

The table below shows all interfaces currently provided by the API:

Method Path Description Parameters Response Type
GET /items Get a list of all items matching a certain query query:
A beets query
application/json
GET /item/{itemId}/file Download the audio file for an item - application/octet-stream
GET /item/{itemId}/art Download the cover art for an item. size (optional):
If provided returns the image
with a resolution of size x size
image/jpeg

Setup

Install the plugin

pip install beets-rest-api  

Configure the plugin

Edit your beets configuration file and add the following section:

restapi:
    host: 0.0.0.0   # The IP address the web server should bind to
    port: 8338      # The port the web server should bind to

Also add restapi to the plugins section.

Run the plugin

You can start the plugin by running:

beet restapi

This will start a web server and block the command execution. If you want to run it in the background you can run it this way instead:

beet restapi &>/dev/null &    # Unix

If the web server should always run you can add this code to a script file and add it to the autostart (Windows), crontab (Unix) or any other way of running a script on system startup.

Release files for beets-rest-api 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beets-rest-api 0.2.3
File Size Uploaded
beets-rest-api-0.2.3.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for beets-rest-api 0.2.3
File Interpreter ABI Platform
beets_rest_api-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / beets-rest-api-0.2.3.tar.gz

Download URL beets-rest-api-0.2.3.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7e81bb41800078bd49d4d27daad99cb0aa630d4075fcc80ea5a92bd4c3ef2598
BLAKE2b-256 checksum
How to use checksums
e14f9002938247a8a4df844bfc4f59d2bc54d6d847a952ef0e5d21e6314e5fdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

Release files / beets_rest_api-0.2.3-py3-none-any.whl

Download URL beets_rest_api-0.2.3-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22bd20a5bcdf791d9e2f70e88edfda7e87d5d4093d563c43ffd63222cf4f2d3a
BLAKE2b-256 checksum
How to use checksums
ea89d879eafb94d6b5789ff6393df006050988240218595ad33c18d036c8c98d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page