https://github.com/cheapnightbot/yutipy
A simple Python package to interact with various music platforms APIs.
https://github.com/cheapnightbot/yutipy
api-wrapper music music-information-retrieval python-package python3 yutipy
Last synced: 18 days ago
JSON representation
A simple Python package to interact with various music platforms APIs.
- Host: GitHub
- URL: https://github.com/cheapnightbot/yutipy
- Owner: CheapNightbot
- License: mit
- Created: 2025-02-21T06:05:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-06-03T02:31:26.000Z (24 days ago)
- Last Synced: 2026-06-03T03:14:40.522Z (24 days ago)
- Topics: api-wrapper, music, music-information-retrieval, python-package, python3, yutipy
- Language: Python
- Homepage: https://yutipy.readthedocs.io/en/latest/
- Size: 410 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> **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](https://github.com/CheapNightbot/yutify) — it’s powered by yutipy!
A _**simple**_ Python package to interact with various music platforms APIs.
## Table of Contents
- [Features](#features)
- [Available Music Platforms](#available-music-platforms)
- [Installation](#installation)
- [Usage Example](#usage-example)
- [Command-Line Interface (CLI)](#command-line-interface-cli)
- [Search for Music](#search-for-music)
- [Options](#options)
- [Configuration Wizard](#configuration-wizard)
- [Contributing](#contributing)
- [License](#license)
## 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](https://github.com/CheapNightbot/yutipy/issues) or by emailing me.
- `Deezer`: https://www.deezer.com
- `iTunes`: https://music.apple.com
- `KKBOX`: https://www.kkbox.com
- `Lastfm`: https://last.fm
- `Spotify`: https://spotify.com
- `YouTube Music`: https://music.youtube.com
## Installation
You can install the package using pip. Make sure you have Python 3.10 or higher installed.
```bash
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**:
```python
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:
```python
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](https://yutipy.readthedocs.io/en/latest/usage_examples.html) 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:
```bash
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:
```bash
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](LICENSE) file for details.