Skip to main content
Latest Version Downloads Per Month Python Versions The MIT License

Flask application generator for boosting your development.

Features

  • Well Defined Project Structure

    • Use factory pattern to generate Flask app.

    • Use Blueprints to organize controllers.

    • Split controllers, models, forms, utilities, assets, Jinja2 pages, Jinja2 macros into different directories.

    • Organize Jinja2 page assets (HTML, JavaScript, CSS) to the same directory.

    • Organize Jinja2 macro assets (HTML, JavaScript, CSS) to the same directory.

    • API-Only Project Structure

  • Batteries Included

    • Use Flask-SQLAlchemy and Flask-Migrate as database tools.

    • Use Searchable-Mixin for search every Models [Optional]

    • Use ActiveRecord-Like-Mixin for search every Models [Optional]

    • Use JWTAuth for authentication [Optional]

    • Use JsonSchema for validate incoming requests [Optional]

    • Use Flask-WTF to validate forms.

    • Use Flask-Security for user management.

    • Use Flask-Dance for social user authentication (Sample with facebook and google).

    • Use Bulma as frontend framework.

    • Dockerfile – Sample dockerfile for development

    • docker-compose.yml – Sample docker-compose for deployment

    • Use Gunicorn to run Flask app and Supervisor to manage Gunicorn processes.

    • Use Fabric as deployment tool.

    • Use Sentry to log exceptions.

    • Use Nginx to serve static files.

    • Use sub script command to generate admin and form from a model.

  • Scaffold Commands

    • Generate project files: turbo new <project>

    • Generate API-only project files: turbo new --api <project>

    • Generate controller files: turbo new controller <controller>

    • Generate action files: turbo new action <controller> <action> [-t]

    • Generate form files: turbo new form <form>

    • Generate model files: turbo new model <model>

    • Generate macro files: turbo new macro <category> <macro> or boost new macro <macro>

Installation

pip install flask-turbo-boost

Development Guide

Init project

turbo new <your_project_name>

Setup backend requirements

cd <your_project_dir>
virtualenv venv
. venv/bin/activate (venv\Scripts\activate in Windows)
pip install -r requirements.txt

Note: if you failed in pip install -r requirements.txt in Windows, try to install package binaries directly:

Init database

Create database with name your_project_name and encoding utf8.

Update SQLALCHEMY_DATABASE_URI in config/development.py as needed.

Then init tables:

flask db upgrade

Run app

Run local server:

flask run

Scaffold commands

turbo new <project>
turbo new --api <project>
turbo new controller <controller>
turbo new action <controller> <action> [-t]
turbo new form <form>
turbo new model <model>
turbo new macro <category> <macro>
turbo new macro <macro>
turbo -v
turbo -h

First Production Deploy

Config server

Install mysql-server, python-virtualenv, git, supervisor, nginx, g++, python-dev, libmysqlclient-dev, libxml2-dev, libxslt-dev on your server.

Install requirements

git clone **.git
cd <your_project_dir>
virtualenv venv
. venv/bin/activate
pip install -r requirements.txt

Config app

Save config/production_sample.py as config/production.py, update configs in config/production.py as needed and transfer it to server.

Note: remember to update SECRET_KEY in config/production.py! You can generate random secret key as follows:

>>> import os
>>> os.urandom(24)

Init database

Create database with name your_project_name and encoding utf8.

And run:

export MODE=PRODUCTION
flask db upgrade

Copy config files

Update project root path as needed in deploy/nginx.conf and deploy/supervisor.conf.

cp deploy/flask_env.sh /etc/profile.d/
cp deploy/nginx.conf /etc/nginx/conf.d/<your_project_name>.conf
cp deploy/supervisor.conf /etc/supervisor/conf.d/<your_project_name>.conf

Start app

service nginx restart
service supervisor restart

Daily Production Deploy

Update HOST_STRING in config with the format user@ip.

Commit your codes and run:

git push && fab deploy

P.S. If you wanna to deploy flask with Apache2, see this post.

License

MIT

Metadata

Release files for Flask-Turbo-Boost 0.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Flask-Turbo-Boost 0.2.8
File Size Uploaded Provenance
Flask-Turbo-Boost-0.2.8.tar.gz 2.0 MB Without provenance Details

Release files / Flask-Turbo-Boost-0.2.8.tar.gz

Download URL Flask-Turbo-Boost-0.2.8.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
b383f185455d1515d0e0bba005f32ffac7d053d716571e69371c690f8a26a5c0
BLAKE2b-256 checksum
How to use checksums
1978d9fbe52f73975cfcc9a04e21775ec57bd7c6ec73f42bbdd796cde03e6186
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.8

Security for Flask-Turbo-Boost 0.2.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page