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
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
GET http://localhost:5000/api/artist?name=drake
[
{
"artist_id": 3,
"name": "Drake",
"first_name": "Aubrey",
"last_name": "Graham",
"phone": "615-541-4518",
"website": "drakerelated.com",
"is_group": false
}
]
Tests are independent of each other, database must be reset after every test file ran.