Skip to main content

A custom CLI command to create a new Flask app with a basic structure, creates virtual environment and installs requirements

Project description

flask-make

flask-make is a Python package that helps you quickly set up a new Flask project with a predefined directory structure. This CLI tool creates the app folder, a virtual environment, installs Flask, and generates an organized directory structure for you, including templates, static files, and configuration files.

Features

  • Automated Project Setup: Sets up a new Flask app with a standard directory structure.
  • Virtual Environment Creation: Automatically creates and activates a virtual environment in the project directory.
  • Dependency Installation: Installs Flask and generates a requirements.txt file with installed dependencies.
  • Structured Template: Comes with organized folders for static files, templates, configuration, and the main app file, ready for development.

Installation

To install flask-make, simply use pip:

pip install flask-make

Usage

Once installed, you can create a new Flask app by running the flask-make command in your terminal:

flask-make <app-name>

Replace <app-name> with the desired name of your new Flask project folder.

Example

flask-make my_flask_app

This will:

  1. Create a folder named my_flask_app.

  2. Set up a virtual environment within my_flask_app/venv.

  3. Install Flask in the virtual environment.

  4. Generate a requirements.txt file listing installed packages.

  5. Create a structured directory layout:

    my_flask_app/
    ├── app.py
    ├── config.py
    ├── requirements.txt
    ├── static/
    │   ├── css/
    │   ├── js/
    │   └── img/
    ├── templates/
    │   └── index.html
    └── venv/
    
  6. Display instructions to activate the virtual environment.

Activating the Virtual Environment

After creating the project, activate the virtual environment:

On Windows

cd my_flask_app
venv\Scripts\activate

On macOS/Linux

cd my_flask_app
source venv/bin/activate

License

This project is licensed under the MIT License.

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

flask_make-1.0.6.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

flask_make-1.0.6-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file flask_make-1.0.6.tar.gz.

File metadata

  • Download URL: flask_make-1.0.6.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for flask_make-1.0.6.tar.gz
Algorithm Hash digest
SHA256 363411c42653bf1a0e01672eac017c0d037978c45e22cc89a4402e376e11ef6f
MD5 6e8ea0307a265f4c09b0a0b2231ded68
BLAKE2b-256 b94233f7142b542c3260d1bae092f2004ea90d877f8704722265d4ec742fbf93

See more details on using hashes here.

File details

Details for the file flask_make-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: flask_make-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for flask_make-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2755bf222500a70b5cfc1bd4d46ab1333bb592beabb7c487e27ad0c14a2229f8
MD5 99507f4d71e87c6d3f48eb21982887b7
BLAKE2b-256 d184207027b6928abb280af7cf3f8f7683ffe415d17ef99208c2e343eedee808

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