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.4.0.tar.gz (24.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.4.0-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file ampache-4.4.0.tar.gz.

File metadata

  • Download URL: ampache-4.4.0.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for ampache-4.4.0.tar.gz
Algorithm Hash digest
SHA256 04986895fd7330112d00087478f0c01a04e9c895e12ebc54c6e5c7ab10537b72
MD5 2c5c4e2accb59ff4834bdfc07db5da27
BLAKE2b-256 01d70a1a265985a6161639ca76cddc3f7318b07337131094cd7f8012290db15c

See more details on using hashes here.

File details

Details for the file ampache-4.4.0-py3-none-any.whl.

File metadata

  • Download URL: ampache-4.4.0-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for ampache-4.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b58abb5fb9c497805a943a7bf7db90f29669fce2023a61cef3aca0efda8b7b2
MD5 9ee74446ec74b1151bcf1ccf2da588dc
BLAKE2b-256 8383e1b329329c09b53f1b5f6ef1fd5258f41b00e01219f75ba5ffe0b68cfa0c

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