This rest-ful API was developed with FastAPI and using PonyORM database creation and management.
After starting the server you can view and test all the endpoints in:
http://127.0.0.1:8000/api/docs
If this is not enough and you want some beautiful (don't jugde us) frontend for this backend we have you covered: Frontend repository for Secret Voldemort
We encourage you to use a python virtual environment!
-
Download the repository
$ git clone https://github.com/LMartinezEXEX/sdv-backend.git
-
Navigate inside the downloaded repository
$ cd sdv-backend/
-
Initialize python virtual environment
$ python3 -m venv venv
-
Activate/Start up the virtual environment
$ source venv/bin/activate
-
Install all the requirements needed (there are many other you can check in the requirements.txt) for this proyect with:
$ pip3 install -r requirements.txt
Now you're ready to go!
To set up and start the server we use uvicorn 🦄, don't worry, it was installed within the requirements!
Just start it with:
$ uvicorn main:app
If you want to make your own changes to the repository, add --reload
, so the server restarts when you save a modified file within the server files.
We've make some tests for you to run if you decide you want to make some enhancement in the current code!
You should run it with Pytest, it was installed within the requirements too:
python -m pytest API/TestAPI/test_file.py