Welcome to the User Management API project. This professional-grade project is designed to provide a robust and scalable user management system using Flask. It includes comprehensive endpoints for creating, retrieving, updating, and deleting users, as well as a health check endpoint. The infrastructure is managed using Terraform, containers are orchestrated with Kubernetes, and a Makefile is used to streamline commands, testing, and linting.
-
API Endpoints:
POST /users
: Create a new user.GET /users
: Retrieve a list of users.PATCH /users/<id>
: Update an existing user.DELETE /users/<id>
: Delete a user.GET /healthcheck
: Check the health status of the API.
-
Infrastructure:
- Managed using Terraform for scalable and efficient resource provisioning.
-
Container Orchestration:
- Kubernetes for managing and orchestrating containers, ensuring high availability and scalability.
-
Development and Testing:
- A Makefile to organize and simplify commands.
- Integrated testing framework.
- Code linting with Flake8.
- Docker for containerized application deployment.
- Docker
- Kubernetes
- Terraform
- Make
- Python 3.x
- Pip
-
Clone the repository:
git clone https://github.com/bacciotti/restapi-flask.git cd restapi-flask
-
Set up virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the application locally:
make deploy-dev
-
Initialize Terraform:
terraform init
-
Apply Terraform configuration:
terraform apply
-
Build Docker image:
make build
-
Push Docker image to registry:
make push
-
Deploy to Kubernetes:
make deploy
- Run tests:
make test
We welcome contributions from the community. Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License.
Leverage this User Management API to efficiently manage users in your applications with a scalable and reliable infrastructure. As an experienced professional, you can appreciate the thoughtfulness and best practices integrated into this project.