Skip to content

dsymbol/music-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

music-api

REST API created using FastAPI and SQLite3 with a music database 🎵
SQLAlchemy was not used as I wanted to expand my knowledge of SQL by implementing raw SQL

Endpoints

Artist

1

Album

2

Song

3

Quick Start

Install dependencies:

git clone https://github.com/dsymbol/music-api
pip install -r requirements.txt

Generate database and run the API:

python src/database.py
python -m uvicorn --port 5000 server:app

You can view the API docs by visiting http://localhost:5000

Example

Request:

GET http://localhost:5000/api/artist?name=drake

Response:

[
  {
    "artist_id": 3,
    "name": "Drake",
    "first_name": "Aubrey",
    "last_name": "Graham",
    "phone": "615-541-4518",
    "website": "drakerelated.com",
    "is_group": false
  }
]

PyTest

Tests are independent of each other, database must be reset after every test file ran.

About

REST API created using FastAPI and SQLite3

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages