Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Production ready django based starter kit

License

NotificationsYou must be signed in to change notification settings

SystangoTechnologies/DjangoUnboxed

Repository files navigation

enter image description here

DjangoUnboxed

Production ready django based starter kit application.

With collaborative efforts from the CTO office, we have prepared this Django Boilerplate. This boilerplate is aimed to be generic in a way that it solves most of the common problems that are faced in development process, specific to Python-Django development. Moreover it also has the best practices followed in web app development catering the microservice architecture.

Technology

  • Django 3
  • Django Rest Framework
  • Fully Dockerised Setup (configuration driven)
  • Smart Logging (DB, Requests)
  • Elastic Solutions (FileBeat, MetricBeat and HeartBeat)
  • Celery
  • Rabbit MQ
  • JWT
  • Unit tests
  • Swagger

Description

  • Django :- We have opted for Django, as we wanted to have a strongframework and complete ORM solution since we are planning to go withPython and with SQL based database
  • Django Rest Framework :- We opted for DRF as this is the bestsolution available for REST APIs for Python.
  • Fully Dockerised Setup :- Docker has become an integral part of thesetup these days. All the settings are yml driven and areconfigurable as per the business need. One can easily turn off/onconfigurations/services via this.
  • Smart Logging and EK :- We have integrated customized loggerinterface, tracking DB Logs, Request Logs and App Logs with our ownhand tailored logger implementation that enables us to predict fromthe logs if the application is going to face issues/problems.Moreover we have integrated the EK stack in this that enables us toharness great analytical and searching tool Kibana. Basically theboilerplate is designed to transfer all the logs on Kibana, this ishappening via Filebeat. All the logs can then be queried andanalytics can be drawn from them.
  • System Monitoring :- We have included integration of MetricBeat andHeartBeat, they are efficient solutions to monitor system levels andvitals.
  • Celery :- The most preferred delayed task runner when handlingasynchronous tasks with django applications. Very robust & easy tointegrate.
  • Rabbit MQ :- When working with microservices, the quintessentialrequirement is of inter service communication, this where messagebroker comes into picture. Since we need to avoid the synchronousdependencies of the REST communication. Hence we have provisioneddedicated pub/sub configurations that constantly monitor the RabbitMQ and execute tasks in asynchronous way.
  • JWT :- The reason why we selected JWT is that, it is used is to provethat the sent data was actually created by an authentic source andthis is the most widely used mechanism while communication ishappening over REST APIs.
  • Unit Test :- We have included the unit tests in such a way that theAPIs are stubbed and there is no incorporation of Databases, thusavoiding the overheads related with Databases. Since we aim to havepure unit tests hence we have provisioned stubbed methods for unittests.
  • Swagger :- Though for REST APIs we can get a good document availablevia Django REST Framework, but that is limited in some ways likepublishing. We selected swagger, so that APIs can be published and betested externally.

Application Structure

|____boilerplate| |____config|____boilerplate_app| |____migrations|____compose|____publisher_subscriber|____requirements

Running the server locally

  • Clone this repo
  • Install python3.10
  • Intall dependencies:

pip install -r requirements.txt

  • Run the server:

python manage.py runserver


Docker Setup

Create master_app.log file inside root directory

docker-compose build

docker-compose up

  • To check the server, openhttp://localhost:8000/

Contributors

Rishabh Shah

License

This project is licensed under the terms of the MIT license.

About

Production ready django based starter kit

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp