Skip to main content

A simple command line tool for bootstrapping flask applications.

Project description

~work in progress~

Flask-Batteries

An opinionated command line tool for bootstrapping Flask applications with less boiler-plate code.

Inspired by Ruby on Rails.

Installing

This has not been deployed to PYPI yet, as it is still under active development.

To install, clone the repo and install using pip

git clone git@github.com:graydenshand/flask_batteries.git
pip install ./flask_batteries # path to source code

Usage

Currently there are just two commands:

flask_batteries new <name>
flask_batteries destroy <name>

The new command creates a Flask app in a new directory with the specified name.

The destroy command will recursively erase a directory with the specified name. Be careful with this, as it will erase any directory you specify without checking to make sure it's actually a Flask-Batteries project.

Tests

Tests are run with tox against python 3.9.

From the root directory of the project, simply call:

tox

Roadmap

  • Finish building the basic template. Add SQLAlchemy (Flask-SQLAlchemy) + Alembic (Flask-Migrate).
  • Extend Flask's CLI with a set of commands for quickly generating and destroying assets. E.g. flask g route login might generate a view function, map it to a url, generate a template, and generate a test.
  • Add an install command for installing common flask extensions.
  • Add an --api option to the new command to install Flask-Restful and Marshmallow and generate a blueprint for API resources.
  • Add an --spa option to the new command to set up a Node JS project and generate a "catch all" client blueprint for rendering a JS Single Page Application (SPA). Possibly integrate with create-react-app and/or Vue's hello world example.
  • Add a --websocket option to the new command to install Flask-SocketIO and use its event loop instead of standard flask server.
  • Add a --skip-db option to the new command to not install SQLAlchemy.
  • Implement a flexible uploads system that can be configured to work with multiple back ends
  • ...and more

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask-batteries-0.0.0.tar.gz (44.8 kB view hashes)

Uploaded Source

Built Distribution

flask_batteries-0.0.0-py3-none-any.whl (58.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page