Django project starter on steroids: quickly create a Django app AND generate source code for data models + REST/GraphQL APIs (the generated code is auto-linted and has 100% test coverage).

Overview

CodeQL codecov test across OS, package managers and Python versions

Create Django App 💛

We're a Django project starter on steroids!


One-line command to create a Django app with all the dependencies auto-installed
AND
Easy config (alpha release) to generate Django code for:

  • setting up package managers (pipenv, poetry, virtualenv)
  • setting web servers (dev, gunicorn, uwsgi)
  • connecting to different databases (MySQL, PostgreSQL, SQLite3)
  • data models
  • CRUD API (REST, GraphQL)
  • unit tests and test coverage reporting
  • autogenerated test factories (FactoryBoy)
  • linting and code formatting (autopep8, isort)
  • API documentation (Swagger, ReDoc)

Quick start

  • Run the following command to create your new Django app:
npm install -g imagine && imagine create -f django -n myapp 

If you don't have npm installed, you'll need to install this first.


  • You should see this:
$ npm install -g imagine && imagine create -f django -n myapp 

changed 214 packages, and audited 215 packages in 5s
....
found 0 vulnerabilities
32 files written
You have successfully created a new project!
Now you can run "cd myapp && imagine run" to install the dependencies and open a web server running at
http://127.0.0.1:8000/

  • Run cd myapp && imagine run to run your new Django app, and open http://127.0.0.1:8000/ to see that the install worked successfully.

  • Congrats! Your Django app is up and running!

  • Now that you've created your new app, check out the myapp.im in your app directory - using this you can:

    • easily change your app settings such as Django server, package manager, API format, database etc.
    • generate code for data models, CRUD APIs etc using our simple config spec.
  • Continue reading to learn more, or check out www.imagine.ai.


Learn more

Easy to create

  • Our one-line command allows your to get started with your Django app immediately, without worrying about installing dependencies - we take care of those, so you can focusing on writing business logic.

  • Our default settings when we create your Django app are as follows:

    • Server: dev
    • Package manager: pipenv
    • Django models layout: single-file
    • Project directory name: microservice
    • API format: REST
    • Database: sqlite3
    • Database name: myapp-db
  • These aren't the exact settings you want? No sweat, you can always change the settings as per your preferences - read on to see how to do this.


Easy to customize

  • If you want to change any of the above defaults for your app, its a piece of cake.

  • Go to the myapp.im file in your directory, your should see the basic default settings here:


settings

app:
    # your application name
    name: myapp
    # choose one: [django, node]
    framework: django

django:
    # choose one: [pipenv, poetry, virtualenv]
    package-manager: pipenv
    # choose one: [gunicorn, uwsgi, dev]
    server: dev

    layout:
        # choose one: [single-file, separate-files]
        models: single-file
        # name of the project settings directory:
        project-dir: microservice

api:
    # choose one: [rest, graphql]
    format: rest

end settings

# database <database-name> <database type: [sqlite, mysql, posgresql]>
database myapp-db sqlite3

  • You can replace the default settings with your preferences (based on the options allowed), and then run imagine compile myapp.im in your terminal. Your app will be updated with the new settings.

Easy to add app functionality

  • Not only can you change your app settings easily, you can also generated production-ready code using the myapp.im file.

  • Use Imagine's simple syntax to generate code for data models and CRUD APIs to your Django app.

  • Run imagine compile myapp.im to see the generated code.

  • PS - all our generated code has:

    • unit tests and test coverage reporting
    • autogenerated test factories (using FactoryBoy)
    • linting and code formatting (you can select autopep8 or isort)
    • autogenerated API documentation (using Swagger and ReDoc)
  • PPS - in this repository, we have included an example to-do app that we created and generated using the todoapp.im file. You can check out the todoapp.im file that we used to create the Django app and express the specifications for the data models and APIs, as well as all the Django code files that are generated when you run imagine compile todoapp.im.

  • Have fun! 💛

You might also like...
This is a Django app that uses numerous Google APIs such as reCAPTURE, maps and waypoints

Django project that uses Googles APIs to auto populate fields, display maps and routes for multiple waypoints

Strawberry-django-plus - Enhanced Strawberry GraphQL integration with Django

strawberry-django-plus Enhanced Strawberry integration with Django. Built on top

Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project

Django URL Shortener Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project Install this package to your Dja

Code coverage measurement for Python
Code coverage measurement for Python

Coverage.py Code coverage testing for Python. Coverage.py measures code coverage, typically during test execution. It uses the code analysis tools and

pytest-django allows you to test your Django project/applications with the pytest testing tool.

pytest-django allows you to test your Django project/applications with the pytest testing tool.

Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.
Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.

Cookiecutter Django Powered by Cookiecutter, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. Documentati

Django-shared-app-isolated-databases-example - Django - Shared App & Isolated Databases
Django-shared-app-isolated-databases-example - Django - Shared App & Isolated Databases

Django - Shared App & Isolated Databases An app that demonstrates the implementa

This a Django TODO app project and practiced how to deploy  and publish the project to Heroku
This a Django TODO app project and practiced how to deploy and publish the project to Heroku

ToDo App Demo | Project Table of Contents Overview Built With Features How to use Acknowledgements Contact Overview Built With HTML CSS JS Django How

Notes-Django: an advanced project to save notes in Django. where users are able to Create, Read, Update and Delete their notes.
Notes-Django: an advanced project to save notes in Django. where users are able to Create, Read, Update and Delete their notes.

An advanced software to keep you notes. It allows users to perform CRUD operations on theirs Notes. Was implemented Authorization and Authentication

Comments
  • Hi! how I can see the demo?

    Hi! how I can see the demo?

    (newspaper) [email protected]:~/Desktop/learn-django/django-app$ imagine demo django-app › Error: › › SE000045 => Your object API "album-api-fetch-update" has an › update action, so you have to specify a primary key and at › least one field.. At django-app:104:1 › 104 ┃ API album-api-fetch-update { › 105 ┃ model Album › 106 ┃ actions [Read,ReadMany,Update] › 107 ┃ permissions [permission-1] › 108 ┃ filter [name,num_stars] › 109 ┃ data [name,songs] › 110 ┃ }

    opened by peteralexandercharles 3
Releases(v0.6.0)
  • v0.6.0(Mar 4, 2021)

    The Imagine Create Django App 0.6 is an alpha release with several new features, including support for testing across multiple operating systems and Python versions!

    Thanks to all the contributors who worked so hard on this release! 🙌

    Source code(tar.gz)
    Source code(zip)
Domain-driven e-commerce for Django

Domain-driven e-commerce for Django Oscar is an e-commerce framework for Django designed for building domain-driven sites. It is structured such that

Oscar 5.6k Jan 01, 2023
Django-discord-bot - Framework for creating Discord bots using Django

django-discord-bot Framework for creating Discord bots using Django Uses ASGI fo

Jamie Bliss 1 Mar 04, 2022
Add a help desk or knowledge base to your Django project with only a few lines of boilerplate code.

This project is no longer maintained. If you are interested in taking over the project, email Zapier 487 Dec 06, 2022

System checks for your project's environment.

django-version-checks System checks for your project's environment. Requirements Python 3.6 to 3.9 supported. Django 2.2 to 3.2 supported. Are your te

Adam Johnson 33 Dec 22, 2022
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Django Countries A Django application that provides country choices for use with forms, flag icons static files, and a country field for models. Insta

Chris Beaven 1.2k Jan 07, 2023
A blog app powered by python-django

Django_BlogApp This is a blog app powered by python-django Features Add and delete blog post View someone else blog Can add comment to that blog And o

Manish Jalui 1 Sep 12, 2022
Book search Django web project that uses requests python library and openlibrary API.

Book Search API Developer: Vladimir Vojtenko Book search Django web project that uses requests python library and openlibrary API. #requests #openlibr

1 Dec 08, 2021
Phoenix LiveView but for Django

Reactor, a LiveView library for Django Reactor enables you to do something similar to Phoenix framework LiveView using Django Channels. What's in the

Eddy Ernesto del Valle Pino 526 Jan 02, 2023
DCM is a set of tools that helps you to keep your data in your Django Models consistent.

Django Consistency Model DCM is a set of tools that helps you to keep your data in your Django Models consistent. Motivation You have a lot of legacy

Occipital 59 Dec 21, 2022
Analytics services for Django projects

django-analytical The django-analytical application integrates analytics services into a Django project. Using an analytics service with a Django proj

Jazzband 1.1k Dec 31, 2022
Django-Text-to-HTML-converter - The simple Text to HTML Converter using Django framework

Django-Text-to-HTML-converter This is the simple Text to HTML Converter using Dj

Nikit Singh Kanyal 6 Oct 09, 2022
A Django app to initialize Sentry client for your Django applications

Dj_sentry This Django application intialize Sentry SDK to your Django application. How to install You can install this packaging by using: pip install

Gandi 1 Dec 09, 2021
A small and lightweight imageboard written with Django

Yuu A small and lightweight imageboard written with Django. What are the requirements? Python 3.7.x PostgreSQL 14.x Redis 5.x FFmpeg 4.x Why? I don't

mint.lgbt 1 Oct 30, 2021
Django + AWS Elastic Transcoder

Django Elastic Transcoder django-elastic-transcoder is an Django app, let you integrate AWS Elastic Transcoder in Django easily. What is provided in t

StreetVoice 66 Dec 14, 2022
Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS)

django-cors-headers A Django App that adds Cross-Origin Resource Sharing (CORS) headers to responses. This allows in-browser requests to your Django a

Adam Johnson 4.8k Jan 03, 2023
A better and faster multiple selection widget with suggestions

django-searchable-select A better and faster multiple selection widget with suggestions for Django This project is looking for maintainers! Please ope

Andrew Dunai 105 Oct 22, 2022
A simple Django middleware for Duo V4 2-factor authentication.

django-duo-universal-auth A lightweight middleware application that adds a layer on top of any number of existing authentication backends, enabling 2F

Adam Angle 1 Jan 10, 2022
Custom Django field for using enumerations of named constants

django-enumfield Provides an enumeration Django model field (using IntegerField) with reusable enums and transition validation. Installation Currently

5 Monkeys 195 Dec 20, 2022
Template for Django Project Using Docker

You want a Django project who use Docker and Docker-compose for Development and for Production ? It's for you !

1 Dec 17, 2021
A Django app that creates automatic web UIs for Python scripts.

Wooey is a simple web interface to run command line Python scripts. Think of it as an easy way to get your scripts up on the web for routine data anal

Wooey 1.9k Jan 08, 2023