Generate your REST API by defining
DomainModels
- Python3
- venv
- docker-compose
- git
- adapt the
DomainModels
in themain.py
file - generate the aplication
python main.py
- move to the
/tmp/{your_app_name}
directory - build the application locally
./build_local.sh
- run the applocation locally
./run_local.sh
- open the browser and enjoy your REST API http://localhost:8000
The generator will provide you the following features:
- generate Django project and application
setting.py
is adapted- generate
RSA Keys
to sign the Bearer Token - DEBUG is set by environtment valiable
APP_ENV=PROD
orAPP_ENV=LOCAL
- starting of a postgres database using docker when
APP_ENV=LOCAL
- setting
ALLOWED_HOSTS=['*']
SECRET_KEY
can be set by environment valiableAPP_SECRET
, but have default value- Adding Middleware
WhiteNoise
to provide static files also inPROD
- Database configuration using
jd-database-url
defined by environment variableDATABASE_URL
- adding template directory
- providing a welcome page
templates/index.html
- generate
- CRUD endpoints
GET
(one or all)- find all = uses pagination and filters
- find one = pass the id as a path parameter
POST
(create a new record)PUT
(update an existing record)PATCH
(partial update of an existing record)DELETE
(delete an existing record)
- OpenApi Docs
- Admin Panel
- Model generation
- Django Models
- Enums
- Audit information
creator
,create_date
,modifier
,modified_date
- Schema generation
- Postgres database
- build and run scripts
build_local.sh
run_local.sh
build_prod.sh
run_prod.sh
- create
docker-compose.yml
- used for local development
- authentication
- using
Authorization
Bearer Token signed by RSA - expiration can be defined by environment variable
TOKEN_EXPIRATION_MINUTES
default 1 year
- using
- generate a
README.md
- git
- create a
.gitignore
- creates an initial commit if there was no git repo before
- creates an update commit if there was a repo before
- create a
- test generation
- for the REST endpoints
- for the login
- frontend generation (Angular)
- Navigation
- login / logout
- CRUD
python3 -m venv .env
source .env/bin/activate
pip install -r requirements.txt