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.

Source Distribution

ampache-4.2.2.post1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ampache-4.2.2.post1-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file ampache-4.2.2.post1.tar.gz.

File metadata

  • Download URL: ampache-4.2.2.post1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for ampache-4.2.2.post1.tar.gz
Algorithm Hash digest
SHA256 a3bc609fb39a7f0aa7ed89b8e3427be3f7ee56b12a3b2fa3162664cccfea2276
MD5 237406f02101f48bd5ab855b6041a066
BLAKE2b-256 f5d25a1f5802c072800e5f50b7d1411750708254cf05688e3f473ea82cb4986c

See more details on using hashes here.

File details

Details for the file ampache-4.2.2.post1-py3-none-any.whl.

File metadata

  • Download URL: ampache-4.2.2.post1-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for ampache-4.2.2.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c0890a1f95b31a2945b5686269e9ee26fe4e3110b30ad5ae01ce86715f914ec
MD5 57ef6014f8b895ef5d8c42eb77f05afc
BLAKE2b-256 6305bb1740ed99c0624200edabb1ad071286281e66b3feea09b08cdb54c9577d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page