Hello World FastAPI (Python)
๐ 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.
Overview
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.
Features
- 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.
Getting Started
Follow these steps to set up and run the project locally.
Prerequisites
- Python 3.7 or higher.
- Pipenv or a similar virtual environment tool is recommended.
Steps
- 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
- 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:
Helpful Links
Here are some additional resources to enhance your understanding of FastAPI and its ecosystem:
Contribution
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.
License
This project is licensed under the MIT License.