Skip to main content

A simple Python package to interact with various music platforms APIs.

Project description

yutipy

GitHub Actions Workflow Status Documentation Status PyPI License Stars Issues

Looking for an easy-to-use API or GUI to search for music, instead of using the CLI or building your own integration? Check out yutify — it’s powered by yutipy!

A simple Python package to interact with various music platforms APIs.

Table of Contents

Features

  • Simple & Easy integration with popular music APIs.
  • Search for music by artist and song title across multiple platforms.
  • Async support for Deezer, iTunes, KKBOX, Spotify, and YouTube Music.
  • Authorize and access user resources easily.

Available Music Platforms

Right now, the following music platforms are available in yutipy for searching music. New platforms will be added in the future. Feel free to request any music platform you would like me to add by opening an issue on GitHub or by emailing me.

Installation

You can install the package using pip. Make sure you have Python 3.10 or higher installed.

pip install -U yutipy

Usage Example

Here's a quick example of how to use the yutipy package to search for a song on Deezer:

from yutipy.deezer import Deezer

with Deezer() as deezer:
    result = deezer.search("Artist Name", "Song Title")
    print(result)

For asynchronous usage, you can use the matching async service class from the yutipy.async_* modules. For example:

import asyncio
from yutipy.async_deezer import AsyncDeezer

async def main():
    async with AsyncDeezer() as deezer:
        result = await deezer.search("Artist Name", "Song Title")
        print(result)

asyncio.run(main())

For more usage examples, see the Usage Examples page in docs.

Command-Line Interface (CLI)

The yutipy package includes a CLI tool that allows you to search for music directly from the command line and configure API keys interactively.

Search for Music

You can use the CLI tool to search for music across multiple platforms:

yutipy-cli --artist "Rick Astley" --song "Never Gonna Give You Up" --service spotify

Options:

  • artist (required): The name of the artist.
  • song (required): The title of the song.
  • --service (required): Specify a single service to search (e.g., deezer, spotify, itunes).
  • --limit: The number of results to retrieve (default: 5).
  • --verbose: Enable logging in the terminal.
  • --version: Show installed yutipy version and exit.

Configuration Wizard

To set up your API keys interactively, use the configuration wizard:

yutipy-config

The wizard will guide you through obtaining and setting up API keys for supported services like Spotify and KKBOX. If the required environment variables are already set, the wizard will skip those steps.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Optionally, create an issue to discuss the changes you plan to make.
  3. Create a new branch linked to that issue.
  4. Make your changes in the new branch.
  5. Write tests if you add new functionality.
  6. Ensure all tests pass before opening a pull request.
  7. Open a pull request for review.

Thank you for your contributions!

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

yutipy-5.3.3.tar.gz (111.2 kB view details)

Uploaded Source

Built Distribution

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

yutipy-5.3.3-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

Details for the file yutipy-5.3.3.tar.gz.

File metadata

  • Download URL: yutipy-5.3.3.tar.gz
  • Upload date:
  • Size: 111.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for yutipy-5.3.3.tar.gz
Algorithm Hash digest
SHA256 837d39f4026ed09ba4054189debbe8225309baf2aa32b50a29af244434d072f5
MD5 ac11d831f995cdba83522601a104f3ba
BLAKE2b-256 23dbe175325b86154fd80669e4c5c1487957ba6958971be786445e7d5b7d5ff1

See more details on using hashes here.

Provenance

The following attestation bundles were made for yutipy-5.3.3.tar.gz:

Publisher: release.yml on CheapNightbot/yutipy

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

File details

Details for the file yutipy-5.3.3-py3-none-any.whl.

File metadata

  • Download URL: yutipy-5.3.3-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for yutipy-5.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3619bba93abb98a0cf6d244c14261d5ac3d1f3148c4c7e1050e621d68506fde7
MD5 561011fe6475bacb5a8973e283f10a42
BLAKE2b-256 17bb105e19488b7572821217a592706cc7efdc5aa5aa38c2d4094b12ee373673

See more details on using hashes here.

Provenance

The following attestation bundles were made for yutipy-5.3.3-py3-none-any.whl:

Publisher: release.yml on CheapNightbot/yutipy

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