This is not a walkthrough, I'm just sharing my learning process.
-
Familiarize with the Web Environment I already have some knowledge of Python 3 and now need to acclimate to its use in a web context.
-
Set Up a Local Server I chose to use the "uvicorn" package due to its similarity to Node.js.
-
Develop a Basic FastAPI Application I want to create a FastAPI application that aligns with current market trends.
- Running the Project: How to run the project effectively.
-
Create a Local Environment Establishing a local environment is crucial (I've seen a lot of examples already! 😅).
-
Break Down the Paths into Routes Start with creating basic routes.
-
Create More Complex Endpoints - ex: Implement POST methods for data processing and explore passing data as query parameters.
-
Security and Validation
- URL validation to prevent various types of attacks (XSS, DoS, Input Length Attacks)
Create a Virtual Environment (only on the first run)
python3 -m venv [venv_name]
Activate the Virtual Environment
source venv/bin/activate
Deactivate the Virtual Environment
deactivate
Save Installed Packages and Versions to a File
pip freeze > requirements.txt
Install Requirements from a File
pip install -r requirements.txt
Start the Application (with auto-reload)
uvicorn app.main:app --reload
For better commits run Husky
git commit -m "[commitlint-kind]: "