Giter VIP home page Giter VIP logo

python-data-analysis-django-kit's Introduction

Python Data Analysis Starter Kit

Introduction

Really Simple starter kit to kick off a small project.

You can simply start any project by...

  1. git clone <your_directory>
  2. virtualenv --python= <your_directory>
  3. source bin/activate to enable virtualenv
  4. pip install -r requirements.txt
  5. python manage.py runserver to start django

What have done

  • sample1 app
$ django-admin startapp sample1
  • plus simple JSON endpoint /sample1
urlpatterns = [
    path('', views.index, name='index'),
    path('ping', views.ping, name='ping'), # return pong
    path('hi/<name>/<old>', views.hi, name='hi'), # path variable
    path('hello', views.hello, name='hello'), # request param
    path('body', views.body, name='body'), # request body
    path('foo/list', views.getFooList, name="foo_list") # simple end point with Foo instance list
]

Local WSGI

  • uwsgi

From the project directory (not sampleapp/ !!!)

$ uwsgi --ini mysite.ini
  • nginx
$ sudo ln -s /path/to/your/mysite/mysite_nginx.conf /etc/nginx/sites-enabled/

Dockerized WSGI

Docker image is built on top of tiangolo/uwsgi-nginx:python3.5.

Simply build and run a docker image from Dockerfile.

  1. Building a docker image.
$ docker build -t <image>:<tag> . 
  1. Run the image.
$ docker run -d -p <hostport>:<containerport> <image>:<tag>
  1. After then, try request to localhost:<hostport>

Included package

  • Django==2.1.2
  • numpy==1.15.3
  • scipy==1.1.0
  • matplotlib==3.0.1
  • uWSGI==2.0.17.1
  • mysql-connector-python==8.0.13

python-data-analysis-django-kit's People

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.