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 thenew
command to installFlask-Restful
andMarshmallow
and generate a blueprint for API resources. - Add an
--spa
option to thenew
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 withcreate-react-app
and/or Vue's hello world example. - Add a
--websocket
option to thenew
command to installFlask-SocketIO
and use its event loop instead of standard flask server. - Add a
--skip-db
option to thenew
command to not install SQLAlchemy. - Implement a flexible uploads system that can be configured to work with multiple back ends
- ...and more
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for flask_batteries-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91d5be178b576a6df01b1b16a2b54fc6c75508587e9ce897049a57be27211ad9 |
|
MD5 | 4867f58254bb8f49326972896e8e318b |
|
BLAKE2b-256 | a7bdf5b39768c629218ce10c4457c459cd744af4dcabe0acc803cef4678ee173 |