Skip to main content

No project description provided

Project description

Last.FM API Client

A partially complete Python wrapper for the Last.FM API that implements the functions that I need for my Album of the day website.

The wrapper uses pydantic models to parse responses which allows better type validation.

Implemented API methods

The following Last.FM API methods are implemented:

  • album.getInfo - get information about an album
  • artist.getInfo - get information about an artist
  • tag.getInfo - get information about a tag
  • user.getRecentTracks - retrieve scrobbles

Changelog:

  • v.0.2.5: Minor code quality changes. The module will also work with Pydantic versions that are not v2.x.x.

  • v0.2.4: Improved deserialization for multiple fields and cases where the album only has one tag. This change throws things around a little bit - you do not no longer have to check that items are singular or a list, the module will handle that for you.

    Breaking changes _ List fields will now always return a list. _ Multiple fields are now optional and may return None.

  • v0.2.3: Fixed a bug that crashed the deserialization if an album only had one tag, which made Last.FM return a dictionary rather than a list containing the tag.

  • v0.2.2: Fixed a bug related to the loading of album images.

    Breaking changes

    • The field Image.size is now optional and may return None.
  • v0.2.1: Fixed empty album text being converted to None.

  • v0.2.0: Better handling of unset/empty Last.FM values.

    Breaking changes:

    • The field Album.Tracks is now optional and may return None.
    • Same applies for all image fields.
    • v0.1.0: Initial release

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

last_fm_api_client-0.2.5.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

last_fm_api_client-0.2.5-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

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