--- id: pylast version: "7.1.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # pylast — A Python interface to Last.fm and Libre.fm License: permissive · Maintenance: active · Downloads: 182.7K/mo ## What it is and what it does pylast is a Python wrapper around the Last.fm web API and compatible services like Libre.fm. It abstracts the HTTP layer and provides an object-oriented interface to query music metadata, manage user accounts, and submit scrobbles (track plays). The library handles authentication via API keys or session tokens, supports proxy configuration, and includes optional internal caching for repeated queries. The package is production-stable (Development Status 5) and actively maintained, with support for modern Python versions. It depends only on httpx2 for HTTP operations, making installation straightforward. Use it when you need programmatic access to Last.fm data—querying artist or track information, managing user libraries, or building music-tracking applications. Use it for: - Build a music recommendation tool that queries Last.fm for artist and track metadata to suggest similar music. - Create a scrobbler application that submits user listening history to Last.fm or Libre.fm automatically. - Analyze personal music listening patterns by fetching user play counts and tag data from Last.fm. - Integrate Last.fm data into a music player or library management application to enrich metadata. - Sync music listening history across multiple platforms by reading from and writing to Last.fm. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pylast provides a Python interface to Last.fm and API-compatible music networks like Libre.fm, enabling programmatic access to music data, scrobbling, and user account operations. Yes. pylast is a well-maintained, production-stable library with low install friction, no known vulnerabilities, and a permissive license. Install it if you need to interact with Last.fm or Libre.fm APIs; skip it if you only need local music metadata or don't require scrobbling or online music service integration. ## Install pip install pylast uv add pylast poetry add pylast ## Installing pylast Before you install: Low friction install with a single runtime dependency (httpx2). Active maintenance with a release 45 days ago and recent commits; supports current Python versions (3.10–3.15) on CPython and PyPy. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install pylast import pylast network = pylast.LastFMNetwork( api_key="your_api_key", api_secret="your_api_secret", username="username", password_hash=pylast.md5("password") ) track = network.get_track("Artist", "Track") track.love() Requires a Last.fm API key and secret obtained from https://www.last.fm/api/account/create; authentication also requires a Last.fm account. Verify before relying: - Whether httpx2 is a typo or intentional dependency name (httpx is the standard HTTP client library). - Performance characteristics and rate-limiting behavior when making many concurrent API calls. - Whether internal caching is suitable for production workloads or primarily for development. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 182.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags last.fm python api client, music scrobbling library, last.fm data access, libre.fm api wrapper, music listening history tracking, scrobble submission python, music metadata retrieval, music-api, scrobbling, last-fm [View on SkillFed](https://skillfed.io/packages/pylast) · [View on PyPI](https://pypi.org/project/pylast/)