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 pytest framework makes it easy to write small tests, yet scales to support complex functional testing

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries. An example o

pytest-dev 9.6k Jan 06, 2023
A pluggable Django application for integrating PayPal Payments Standard or Payments Pro

Django PayPal Django PayPal is a pluggable application that integrates with PayPal Payments Standard and Payments Pro. See https://django-paypal.readt

Luke Plant 672 Dec 22, 2022
Simple tagging for django

django-taggit This is a Jazzband project. By contributing you agree to abide by the Contributor Code of Conduct and follow the guidelines. django-tagg

Jazzband 3k Jan 02, 2023
MAC address Model Field & Form Field for Django apps

django-macaddress MAC Address model and form fields for Django We use netaddr to parse and validate the MAC address. The tests aren't complete yet. Pa

49 Sep 04, 2022
Store model history and view/revert changes from admin site.

django-simple-history django-simple-history stores Django model state on every create/update/delete. This app supports the following combinations of D

Jazzband 1.8k Jan 06, 2023
Realtime data read and write without page refresh using Ajax in Django.

Realtime read-write with AJAX Hey,this is the basic implementation type of ajax realtime read write from the database. where you can insert or view re

Mehedi Hasan 3 Dec 13, 2022
Easy thumbnails for Django

Easy Thumbnails A powerful, yet easy to implement thumbnailing application for Django 1.11+ Below is a quick summary of usage. For more comprehensive

Chris Beaven 1.3k Dec 30, 2022
Radically simplified static file serving for Python web apps

WhiteNoise Radically simplified static file serving for Python web apps With a couple of lines of config WhiteNoise allows your web app to serve its o

Dave Evans 2.1k Dec 15, 2022
A prettier way to see Django requests while developing

A prettier way to see Django requests while developing

Adam Hill 35 Dec 02, 2022
This website serves as an online database (hosted via SQLLite) for fictional businesses in the area to store contact information (name, email, phone number, etc.) for fictional customers.

Django-Online-Business-Database-Project this project is still in progress Overview of Website This website serves as an online database (hosted via SQ

1 Oct 30, 2021
Send push notifications to mobile devices through GCM or APNS in Django.

django-push-notifications A minimal Django app that implements Device models that can send messages through APNS, FCM/GCM and WNS. The app implements

Jazzband 2k Dec 26, 2022
Django query profiler - one profiler to rule them all. Shows queries, detects N+1 and gives recommendations on how to resolve them

Django Query Profiler This is a query profiler for Django applications, for helping developers answer the question "My Django code/page/API is slow, H

Django Query Profiler 116 Dec 15, 2022
Django Email Sender

Email-Sender Django Email Sender Installation 1.clone Repository & Install Packages git clone https://github.com/telman03/Email-Sender.git pip install

Telman Gadimov 0 Dec 26, 2021
Developer-friendly asynchrony for Django

Django Channels Channels augments Django to bring WebSocket, long-poll HTTP, task offloading and other async support to your code, using familiar Djan

Django 5.5k Jan 06, 2023
Учебное пособие по основам Django и сопутствующим технологиям

Учебный проект для закрепления основ Django Подробный разбор проекта здесь. Инструкция по запуску проекта на своей машине: Скачиваем репозиторий Устан

Stanislav Garanzha 12 Dec 30, 2022
Super simple bar charts for django admin list views visualizing the number of objects based on date_hierarchy using Chart.js.

Super simple bar charts for django admin list views visualizing the number of objects based on date_hierarchy using Chart.js.

foorilla LLC 4 May 18, 2022
A Django app to accept payments from various payment processors via Pluggable backends.

Django-Merchant Django-Merchant is a django application that enables you to use multiple payment processors from a single API. Gateways Following gate

Agiliq 997 Dec 24, 2022
A debug/profiling overlay for Django

Django Debug Toolbar The Django Debug Toolbar is a configurable set of panels that display various debug information about the current request/respons

David Cramer 228 Oct 17, 2022
this is a simple backend for instagram with python and django

simple_instagram_backend this is a simple backend for instagram with python and django it has simple realations and api in 4 diffrent apps: 1-users: a

2 Oct 20, 2021
A task management system created using Django 4.0 and Python 3.8 for a hackathon.

Task Management System A task management app for Projects created using Django v4.0 and Python 3.8 for educational purpose. This project was created d

Harsh Agarwal 1 Dec 12, 2021