Skip to main content

Python module for creating a template flask app structure and virtual environment, along with Bootstrap examples

Project description

template-flask

pip install template_flask

from the command line navigate to the directory where you would like to keep your project

type "python -m template_flask" and click enter

enter the name of your project

once completed you will have a basic flask directory structure setup and a virtual environment with these packages installed within it...

atomicwrites attrs blinker click colorama coverage Flask Flask-DebugToolbar Flask-Login Flask-Mail Flask-SQLAlchemy Flask-WTF greenlet gunicorn iniconfig itsdangerous Jinja2 MarkupSafe packaging pluggy py pyparsing pytest pytest-cov SQLAlchemy tomli Werkzeug WTForms

Directory structure <your_app>

--> <your_app>_app (main app module)

--> __init__.py (flask app configuration and imports)

--> config
    --> __init__.py
    --> config.py

--> models
    --> __init__.py
    --> datatypes.py
    --> db.py
    --> other_model.py
    --> user.py

--> routes
    --> __init__.py
    --> routes.py

--> static
    --> css
        --> bootstrap
            --> * all bootstrap example css
    --> img
    --> js
        --> bootstrap
            --> * all bootstrap example js
        fetcher.js

--> templates
    --> bootstrap
        --> * all bootstrap example html
    --> index.html

--> venv --> requirements.txt --> wsgi.py (main flask app entry point) --> Dockerfile --> .dockerignore

Within the templates and static folders that are created, you will find HTML, CSS, and JS for various Bootstrap 5 example if you would like to use them in your project.

To preview the live Bootstrap pages, activate your newly created virtual environment and run the newly created "run.py" file from within your new project directory, open to the index page and click through the buttons.

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

template_flask-3.3.tar.gz (2.3 MB view hashes)

Uploaded Source

Built Distribution

template_flask-3.3-py3-none-any.whl (288.9 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