Skip to main content

Create-Flask-App Trello PRs Welcome

Flask port of create-react-app that is used for initializing project structure of your next application.

Create Flask app works on macOS, Windows and Linux. If something doesn't wrong, please file an issue. If you have questions, suggestions or need help, please ask in our Discord community.

Quick overview

pip install createflaskapp
create-flask-app my-app
cd my-app
# activate venv
python run.py

(use correct version of pip and python according to your OS and python install) Then open http://localhost:5000 to see your app. When you are ready to deploy to production, set environment variable PRODUCTION to True on your server of choice, clone the project onto your server and spin it up.

Creating an app

You'll need to have Python 3.6 or higher on your local development machine (but it's not required on the server). To create a new app, you can run :

bash

create-flask-app my-app 

python

python -m create-flask-app my-app

It will create a directory called my-app inside the current folder. Inside that directory, it will generate the initial project structure :

my-app/
├──venv
├── app
│   ├── __init__.py     
│   ├── config.py       
│   ├── errors
│   │   ├── __init__.py 
│   │   └── handlers.py 
│   ├── home
│   │   ├── __init__.py 
│   │   └── routes.py   
│   ├── static
│   │   └── css
│   │       └── main.css
│   └── templates     
│       ├── about.html
│       ├── base.html 
│       ├── error.html
│       └── home.html 
├── requirements.txt  
└── run.py

No complicated configuration or folder structures, only the files you need to build and deploy your app. Once the installation is done, you can open your project folder:

cd my-app

Inside the newly created project, you can run some commands:

source venv/bin/activate or .\venv\Scripts\activate

Activates the virutal environment required for the project dependency isolation.

Read more about venv.

pip install -r requirements.txt

Installs libraries and dependencies listed in requirements.txt in active environment.

python run.py

Starts the app in development mode. Open http://localhost:5000 to view it in browser.

The page will automatically reload if you make changes to the code. You will see errors in app reload or startup in the console.

How to Update to New Versions?

Create-Flask-App can be simply upgraded using pip:

pip install createflaskapp --upgrade
# or
pip install createflaskapp -U

What's Included?

Your environment after installing everything from requirements.txt will have everything you need to build simple but modern Flask app:

  • Isolated Python environment with fully functional pip.
  • Flask, lightweight WSGI web application framework.
  • A live development server that warns about errors and exceptions.
  • Jinja template engine that is very fast and has very similar syntax to python.
  • Click, composable command line interface toolkit.

Check out this guide for an overview of how these tools fit toghether.

Release files for createflaskapp 1.2

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

Source distribution (sdist)

Source distribution for createflaskapp 1.2
File Size Uploaded
createflaskapp-1.2.tar.gz 10.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for createflaskapp 1.2
File Interpreter ABI Platform
createflaskapp-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 29.5 kB

Release files / createflaskapp-1.2.tar.gz

Download URL createflaskapp-1.2.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
503cec143de66a2ea267defab115f7fc70a941739dfc3dad2af6594780672876
BLAKE2b-256 checksum
How to use checksums
892ed84e937d76f0a5ea8c22cf63f821b4f5184aa5a4df68122b134359e0e2b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.9

Release files / createflaskapp-1.2-py3-none-any.whl

Download URL createflaskapp-1.2-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1b1f6e2cce6baed911789428414093a969811072691408a18bee30659b7bee7
BLAKE2b-256 checksum
How to use checksums
4e3a02b33f5186e48b93815d3854880b10958bc2debfb87612b1f4952ca3f3b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

1.1

2 release files

1.0

1 release file

0.1

2 release files

0.0.2

2 release files

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