Skip to content

The coolest API for Leo's Music Shop, written in Python and FastAPI.

Notifications You must be signed in to change notification settings

seg-leonelsanches/leos-music-shop-api-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leo's Music Shop API in Python (FastAPI)

This is the coolest API for Leo's Music Shop.

For now this API only sells bass guitars.

Running

First define a .env file with two variables, like below:

JWT_SECRET="abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd"
JWE_SECRET="abcdabcdabcdabcd"
SEGMENT_WRITE_ID="your-segment-write-id"

Make sure you have all the requirements installed:

pip install -r requirements.txt

Make sure you have a database created and initialized with data:

python -m commands

Then run it:

uvicorn main:app --reload

Running with Docker

First build the image:

docker build -t leos-music-shop-api-python .

Then run it:

docker run -dp 8001:80 -e SEGMENT_WRITE_ID="your-segment-write-id" --name leos-music-shop-api-python leos-music-shop-api-python

This will run the app at port 8001.

Documentation

There are two documentation systems enabled:

About

The coolest API for Leo's Music Shop, written in Python and FastAPI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published