https://github.com/luispfa/python-fastapi-tutorial
https://github.com/luispfa/python-fastapi-tutorial
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/luispfa/python-fastapi-tutorial
- Owner: Luispfa
- Created: 2025-06-24T18:20:58.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-13T17:09:17.000Z (11 months ago)
- Last Synced: 2025-07-13T18:39:51.610Z (11 months ago)
- Language: Python
- Size: 1.87 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🐍 FastAPI Demo / Demostración FastAPI




## Bilingual README / README Bilingüe
This repository is bilingual. Below you will find the English version followed by the Spanish version.
Este repositorio es bilingüe. A continuación encontrarás la versión en inglés seguida de la versión en español.
---
Tutorial "Python - FastAPI"
Software Development with Python 3.11.9
Desarrollo de Software con Python 3.11.9
---
# Python FastAPI Tutorial
This repository showcases a demonstration project built with **Python** and **FastAPI**, focusing on clean architecture, high performance, and scalability. It serves as a practical example for building modern APIs using FastAPI's powerful features.
## 🚀 Features
- **FastAPI**: A modern, high-performance web framework for building APIs with Python 3.7+.
- **Uvicorn**: A lightning-fast ASGI server implementation, using `uvloop` and `httptools`.
- **Dockerized**: Simplified setup and deployment using Docker and Docker Compose.
- **Interactive Documentation**: Automatically generated API docs with Swagger UI and ReDoc.
## 📦 Getting Started
### Prerequisites
- [Docker](https://www.docker.com/get-started) installed on your machine.
### Installation
1. Clone the repository:
```bash
git clone https://github.com/Luispfa/python-fastapi-tutorial.git
cd python-fastapi-tutorial
```
2. Build and run the Docker container:
```bash
docker-compose up --build
```
The application will be accessible at [http://localhost:8000](http://localhost:8000).
## 📚 API Documentation
- Swagger UI: [http://localhost:8000/docs](http://localhost:8000/docs)
- ReDoc: [http://localhost:8000/redoc](http://localhost:8000/redoc)
These interfaces provide interactive exploration and testing of the API endpoints.
## 🧪 Example Endpoints
- `GET /`: Returns a welcome message.
Feel free to extend the API with additional routes and functionalities as needed.
## 🛠️ Project Structure
```
python-fastapi/
├── docker/
| ├── Dockerfile
| └── requirements.txt
├── main.py
└── docker-compose.yml
```
- `main.py`: Entry point of the FastAPI application.
- `Dockerfile`: Defines the Docker image for the application.
- `docker-compose.yml`: Configures the Docker services.
---
# Tutorial de Python con FastAPI
Este repositorio presenta un proyecto de demostración construido con **Python** y **FastAPI**, enfocándose en una arquitectura limpia, alto rendimiento y escalabilidad. Sirve como un ejemplo práctico para construir APIs modernas utilizando las potentes características de FastAPI.
## 🚀 Características
- **FastAPI**: Un framework web moderno y de alto rendimiento para construir APIs con Python 3.7+.
- **Uvicorn**: Un servidor ASGI extremadamente rápido, utilizando `uvloop` y `httptools`.
- **Dockerizado**: Configuración y despliegue simplificados usando Docker y Docker Compose.
- **Documentación Interactiva**: Documentación de la API generada automáticamente con Swagger UI y ReDoc.
## 📦 Comenzando
### Requisitos Previos
- Tener [Docker](https://www.docker.com/get-started) instalado en tu máquina.
### Instalación
1. Clona el repositorio:
```bash
git clone https://github.com/Luispfa/python-fastapi-tutorial.git
cd python-fastapi-tutorial
```
2. Construye y ejecuta el contenedor Docker:
```bash
docker-compose up --build
```
La aplicación estará accesible en [http://localhost:8000](http://localhost:8000).
## 📚 Documentación de la API
- Swagger UI: [http://localhost:8000/docs](http://localhost:8000/docs)
- ReDoc: [http://localhost:8000/redoc](http://localhost:8000/redoc)
Estas interfaces proporcionan una exploración y prueba interactivas de los endpoints de la API.
## 🧪 Endpoints de Ejemplo
- `GET /`: Devuelve un mensaje de bienvenida.
Siéntete libre de extender la API con rutas y funcionalidades adicionales según sea necesario.
## 🛠️ Estructura del Proyecto
```
python-fastapi/
├── docker/
| ├── Dockerfile
| └── requirements.txt
├── main.py
└── docker-compose.yml
```
- `main.py`: Punto de entrada de la aplicación FastAPI.
- `Dockerfile`: Define la imagen Docker para la aplicación.
- `docker-compose.yml`: Configura los servicios Docker.