Skip to content

Simple RESTful API for retrieving music info for various steaming platforms.

License

Notifications You must be signed in to change notification settings

CheapNightbot/yutify

Repository files navigation

Banner

GitHub License Website Status Read Docs

yutify

✨ TABLE OF CONTENTS
✨ SCREENSHOTS
OwO
image
image
image

yutifiy is a simple RESTful API for retrieving music info for various streaming platforms. Using the artist name and song name, you can get various information about the song including the streaming link(s) for various music streaming platforms. To prevent the abuse of the API, there is a ratelimit of 30 requests per minute for every user.

Right now, it only retrieves streaming links for these music platforms. If you would like me to add any other streaming platforms or more metadata about the song(s), feel free to open an issue. You can visit the website to playaround here or maybe check simple examples on how get started and make sure to read docs.

Features ™️

  • Retrieve various information about music OwO ~!
    • Some of the noticable information that can be retrieved:
    • Album Art
    • Album Type
    • Genre
    • Lyrics
    • Release Date
    • Many More ™ ヾ(⌐■_■)ノ♪
  • Get streaming link for various streaming platforms. ♪(´▽`)
  • Request for information only for a particular streaming platform. Read the docs for more info.
  • Use API endpoint to search for music in code or play around directly on website. ヾ(⌐■_■)ノ♪
  • It's FREE. _(:з)∠)_

Available Music Platforms 📻

Alphabetically sorted

Run Locally 🧑‍💻

Run yutify locally in only three steps. Alright, ready? Go:

  1. Clone the repository:
git clone https://github.com/CheapNightbot/yutify.git
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python api.py

Important

Visit locahost at port 8000: http://localhost:8000/

Additional Notes On Running yutify 📝

Okay, doing above three steps didn't work, right >.< ? Because there are few other steps required to be considered while running yutify:

By the way, I assume you already had Python installed. You have, right?


→ For retrieving information from Spotify, it uses official Spotify API endpoint, which requires authentication. So, you will have to signup for Spotify for Developers account (it's free) and follow the steps below:

  • Go to your dashboard at https://developer.spotify.com/
  • Create a new app and fill localhost/callback in "Redirect URIs" field.
  • Select "Web API" for "Which API/SDKs are you planning to use?".
  • Next, create .env file inside yutify/ directory.
    • Create a variable inside this .env file called CLIENT_ID and paste the Client ID from Spotify Dashboard after it (after = sign. no space).
    • Then, create new variable CLIENT_SECRET and paste Client secret from Spotify Dashboard. You may have to click on "View client secret".

→ And regarding ratelimit:

  • For ratelimiting, it uses Flask-Limiter and for storage, redis.
  • So, first, you will have to have a redis instance up and running.
    • You can, at this point, just copy and paste the URL where the redis instance is running into the .env file in the project root directory (check the .env_example file!).
  • Run python api.py command, and everything will work as expected.
  • If no .env file exists or it fails to get "REDIS_URI", it will use the memory for ratelimiting instead of redis. It is good for running in development environment, do not use it for production.
  • If you do not want to use ratelimiting at all, you can change the global RATELIMIT variable in api.py to False:
    • RATELIMIT = False
    • You can run python api.py again, and everything should work as expected.

Contributing 🤝

Users

If you don't know programming, you can still contribute to this project by opening an issue for suggestions, improvements or really for an issue.

Developers

  • Just fork the repository.
  • Create a new branch for your changes and make changes in that (separate) branch.
  • Open a pull request.

Acknowledgement // End Note 🙃

About

Simple RESTful API for retrieving music info for various steaming platforms.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published