Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1 KB

README.md

File metadata and controls

56 lines (36 loc) · 1 KB

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: