Basic Skeleton of a simple backend server for educational purposes.
- built using Fastapi.
- PDF generation using Reportlab
This project uses uv for extremely fast, reliable Python package management. You don't need to manually create virtual environments.
Install uv if you haven't already:
-
macOS/LinuxBoxes (bash):
curl -LsSf [https://astral.sh/uv/install.sh](https://astral.sh/uv/install.sh) | sh -
Windows (PowerShell):
powershell -c "irm [https://astral.sh/uv/install.ps1](https://astral.sh/uv/install.ps1) | iex"
Note: After installing on Windows, you may need to restart your terminal (or PyCharm's terminal) for the uv command to be recognized.
If your users ask or if you're curious, here is what that command is actually doing:
powershell -c: Tells the system to run the following string as a PowerShell command.irm(Invoke-RestMethod): Downloads the installation script from theastral.shURL.iex(Invoke-Expression): Executes the script it just downloaded to handle the actual setup on the user's machine.
If you or your users are using the terminal inside PyCharm on Windows, sometimes it defaults to the old
cmd.exe.To make it work better with
uv, go to Settings > Tools > Terminal and ensure the Shell path is set topowershell.exe.
If you prefer using PyCharm's visual interface over the command line, follow these steps:
-
Clone the Project:
- Open PyCharm and select Get from Version Control (Go to File > Project from Version Control).
- Paste the GitHub URL and click Clone.
-
Set up the Interpreter (uv):
- Once the project opens, PyCharm should detect the
pyproject.tomlfile. - Go to Settings (
Ctrl+Alt+S) > Project > Python Interpreter. - Click Add Interpreter > Add Local Interpreter...
- Select uv Environment from the left sidebar.
*PyCharm will automatically find your
uvexecutable and create the virtual environment based on theuv.lockfile.
- Once the project opens, PyCharm should detect the
-
Install Dependencies:
- If PyCharm shows a gold bar at the top saying "Packages listed in pyproject.toml are not installed," simply click Install requirements.
- Alternatively, PyCharm will run
uv syncautomatically when you set the interpreter.
-
Run the Code: Right-click your
app.py(or your entry point) and select Run 'main'.
Because we use uv.lock, PyCharm will configure your environment in seconds, ensuring you have the exact same library versions as the developers.