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
File details
Details for the file flask-batteries-0.0.0.tar.gz
.
File metadata
- Download URL: flask-batteries-0.0.0.tar.gz
- Upload date:
- Size: 44.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9229cb2388ab368c967a09ed6cca5be2fdd425958a76e2b19582073844121f81 |
|
MD5 | 9d6ee7e99b6efc2cf4f5abc582f56c02 |
|
BLAKE2b-256 | 7ed3c494720d098fe5e9519a00edf92bf5f8e75532882651f97640fe3ae28c23 |
File details
Details for the file flask_batteries-0.0.0-py3-none-any.whl
.
File metadata
- Download URL: flask_batteries-0.0.0-py3-none-any.whl
- Upload date:
- Size: 58.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91d5be178b576a6df01b1b16a2b54fc6c75508587e9ce897049a57be27211ad9 |
|
MD5 | 4867f58254bb8f49326972896e8e318b |
|
BLAKE2b-256 | a7bdf5b39768c629218ce10c4457c459cd744af4dcabe0acc803cef4678ee173 |