A database companion to pianobar.
- Free Software: ISC License
Features
- TODO
Quickstart
You can install pianodb
with
pip install git+git://github.com/reillysiemens/pianodb.git@master
- TODO
Configuration
pianodb
uses a YAML configuration file which, by default, is located in
~/.config/pianobar/pianodb.yml
. A sample client configuration might look like
this:
---
client:
remote:
host: pianodb.example.tld
port: 8080
threshold: 10
token: CB80CB12CC0F41FC87CA6F2AC989E27E
If you just want to run pianodb
locally you may omit the remote
and token
mappings altogether and specify a database
mapping.
A sample server configuration might look like this:
---
server:
interface: 10.0.0.1
port: 8080
workers: 4
api_prefix: /api/v1
token: CB80CB12CC0F41FC87CA6F2AC989E27E
database: sqlite:////var/db/piano.db
Configuring Databases
Thanks to peewee pianodb
supports SQLite, MySQL, and PostgreSQL
backends. Technically peewee supports even more schemes, but
pianodb
limits its testing to the aforementioned three. Here are some example
database configuration schemes:
database: sqlite:////home/username/.config/pianobar/piano.db
# or
database: mysql://user:password@mysql.example.tld:3306/pianodb
# or
database: postgres://user:password@postgres.example.tld:5432/pianodb
Notice that the scheme component of the URI (sqlite://
, etc.) MUST be
present and in the case of SQLite specify an absolute path.
Credits
This package was created with help from Cookiecutter.