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)
An API was build with Django to store and retrieve information about various musical instruments.

The project is meant to be a starting point, an experimentation or a basic example of a way to develop an API with Django. It is an exercise on using Django and various python technologies and design

Kostas Ziovas 2 Dec 25, 2021
Simple yet powerful and really extendable application for managing a blog within your Django Web site.

Django Blog Zinnia Simple yet powerful and really extendable application for managing a blog within your Django Web site. Zinnia has been made for pub

Julien Fache 2.1k Dec 24, 2022
Django CacheMiddleware has a multi-threading issue with pylibmc

django-pylibmc-bug Django CacheMiddleware has a multi-threading issue with pylibmc. CacheMiddleware shares a thread-unsafe cache object with many thre

Iuri de Silvio 1 Oct 19, 2022
django social media app with real time features

django-social-media django social media app with these features: signup, login and old registered users are saved by cookies posts, comments, replies,

8 Apr 30, 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 Dec 31, 2022
Django admin CKEditor integration.

Django CKEditor NOTICE: django-ckeditor 5 has backward incompatible code moves against 4.5.1. File upload support has been moved to ckeditor_uploader.

2.2k Dec 31, 2022
File and Image Management Application for django

Django Filer django Filer is a file management application for django that makes handling of files and images a breeze. Contributing This is a an open

django CMS Association 1.6k Dec 28, 2022
Buckshot++ is a new algorithm that finds highly stable clusters efficiently.

Buckshot++: An Outlier-Resistant and Scalable Clustering Algorithm. (Inspired by the Buckshot Algorithm.) Here, we introduce a new algorithm, which we

John Jung 1 Jul 02, 2022
A fresh approach to autocomplete implementations, specially for Django.

A fresh approach to autocomplete implementations, specially for Django. Status: v3 stable, 2.x.x stable, 1.x.x deprecated. Please DO regularely ping us with your link at #yourlabs IRC channel

YourLabs 1.6k Dec 22, 2022
Loguru is an exceeding easy way to do logging in Python

Django Easy Logging Easy Django logging with Loguru Loguru is an exceeding easy way to do logging in Python. django-easy-logging makes it exceedingly

Neutron Sync 8 Oct 17, 2022
Hello world written in Django.

Learning Django 💡 create a virtual environment create python -m venv ./venv. this virtualenv file will be excluded by .gitignore activate the virtual

Dipak giri 4 Nov 26, 2021
A set of high-level abstractions for Django forms

django-formtools Django's "formtools" is a set of high-level abstractions for Django forms. Currently for form previews and multi-step forms. This cod

Jazzband 621 Dec 30, 2022
A web app which allows user to query the weather info of any place in the world

weather-app This is a web app which allows user to get the weather info of any place in the world as soon as possible. It makes use of OpenWeatherMap

Oladipo Adesiyan 3 Sep 20, 2021
Bootstrap 4 integration with Django.

django-bootstrap 4 Bootstrap 4 integration for Django. Goal The goal of this project is to seamlessly blend Django and Bootstrap 4. Requirements Pytho

Zostera B.V. 980 Dec 29, 2022
Duckiter will Automatically dockerize your Django projects.

Duckiter Duckiter will Automatically dockerize your Django projects. Requirements : - python version : python version 3.6 or upper version - OS :

soroush safari 23 Sep 16, 2021
Simpliest django(uvicorn)+postgresql+nginx docker-compose (ready for production and dev)

simpliest django(uvicorn)+postgresql+nginx docker-compose (ready for production and dev) To run in production: docker-compose up -d Site available on

Artyom Lisovskii 1 Dec 16, 2021
A multiprocessing distributed task queue for Django

A multiprocessing distributed task queue for Django Features Multiprocessing worker pool Asynchronous tasks Scheduled, cron and repeated tasks Signed

Ilan Steemers 1.7k Jan 03, 2023
Automated image processing for Django. Currently v4.0

ImageKit is a Django app for processing images. Need a thumbnail? A black-and-white version of a user-uploaded image? ImageKit will make them for you.

Matthew Dapena-Tretter 2.1k Dec 17, 2022
Let AngularJS play well with Django

django-angular Let Django play well with AngularJS What does it offer? Add AngularJS directives to Django Forms. This allows to handle client side for

Jacob Rief 1.2k Dec 27, 2022
Django StatusPage - App to display statuspage for your services

Django StatusPage - App to display statuspage for your services

Gorlik 1 Oct 27, 2021