A Python client for fetching artist lyrical discographies.
Project description
Melodic
Melodic is a Python client for fetching artist lyrical discographies. This library provides an asynchronous interface to retrieve complete artist discographies, including album metadata and song lyrics, with built-in database storage, proxy support, and robust error handling.
Features
- Complete Discography Fetching: Retrieves full album and track listings for any given artist.
- Asynchronous Interface: Built with modern
async withpatterns for efficient, safe I/O operations. - Database Storage: Optional built-in storage system for organizing artist, album, and track metadata.
- Proxy Support: Easily pass a list of proxies to route requests through.
- Robust Error Handling: Comprehensive error handling and logging for reliable operation.
- Modern Development Tools: Includes ruff, mypy, pre-commit, and commitizen for high-quality code.
Installation
From PyPI (Recommended)
pip install melodic
From Source
You can install melodic by cloning the repository directly or using pre-built wheel files.
Prerequisites: This project requires uv for dependency management.
Option 1: Clone and Build
-
Clone the repository:
git clone https://github.com/filming/melodic.git cd melodic
-
Install the project and its dependencies:
uv sync
Option 2: Install from Pre-built Wheels
Pre-built wheel files are automatically generated and attached to each GitHub release. You can download and install them directly:
- Go to the GitHub releases page
- Download the
.whlfile from the latest release - Install using pip:
pip install path/to/downloaded/melodic-*.whl
Usage
Usage examples will be shown in the future.
Configuration
Configuration is passed directly to the Melodic class instance during initialization.
storage_dir: An optional string orPathobject pointing to a directory where the database and other files will be stored. If not provided, no data will be saved to disk.proxies: An optional list of proxy strings (e.g.,["http://user:pass@host:port"]). If provided, all network requests will be routed through these proxies.
Development
This project uses modern Python development tools:
- uv for dependency management
- ruff for linting and formatting
- mypy for type checking
- pre-commit for git hooks
- commitizen for conventional commits
Setting up for development:
-
Clone the repository:
git clone https://github.com/filming/melodic.git cd melodic
-
Install dependencies (including dev tools):
uv sync --extra dev
-
Set up pre-commit hooks:
uv run pre-commit install
-
Start developing!
Dependencies
All project dependencies are managed via pyproject.toml and use Python 3.10+.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request on GitHub.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file melodic-2.1.0.tar.gz.
File metadata
- Download URL: melodic-2.1.0.tar.gz
- Upload date:
- Size: 54.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee49ce8ca16c0464435c5511ed32e5e460ad076e72914fbdf801d5ba2843f6ca
|
|
| MD5 |
6801bcfd1cb92efda0bd4a88a139dcb3
|
|
| BLAKE2b-256 |
8d7515f7406c3fefa02314f9b0cc19fd4ae071e45012aecc2a434f7cf3bb21e0
|
Provenance
The following attestation bundles were made for melodic-2.1.0.tar.gz:
Publisher:
release.yml on filming/melodic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
melodic-2.1.0.tar.gz -
Subject digest:
ee49ce8ca16c0464435c5511ed32e5e460ad076e72914fbdf801d5ba2843f6ca - Sigstore transparency entry: 366508587
- Sigstore integration time:
-
Permalink:
filming/melodic@8fdf4f6d96ba394dfd3b19f645f5f646f76d6625 -
Branch / Tag:
refs/tags/v2.1.0 - Owner: https://github.com/filming
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8fdf4f6d96ba394dfd3b19f645f5f646f76d6625 -
Trigger Event:
push
-
Statement type:
File details
Details for the file melodic-2.1.0-py3-none-any.whl.
File metadata
- Download URL: melodic-2.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd999c730874c83427c0eb2f5035e0626b83a0f2e24f4dfede6bf21f09a77610
|
|
| MD5 |
bd10d2aa751681ab194744333fd93359
|
|
| BLAKE2b-256 |
13410e5b91352a09a57506ca37b87e6c33cf32f2f1a8ee6c1133c34f56ac54d8
|
Provenance
The following attestation bundles were made for melodic-2.1.0-py3-none-any.whl:
Publisher:
release.yml on filming/melodic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
melodic-2.1.0-py3-none-any.whl -
Subject digest:
fd999c730874c83427c0eb2f5035e0626b83a0f2e24f4dfede6bf21f09a77610 - Sigstore transparency entry: 366508604
- Sigstore integration time:
-
Permalink:
filming/melodic@8fdf4f6d96ba394dfd3b19f645f5f646f76d6625 -
Branch / Tag:
refs/tags/v2.1.0 - Owner: https://github.com/filming
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8fdf4f6d96ba394dfd3b19f645f5f646f76d6625 -
Trigger Event:
push
-
Statement type: