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.
Software Development with Python 3.11.9
Desarrollo de Software con Python 3.11.9
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.
- FastAPI: A modern, high-performance web framework for building APIs with Python 3.7+.
- Uvicorn: A lightning-fast ASGI server implementation, using
uvloopandhttptools. - Dockerized: Simplified setup and deployment using Docker and Docker Compose.
- Interactive Documentation: Automatically generated API docs with Swagger UI and ReDoc.
- Docker installed on your machine.
-
Clone the repository:
git clone https://github.com/Luispfa/python-fastapi-tutorial.git cd python-fastapi-tutorial -
Build and run the Docker container:
docker-compose up --build
The application will be accessible at http://localhost:8000.
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
These interfaces provide interactive exploration and testing of the API endpoints.
GET /: Returns a welcome message.
Feel free to extend the API with additional routes and functionalities as needed.
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.
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.
- FastAPI: Un framework web moderno y de alto rendimiento para construir APIs con Python 3.7+.
- Uvicorn: Un servidor ASGI extremadamente rápido, utilizando
uvloopyhttptools. - 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.
- Tener Docker instalado en tu máquina.
-
Clona el repositorio:
git clone https://github.com/Luispfa/python-fastapi-tutorial.git cd python-fastapi-tutorial -
Construye y ejecuta el contenedor Docker:
docker-compose up --build
La aplicación estará accesible en http://localhost:8000.
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Estas interfaces proporcionan una exploración y prueba interactivas de los endpoints de la API.
GET /: Devuelve un mensaje de bienvenida.
Siéntete libre de extender la API con rutas y funcionalidades adicionales según sea necesario.
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.