Install PDM for your user with pip
> pip install --user pdm
Check your PDM version with
> pdm --version
You must then add the PDM executable to your PATH environment
To do so:
Locate the folder in which pdm was installed with pip list -v (Usually C:/Users/UserName/AppData/Roaming or Local/Python/Python310/site-packages)
Find the Scripts folder which is a sibling of the site-packages (e.g. C:/Users/UserName/AppData/Roaming or Local/Python/Python310/Scripts; it should contain pdm.exe) and copy it.
On Windows, search Edit the system environment variables
In System Properties, click Environment variables => One of the User variables should be named Path
Edit it and add the copied folder at the end of the variable, then save.
You can now open a new terminal and retry
> python -m pdm install
That's all 😊
You must change your file .env with the information of your database
dbname = "..." user = "..." password = "..." host = "..." port = "..."
You must add the definition of a schema that will interact with the API. schema = "..."
You must add the definition of the API key in order to acces the Movie Data Base API. The definition of the token is not needed.
TMDB_API_KEY="fb0e5ded3d79bc5e571538030f7e5af8"
> pdm start
This starts a server accessible on localhost:8000
The API is then documented on localhost:8000/docs
When the application is launched, all tables are created if they weren't already.
You can separately launch the fill_tables.py to fill your database with some data and try the app.
> pdm run python src/Service/fill_tables.py
You can use (username : "user_nocode", password : "user_nocode123") to login with a fictious user and optimize your trying.