Generate beautiful code, fast.
Imagine's SmartCompiler™ let's you generate production-ready, 100% test-covered Django code using our simple config. It's free to use with no lock-in - the generated code is yours to commit to any project. With 💛, from us to you.
Create a new Django app using Imagine
npm install -g imagine && imagine create -f Django -n my-app
Take our demo app for a spin
npm install -g imagine && imagine demo

imagine example config

# datamodel domain config
Model Musician {
music-id integer [primary key]
first-name string [maxlength 40]
last_name string [maxlength 40]
instrument string [choice ["piano","guitar","drums","bass"]]
age integer [min 0, nullable]
}
Model Album {
id integer [primary key]
name string [maxlength 80]
release_date datetime []
num_stars integer [range 0 5]
}
Model Song {
id integer [primary key]
name string [maxlength 100]
lyrics string [maxlength 1000]
}
Model Concert {
id integer [primary key]
name string [maxlength 50]
place string [maxlength 200]
date datetime []
}
Relation records-composer {
many records from Album
one composer from Musician
}
Relation concerts-artist {
many concerts from Concert
one artist from Musician
}
Relation songs-album {
many songs from Song
one album from Album
}
Relation singles-composer {
many singles from Song
one composer from Musician
}
# authorization domain config
Permission permission-1
Permission permission-2
Role admin [permission-1,permission-2]
Role other1 [permission-1]
Role other2 [permission-2]
# api domain config
API musician-api {
model Musician
actions CRUD
permissions [permission-1,permission-2]
}
API album-api {
model Album
actions CRUD
permissions [permission-1,permission-2]
}
API song-api {
model Song
actions CRUD
permissions [permission-1,permission-2]
}
API concert-api {
model Concert
actions CRUD
}
API musician-api-fetch {
model Musician
actions [Read,ReadMany,Create]
filter [first-name,last_name,instrument]
data [music-id,last_name,instrument,first-name,records]
}
API album-api-fetch-update {
model Album
actions [Read,ReadMany,Update]
permissions [permission-1]
filter [name,num_stars]
data [name,songs]
}
# Application settings
settings
app:
# The application name
name: app
# Frameworks supported: Flask, Node
framework: django
django:
# Package managers supported: pipenv, poetry, virtualenv
package-manager: pipenv
# [gunicorn, uwsgi, dev]
server: gunicorn
layout:
# [single-file, separate-files]
models: separate-files
# name of the project settings directory
project-dir: project
api:
# [rest, graphql]
format: graphql
database:
# [postgres, mysql, sqlite3]
type: postgres
# name of your database
name: demo-db
end settings

generated Django code files

CONFIGURABLE FOR YOUR STACK
How does it work?
You write a simple config file in Imagine's syntax to describe your app specifications as well as your preferred code layout, API and database and Imagine generates your code, including tests. It’s that easy.
Supported Frameworks
Supported Databases
Supported Package Managers
Supported API Protocols
BEST PRACTICE, CODIFIED!
Why use Imagine?
100% unit test coverage
100% end-to-end test coverage
Production ready
Dockerised
Fully linted code
Automatic logging
Standard Git process
Imagine is written by developers for developers. We built the next-gen code generator, so you can leverage the same types of tools that developers at Google and Facebook use and avoid creating tech debt.
MAKE IMAGINE AN INDESPENSIBLE PART OF YOUR TOOLKIT
Are you ready to kit up?