Skip to content

Releases: ampache/python3-ampache

5.0.0

23 Aug 05:30
4f84f67
Compare
Choose a tag to compare

Ready for Ampache 5

A python3 library for interaction with your Ampache 5.x.x server using the XML & JSON API

  • Additional methods in this release match up with the current develop branch (soon to be Ampache 5.0.0)
  • Password auth is available instead of just API Keys
  • The structural changes to the lib do not support Ampache 4 and do not support old versions of the lib.
  • Version 4 will be maintained along with Ampache 4 until the end of PHP 7.4 support.

Changes in this release

There has been a pretty significant change in the library between Ampache 4 and Ampache 5.

For anyone wanting to stay on v4 the branch has been separated into it's own branch.

Once you connect with your passphrase or api key the url and auth token are stored for most methods allowing you to call methods without them.

Below is a quick example of the changes.

    import ampache
    import time

    # load up the lib
    ampacheConnection = ampache.API()

    # if using password auth use encrypt_password
    mytime = int(time.time())
    passphrase = ampacheConnection.encrypt_password('mypassword', mytime)
    auth = ampacheConnection.handshake('https://music.com.au', passphrase, 'my username', mytime)

    # if using an API key auth keep using encrypt_string
    passphrase = ampacheConnection.encrypt_string('my apikey', 'my username')
    auth = ampacheConnection.handshake('https://music.com.au', passphrase)

    # now you can call methods without having to keep putting in the url and userkey
    ampacheConnection.label(1677)
    
    # ping has always allowed empty calls so you have to ping with a url and session still
    ampacheConnection.ping('https://music.com.au', auth)

4.2.2

03 Sep 09:00
Compare
Choose a tag to compare

update with fixes from the 4.2.2 release

4.2.0

06 Aug 09:17
Compare
Choose a tag to compare

After a lot of testing JSON and XML are working well.
The library can/should be able to do anything API related that Ampache provides.

  • Follow Ampache release numbering.
  • Windows support for writing debug information
  • Example documentation is exactly what the API returns so is great for use as a reference.

1.0.4

11 Feb 12:57
Compare
Choose a tag to compare

JSON support and many changes to processes. new calls and methods as well.

Have a look at build_docs.py and run_tests.py to get an idea of whats changed and how to use these examples in live code.