π A repository to learn and explore the basics of FastAPI, a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
This repository serves as an educational resource to:
- Understand the foundational structure of a FastAPI application.
- Experiment with creating routes, handling requests, and managing responses.
- Learn how FastAPI leverages Python's type hints for auto-generated documentation and validation.
-
Hello World Application:
- Demonstrates the basic setup of a FastAPI project.
- Includes a simple endpoint to get started.
-
Beginner-Friendly:
- Aimed at developers new to FastAPI and modern Python web development.
- Provides a solid starting point for more advanced FastAPI projects.
Follow these steps to set up and run the project locally.
- Python 3.7 or higher.
- Pipenv or a similar virtual environment tool is recommended.
-
Clone the Repository:
git clone https://github.com/GuilhermeStracini/hello-world-fastapi.git cd hello-world-fastapi
-
Set Up the Environment:
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a virtual environment:
-
Run the Application:
uvicorn main:app --reload
-
Access the API:
- Visit
http://127.0.0.1:8000
to see the Hello World response. - Explore the interactive API documentation at:
- Visit
Here are some additional resources to enhance your understanding of FastAPI and its ecosystem:
- FastAPI: From App.py to a Modular Architecture
- Async Architecture with FastAPI, Celery, and RabbitMQ
- Building End-to-End Microservices with FastAPI and RabbitMQ: A Comprehensive Guide
Contributions are welcome! If you'd like to enhance this repository, feel free to:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a detailed description.
This project is licensed under the MIT License.