Skip to main content

Package for initializing a flask project structure

Project description

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.

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

createflaskapp-0.0.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

createflaskapp-0.0.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file createflaskapp-0.0.2.tar.gz.

File metadata

  • Download URL: createflaskapp-0.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.1

File hashes

Hashes for createflaskapp-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f3561131f78457ee93a32ba907f424a99f659e19ed95eec7d7f2d643effb5e98
MD5 8e9cc9bd585320fdd0f7a99d0e99fd1f
BLAKE2b-256 b11edd1848bb8115bb14918e848935f4cd4323dae33a309e178e2cd2fb04df6a

See more details on using hashes here.

File details

Details for the file createflaskapp-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: createflaskapp-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.1

File hashes

Hashes for createflaskapp-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5726245e68df214e816667cb22d9a4362affb4d409e0ad2a8b5321855853f3b5
MD5 d58f34c1611c3f2f00f2767dd2233da2
BLAKE2b-256 a45ae942b44e8a110c0c3a650cbdc73d1c90457dc6b5281c59c9ff42bf670009

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page