Metadata-Version: 2.4
Name: Supysonic
Version: 0.8.0
Summary: Python implementation of the Subsonic server API
Author-email: Alban Féron <alban.feron@gmail.com>
License-Expression: AGPL-3.0-only
Project-URL: documentation, https://supysonic.readthedocs.io
Project-URL: source, https://github.com/spl0k/supysonic
Project-URL: issues, https://github.com/spl0k/supysonic/issues
Keywords: subsonic,music,server
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
Classifier: Framework :: Flask
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: System Administrators
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Multimedia :: Sound/Audio
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.1.3
Requires-Dist: flask>=2.3.0
Requires-Dist: flask-wtf>=1.2.1
Requires-Dist: peewee>=3.17.8
Requires-Dist: Pillow>=9.1.0
Requires-Dist: requests>=2.31.0
Requires-Dist: mediafile>=0.13.0
Requires-Dist: watchdog>=1.0.0
Requires-Dist: werkzeug>=2.3.0
Requires-Dist: zipstream-ng<2.0.0,>=1.1.0
Provides-Extra: test
Requires-Dist: coverage>=6.0; python_version >= "3.11" and extra == "test"
Requires-Dist: coverage[toml]>=6.0; python_version < "3.11" and extra == "test"
Requires-Dist: lxml>=4.6.4; extra == "test"
Provides-Extra: test-db
Requires-Dist: psycopg2-binary>=2.9.1; extra == "test-db"
Requires-Dist: pymysql>=1.0.0; extra == "test-db"
Dynamic: license-file

# Supysonic

Supysonic is a Python implementation of the [Subsonic][] server API.

![Build Status](https://github.com/spl0k/supysonic/workflows/Tests/badge.svg)
[![codecov](https://codecov.io/gh/spl0k/supysonic/branch/master/graph/badge.svg)](https://codecov.io/gh/spl0k/supysonic)
![Python](https://img.shields.io/badge/python-3.10+-blue.svg)

Current supported features are:
* browsing (by folders or tags)
* streaming of various audio file formats
* transcoding
* user or random playlists
* cover art
* starred tracks/albums and ratings
* [Last.fm][lastfm] scrobbling
* [ListenBrainz][listenbrainz] scrobbling
* Jukebox mode
* internet radio stations
* chat

Supysonic currently targets the version 1.12.0 of the Subsonic API. For more
details, go check the [API implementation status][docs-api].

[subsonic]: http://www.subsonic.org/
[lastfm]: https://www.last.fm/
[listenbrainz]: https://listenbrainz.org/
[docs-api]: https://supysonic.readthedocs.io/en/latest/api.html

## Documentation

Full documentation is available at https://supysonic.readthedocs.io/

## Quickstart

Use the following commands to install Supysonic, create an admin user, define a
library folder, scan it and start serving on port 5722 using [Gunicorn][].

    $ pip install supysonic
    $ pip install gunicorn
    $ supysonic-cli user add MyUserName
    $ supysonic-cli user setroles --admin MyUserName
    $ supysonic-cli folder add MyLibrary /home/username/Music
    $ supysonic-cli folder scan MyLibrary
    $ supysonic-server -h 0.0.0.0

You should now be able to enjoy your music with the client of your choice!

But using only the above commands will use a default configuration and
especially storing the database in a temporary directory. Head over to the
documentation for [full setup instructions][docs-setup], plus other options if
you don't want to use Gunicorn.

Note that there's also an optional [daemon][docs-daemon] that watches for
library changes and provides support for other features such as the
jukebox mode.

[gunicorn]: https://gunicorn.org/
[docs-setup]: https://supysonic.readthedocs.io/en/latest/setup/index.html
[docs-daemon]: https://supysonic.readthedocs.io/en/latest/setup/daemon.html

## Development stuff

For those wishing to collaborate on the project, since Supysonic uses [Flask][]
you can use its development server which provides automatic reloading and
in-browser debugging among other things. To start said server:

    $ export FLASK_APP="supysonic.web:create_application()"
    $ flask run --debug

And there's also the tests (which require `lxml` to run, installed with the
`test` extra):

    $ pip install -e ".[test]"
    $ python -m unittest

Tests are run against a temporary SQLite database, but can also be run on any
supported database (MySQL or PostgreSQL) by setting the `SUPYSONIC_TEST_DB_URI`
to a valid database URI. WARNING: the database must exist and be empty, and any
data will be cleared after the tests.

    $ pip install -e ".[test-db]"
    $ SUPYSONIC_TEST_DB_URI=mysql://test-user:test-password@test-host/test-database python -m unittest

[flask]: https://flask.palletsprojects.com/
