A simple FastAPI webserver with a bunch of useful resources.
Project description
FastAPI WebServer
This is a wrapper of a FAST API application with some additional features that might be useful for quick web development.
It features:
- Powerful environment and settings handling with Dynamic module import like Django;
- A Database Adapter to connect to any database on-the-fly;
- A Data Migration Tool, to run
.sqlfiles, or migratejsondata; - An SMTP service, implemented on top of fastapi-mail;
- SASS Compiler;
- Server-Side Rendering via
Jinja2Template; - Static Files provider;
- CORS Support;
- TLS Support + mkcert certificates (local/development only)
Roadmap
The following features are expected to be implemented in the future. Contribution is welcome.
- OCI-Compliant Image for Docker/Podman
- Local Key-Value Cache
- Logging and Tracing API (via OpenTelemetry)
- Authentication and Authorization
- OAuth2 support
- OpenID Connect support
- Passkey support (via Bitwarden passwordless)
- Traffic Analyzer
- (AI) Bot detector
- VPN detector
- Rate limiter
- IP-based Access-Control List (ACL)
- Content Providers (HTTP client and proxy)
- Google Fonts API
- Gravatar
- GIPHY
Getting Started
Optionally, set up the environment variables. All environment variables can be found on .env file in the root of this repository.
import webserver
from fastapi import APIRouter, FastAPI
router: APIRouter = APIRouter()
app: FastAPI = webserver.app
@router.get("/")
def index():
return {"Hello World": f"from {webserver.settings.APP_NAME}"}
app.include_router(router)
if __name__ == "__main__":
webserver.start()
This enables both local execution through main method as well as fastapi (dev|run) commands.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastapi_webserver-0.4.2.tar.gz.
File metadata
- Download URL: fastapi_webserver-0.4.2.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68308e77962355f1f363feb3ba3aae77636adf47a3c00436183e788b1e9acf9e
|
|
| MD5 |
c23b194cfa423c21cf77d633b218df36
|
|
| BLAKE2b-256 |
016fcfeff7a55bc57548eb91cf20c8bcbe9435eff51b0cce8ac2b30145860ebd
|
File details
Details for the file fastapi_webserver-0.4.2-py3-none-any.whl.
File metadata
- Download URL: fastapi_webserver-0.4.2-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
742474dcf7cf6e8b26ab8b3db00bb321db13de22412cd89a4d6592649c37b4e0
|
|
| MD5 |
3d2ee538a0feca5822a343844405cb5f
|
|
| BLAKE2b-256 |
f99e65539e8ddd28e4e3f26ec435846abacea04d54b7c2ec32220e5b39213705
|