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 details)

Uploaded Source

Built Distribution

template_flask-3.3-py3-none-any.whl (288.9 kB view details)

Uploaded Python 3

File details

Details for the file template_flask-3.3.tar.gz.

File metadata

  • Download URL: template_flask-3.3.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for template_flask-3.3.tar.gz
Algorithm Hash digest
SHA256 c4daf65e4de1cbb218c6141fe5324f810319e7ed5d36c3ae31e6380589a399c7
MD5 18e4ec2c59b5352ef4d76dd1821139f6
BLAKE2b-256 bf1feb3d8a5f5fbf6bbd32b2e4b3aeda5f99400ac9b2e9a287f766386edfa8ac

See more details on using hashes here.

File details

Details for the file template_flask-3.3-py3-none-any.whl.

File metadata

  • Download URL: template_flask-3.3-py3-none-any.whl
  • Upload date:
  • Size: 288.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for template_flask-3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 10ce73aaf50c2cd5fe33ca7d16f85fd3054668da328cb0f40dd7716bca6e3c1d
MD5 156f284383eb9ae5df7a249b4b77a247
BLAKE2b-256 d38a7b9483b5d36cd88bf497649a4568cdbf1e212c85cd217a7f9310e8aa671c

See more details on using hashes here.

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