Giter VIP home page Giter VIP logo

annacorobco / django-restful Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trydirect/django-restful

0.0 1.0 0.0 1.36 MB

Django Restful API backend template - project generator/development environment. Can be used by Python developers for quick start on building Restful API's using Django framework and django-rest-framework. This project is aimed to simmplify development environment setup and includes many useful dev tools like RabbitMQ, Redis, Elasticsearch, Kibana, Apidoc

Dockerfile 0.47% Python 2.48% Shell 0.34% CSS 34.48% JavaScript 54.11% HTML 8.11%

django-restful's Introduction

Build Status Python 3.7 Docker Stars Docker Pulls Docker Automated Docker Build Gitter chat

Django Restful API template

Django Restful API backend template - project generator/development environment. Can be used by Python developers for quick start on building Restful API's using Django framework and django-rest-framework. This project is aimed to simmplify development environment setup and includes many useful dev tools like RabbitMQ, Redis, Elasticsearch, Kibana, Apidoc

Stack includes

  • RabbitMQ
  • Redis
  • Elasticsearch
  • Logstash
  • PostgreSQL
  • Nginx
  • Supervisord
  • Kibana
  • Apidoc

Python libraries included:

  • django-rest-framework
  • uwsgi
  • psycopg2

Installation

  1. Clone this project into your work directory:
$ git clone "https://github.com/trydirect/django-restful.git"
  1. Bring up services with docker-compose:
$ cd django-restful/v01/dockerfiles
$ docker-compose up -d
$ docker-compose exec web python manage.py migrate
  1. Now, let's check it out
$ curl -i localhost/users/
HTTP/1.1 200 OK
Server: nginx/1.16.0
Date: Thu, 13 Jun 2019 10:39:46 GMT
Content-Type: application/json
Content-Length: 52
Connection: keep-alive
Vary: Accept, Cookie
Allow: GET, POST, HEAD, OPTIONS
X-Frame-Options: SAMEORIGIN

{"count":0,"next":null,"previous":null,"results":[]}
  1. Let's check running containers
$ docker-compose ps
Name                  Command                          State          Ports
------------------------------------------------------------------------------------------------------------------------------
db                    docker-entrypoint.sh postgres    Up (healthy)   5432/tcp
elasticsearch         /docker-entrypoint.sh elas ...   Up             9200/tcp, 9300/tcp
kibana                /docker-entrypoint.sh kibana     Up             0.0.0.0:5601->5601/tcp
logstash              /docker-entrypoint.sh -e         Up             0.0.0.0:5044->5044/tcp
mq                    docker-entrypoint.sh rabbi ...   Up (healthy)   15671/tcp, 0.0.0.0:21072->15672/tcp, 25672/tcp, 4369/tcp, 5671/tcp, 0.0.0.0:2172->5672/tcp,0.0.0.0:32770->5672/tcp
nginx                 /usr/bin/supervisord -c /e ...   Up             0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
redis                 docker-entrypoint.sh redis ...   Up (healthy)   6379/tcp
web                   /usr/bin/supervisord -c /e ...   Up             0.0.0.0:8000->8000/tcp   
  1. Run tests
$ python ../../tests.py

Generate Api Doc

$ sh ./djangorest/scripts/apidoc.sh

Quick deployment to cloud

Amazon AWS, Digital Ocean, Hetzner and others

Contributing

  1. Fork it (https://github.com/trydirect/django-restful/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Support Development

Donate

django-restful's People

Contributors

vsilent avatar adziubin avatar annaopt avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.