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)
The uncompromising Python code formatter

The Uncompromising Code Formatter “Any color you like.” Black is the uncompromising Python code formatter. By using it, you agree to cede control over

Python Software Foundation 30.7k Jan 03, 2023
TinyApp - A Python (Django) Full Stack Application for shortening URLs

TinyApp A Python (Django) Full Stack Application for shortening URLs. How to sta

Li Deng 1 Jan 23, 2022
An extremely fast JavaScript and CSS bundler and minifier

Website | Getting started | Documentation | Plugins | FAQ Why? Our current build tools for the web are 10-100x slower than they could be: The main goa

Evan Wallace 34.2k Jan 04, 2023
Forward and backwards compatibility layer for Django 1.4, 1.7, 1.8, 1.9, 1.10, and 1.11

django-compat Forward and backwards compatibility layer for Django 1.4 , 1.7 , 1.8, 1.9, 1.10 and 1.11 Consider django-compat as an experiment based o

arteria GmbH 106 Mar 28, 2022
django app that allows capture application metrics by each user individually

Django User Metrics django app that allows capture application metrics by each user individually, so after you can generate reports with aggregation o

Reiner Marquez 42 Apr 28, 2022
A handy tool for generating Django-based backend projects without coding. On the other hand, it is a code generator of the Django framework.

Django Sage Painless The django-sage-painless is a valuable package based on Django Web Framework & Django Rest Framework for high-level and rapid web

sageteam 51 Sep 15, 2022
Django CRUD REST API Generator

Django CRUD REST API Generator This is a simple tool that generates a Django REST API with the given models. Specs: Authentication, DRF generic views,

Mehmet Alp Sümer 57 Nov 24, 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
Django REST Client API

Django REST Client API Client data provider API.

Ulysses Monteiro 1 Nov 08, 2021
A app for managing lessons with Django

Course Notes A app for managing lessons with Django Some Ideas

Motahhar.Mokfi 6 Jan 28, 2022
Utilities for implementing a modified pre-order traversal tree in django.

django-mptt Utilities for implementing Modified Preorder Tree Traversal with your Django Models and working with trees of Model instances. Project hom

2.7k Jan 01, 2023
Full-featured django project start tool.

django-start-tool Introduction django-start-tool is a full-featured replacement for django-admin startproject which provides cli for creating the same

Georgy Gnezdilov 0 Aug 30, 2022
A UUIDField for Django

django-uuidfield Provides a UUIDField for your Django models. Installation Install it with pip (or easy_install): pip install django-uuidfield Usage

David Cramer 265 Nov 30, 2022
Updates redisearch instance with igdb data used for kimosabe

igdb-pdt Update RediSearch with IGDB games data in the following Format: { "game_slug": { "name": "game_name", "cover": "igdb_coverart_url",

6rotoms 0 Jul 30, 2021
Strawberry-django-plus - Enhanced Strawberry GraphQL integration with Django

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

BLB Ventures 138 Dec 28, 2022
A real-time photo feed using Django and Pusher

BUILD A PHOTO FEED USING DJANGO Here, we will learn about building a photo feed using Django. This is similar to instagram, but a stripped off version

samuel ogundipe 4 Jan 01, 2020
A clone of https://virgool.io written in django

Virgool clone A clone of virgool blog written in django Installation first rename the .env.sample to .env and fill it. with docker docker-compose up -

Danial Selmipoor 7 Dec 23, 2022
APIs for a Chat app. Written with Django Rest framework and Django channels.

ChatAPI APIs for a Chat app. Written with Django Rest framework and Django channels. The documentation for the http end points can be found here This

Victor Aderibigbe 18 Sep 09, 2022
open source online judge based on Vue, Django and Docker

An onlinejudge system based on Python and Vue

Qingdao University(青岛大学) 5.2k Jan 09, 2023
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 Dec 31, 2022