/Ephm3ralMusic-API

Music API allowing developers to build applications based on favourite and trending music artists.

Primary LanguagePythonMIT LicenseMIT

Ephm3ralMusic-API

Contributors Forks Stars Licence Issues

This project is temporarily idle while I look for a new MySQL hosting service.

This is the Ephm3ralMusic-API, a Python REST-API built using FastAPI and pydantic to provide developers with key data to build music applications. This API is the main endpoint for the upcoming Ephm3ral Music web application and is also freely available to all developers worldwide.

Features

  • Type Safety using typing.
  • Real time updation of stats for individual applications

Technology Stack

  • Language: Python
  • Environment: Fly.io
  • Framework: FastAPI
  • Database: MySQL

Get Started

This project is not fully production ready
The API endpoint can be accessed via this webpage.

Example Code

Python

import requests
from pprint import pprint

#fetch all albums
albums_response = requests.get("https://ephm3ral-music.fly.dev/albums")

albums = albums_response.json()

pprint(albums)

JavaScript

const artistAlbums = `https://ephm3ral-music.fly.dev/artist/5/albums`;

//fetch albums by a specific artist
let response = fetch(artistAlbums)
		.then(response => response.json())
		.then(data => console.log(data))
		.catch(error => console.log(error));

Documentation

Artists

Get all artists (default limit of 10)
https://ephm3ral-music.fly.dev/artists

Get an artist by id
https://ephm3ral-music.fly.dev/artist/{id}

Songs

Get all songs (default limit of 10)
https://ephm3ral-music.fly.dev/songs

Get all songs by a specific artis, by id
https://ephm3ral-music.fly.dev/artist/{id}/songs

Albums

Get all albums (default limit of 10)
https://ephm3ral-music.fly.dev/albums

Get all albums by a specific artist, by id
https://ephm3ral-music.fly.dev/artist/{id}/albums

Example Usages

  • Music Recommender Systems
  • Leaderboard Apps
  • Social Media Platforms