Skip to main content

Python library for Amapche XML-API

Project description

AMPACHE LIBRARY FOR PYTHON3

Upload to PyPI
https://github.com/ampache/python3-ampache/workflows/Upload%20Python%20Package/badge.svg

INFO

A python3 library for interaction with your Ampache server using the XML API https://github.com/ampache/ampache/wiki/API

If you run a develop server you now have access to JSON as well!

Code examples and scripts are available from github

INSTALL

You can now install from pip directly:

pip3 install -U ampache

EXAMPLES

Practical example:

import time
import ampache

# user variables
ampache_url = 'https://music.server'
my_api_key  = 'mysuperapikey'
user        = 'myusername'

# processed details
encrypted_key = ampache.encrypt_string(my_api_key, user)
ampache_api   = ampache.handshake(ampache_url, encrypted_key)

if ampache_api:
    # Scrobble a music track to your ampache server
    Process(target=ampache.scrobble,
            args=(ampache_url, ampache_api, 'Hear.Life.Spoken', 'Sub Atari Knives', 'Unearthed',
            '', '', int(time.time()))).start()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ampache, version 4.2.2.post1
Filename, size File type Python version Upload date Hashes
Filename, size ampache-4.2.2.post1-py3-none-any.whl (23.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ampache-4.2.2.post1.tar.gz (11.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page