Skip to main content

A Python client for fetching artist lyrical discographies.

Project description

Melodic

PyPI PyPI - Python Version License

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 with patterns 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

  1. Clone the repository:

    git clone https://github.com/filming/melodic.git
    cd melodic
    
  2. 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:

  1. Go to the GitHub releases page
  2. Download the .whl file from the latest release
  3. 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 or Path object 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:

Setting up for development:

  1. Clone the repository:

    git clone https://github.com/filming/melodic.git
    cd melodic
    
  2. Install dependencies (including dev tools):

    uv sync --extra dev
    
  3. Set up pre-commit hooks:

    uv run pre-commit install
    
  4. 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

melodic-2.1.0.tar.gz (54.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

melodic-2.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

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

Hashes for melodic-2.1.0.tar.gz
Algorithm Hash digest
SHA256 ee49ce8ca16c0464435c5511ed32e5e460ad076e72914fbdf801d5ba2843f6ca
MD5 6801bcfd1cb92efda0bd4a88a139dcb3
BLAKE2b-256 8d7515f7406c3fefa02314f9b0cc19fd4ae071e45012aecc2a434f7cf3bb21e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for melodic-2.1.0.tar.gz:

Publisher: release.yml on filming/melodic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for melodic-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd999c730874c83427c0eb2f5035e0626b83a0f2e24f4dfede6bf21f09a77610
MD5 bd10d2aa751681ab194744333fd93359
BLAKE2b-256 13410e5b91352a09a57506ca37b87e6c33cf32f2f1a8ee6c1133c34f56ac54d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for melodic-2.1.0-py3-none-any.whl:

Publisher: release.yml on filming/melodic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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