Aeroplane
Example project using Django and FastAPI together.
Install / Use
/learn @jordaneremieff/AeroplaneREADME
aeroplane
An experiment combining Django and FastAPI. Also includes Djantic for converting Django models to Pydantic models and an example serverless configuration.
<p align="center"> <kbd><img width="200" alt="Screen Shot 2021-04-04 at 3 48 27 pm" src="https://user-images.githubusercontent.com/1376648/113499971-c97f6a80-955d-11eb-99b0-a81ea2344ac1.png"></kbd> <kbd><img width="200" alt="Screen Shot 2021-04-04 at 3 47 54 pm" src="https://user-images.githubusercontent.com/1376648/113499972-cab09780-955d-11eb-9aee-3b4bad6cba08.png"></kbd> </p>Initial setup
Requirements: Python 3.7+
First create a virtual environment and install the dependencies:
python -m .venv venv
. .venv/bin/activate
pip install -r requirements.txt
Note: The mangum requirement is only necessary if deploying to AWS Lambda, and psycopg2-binary is only necessary for Postgres support.
Configuring the database
Any supported Django database configuration can be used, this example provides to examples:
-
To use Postgres, rename
.env.distto.envand set the details for the database. These will be loaded insettings.py. -
To use SQLite, edit
settings.pyto uncomment the sqlite3 database configuration.
Then populate the initial database tables using the migration command:
./manage.py migrate
Running the application locally
Run the server locally using uvicorn:
uvicorn aeroplane.main:app --debug
The auto-generated docs proivded by FastAPI are available at http://localhost:8000/docs
The model admin provided by Django is availabe at http://localhost:8000/dj/admin
Deploying to AWS Lambda & API Gateway
This example provides a configuration for using Serverless Framework with Mangum to deploy the ASGI application to AWS Lambda with API Gateway, and it requires a remote Postgres database to be configured in the application settings.
The following steps assumes a remote Postgres database is already setup and Serverless Framework is already installed:
- Edit the
serverless.ymlwhere necessary - Add the remote database details to
.env - Run
sls deploy
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
109.8kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
349.9kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
