Giter Club home page Giter Club logo

flask-chassis's Introduction

Chassis

Chassis is a "batteries included" boilerplate flask project to use as a quick starting point, especially for REST services.

To see how easy it is to get up and running with Flask and Chassis, check out my 10 minute live coding presentation at the Boston Python group, where I write a backend for a backbone.js TODO app: https://github.com/malicustommade/chassis-backbonetodo

Usage

  • pip install cookiecutter
  • cookiecutter gh:makmanalp/flask-chassis

Features

  • Clean and simple app factory model
  • Self-bootstrapping virtualenv
  • Separate requirements for dev and production, one pinned and the other unpinned
  • Smart Makefile for common tasks
  • Error tracking with Sentry/raven
  • REST-y views with Flask-restful
  • Flask-Cache
  • Flask-DebugToolbar
  • Werkzeug Profiler Middleware
  • Flask-Script ./manage.py with shell already set
  • Flask-SQLAlchemy
  • Tests and coverage with pytest
  • Factories with factory_boy and faker
  • Sphinx docs with flask-style theme
  • sphinxcontrib-httpdomain for REST docs

Usage

Run make dev to run the dev server. It'll install all the dependencies if it has to.

For production, you're looking for runserver.py. The app variable has what you want. Alternatively, the create_app factory could also be used.

Command What it does
`make dev` Run the flask test server in debug mode.
`make test` run pytest with coverage
`make dummy` Generates some dummy data and dumps ids.
`make shell` run an ipython shell where you can play around with objects. The variables `app`, `db` and `models` come preloaded.
`make docs` Builds pretty docs and pops open a browser window
`make clean` Clean up all the generated gunk

Configuration

The /conf/ directory contains configuration files. dev.py is included by default. You pass the CHASSIS_CONFIG="path/to/config.py" environment variable to pick a settings file. It's this way to make sure no one accidentally loads the dev config in production.

Changelog

  • Nothing here yet until release.

flask-chassis's People

Contributors

makmanalp avatar malicustommade avatar sashacm avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

btashton

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.