What is FastAPI
FastAPI is a cutting-edge and high-performance web framework tailored for building APIs using Python 3.7+. It harnesses the power of Starlette and Pydantic, making it exceptionally fast, considered one of the swiftest Python frameworks available.
Notable advantages include:
- Fast Development: Accelerate feature development
- Fewer Bugs
- Intuitive: Enjoy excellent editor support, enabling code completion throughout your development process, leading to reduced debugging time.
- User-Friendly: Designed to be effortlessly approachable, allowing for quick learning without extensive documentation reading.
- Concise: Mitigate code duplication through the utilization of multiple features from each parameter declaration, contributing to fewer bugs.
- Robust: Obtain production-ready code with the added benefit of automatic interactive documentation.
- Standards-Compliant: Adheres to and fully aligns with the open standards for APIs like OpenAPI, Swagger and JSON Schema.
Who is using FastAPI
FastAPI serves as an exceptional choice for developers seeking optimal performance, ease of use, and adherence to industry standards for building APIs with Python. Its remarkable speed and features make it a standout framework in the Python ecosystem.
- Software developers
- Data Engineers
- Data Scientists
- DevOps Engineers
What are the benefits of using FastAPI stack
- Automatic and quick deployment to the prefered cloud
- The accurate stack configuration
- Fast startup
- Lower system overhead
Number of servers required: 1
What does this deployment include
This deployment built with Docker Compose containing preconfigured
- FastAPI docker container
- PostgreSQL docker container
- Redis docker container
- Swagger
Once deployment is complete you can SSH to your new server and manage your first app.
The project structure will look like following:
fastapi/
├── /app
│ ├── __init__.py
│ ├── main.py
│ ├── pipfile
│ ├── pipfile.lock
│ └── requirements.txt
└─ docker-compose.yml
- app/ - This directory contains the source code of your application.
- init.py - This file is typically used to mark the app directory as a Python package.
- main.py - This file likely contains the main code for your FastAPI application. It defines the FastAPI app, routes, and any other necessary functionality.
- pipfile - This file is commonly used with pipenv, a package manager for Python. It specifies the project's dependencies and their versions.
- pipfile.lock - This file is generated by pipenv and contains the specific versions of the installed packages for the project.
- requirements.txt - This file is an alternative to the Pipfile and is typically used with pip. It lists the project's dependencies and their versions in a plain text format.
- docker-compose.yml - This file is a Docker Compose configuration file. It describes the services, networks, and volumes for your Dockerized application. It defines the setup and dependencies of your application's containers.
Postgres Admin port: 5050
Swagger UI port: 8080
FastAPI port: 8000
Please note that Redis (port 6379) and Postgres (port 5432) are not exposed by default.
Companion apps
Fail2ban scans log files and bans IPs that show the malicious signs. Highly recommended for simple VPS server setup
Nginx Proxy Manager is a user-friendly software application designed to effortlessly route traffic to your websites, whether they're hosted at home or elsewhere. It comes equipped with free SSL capabilities, eliminating the need for extensive Nginx or Letsencrypt knowledge. This tool proves especially handy for simplifying SSL generation and seamlessly proxying your docker containers.
Get DevOps Support Hourly
By selecting this service, you will have priority access to the development team for optimizing and upgrading your stack.
Contact info@try.direct for more information or Hire an expert directly to make post-installation adjustments on an hourly basis. Browse other available services.
Docker Status Panel - is a minimalistic docker container management panel written in Python / Flask microframework.
Portainer is a lightweight management UI that allows you to easily manage your different Docker environments (Docker hosts or Swarm clusters)