Skip to main content

About

Flask-CLI is a backport of Flask 1.0 new click integration to Flask 0.10. Do not install this package if you use Flask 1.0+.

Installation

Flask-CLI is on PyPI so all you need is:

pip install flask-cli

Usage

Initialize the extension like this:

from flask import Flask
from flask_cli import FlaskCLI
app = Flask('myapp')
FlaskCLI(app)

@app.cli.command()
def mycmd():
    click.echo("Test")

@app.shell_context_processor
def myctx():
    return {'myvar': 'value'}

Import from this library instead of flask.cli:

from flask_cli import FlaskGroup

Documentation

Documentation is readable at http://flask-cli.readthedocs.org or can be build using Sphinx:

pip install Sphinx
python setup.py build_sphinx

Testing

Running the test suite is as simple as:

python setup.py test

Release files for Flask-CLI 0.4.0

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

Source distribution (sdist)

Source distribution for Flask-CLI 0.4.0
File Size Uploaded
Flask-CLI-0.4.0.tar.gz 21.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Flask-CLI 0.4.0
File Interpreter ABI Platform
Flask_CLI-0.4.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 35.1 kB

Release files / Flask-CLI-0.4.0.tar.gz

Download URL Flask-CLI-0.4.0.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6604ab407c0a2f6cdb51e1f64bdb01b8b135d547a0a99189b9158353ded6eeb9
BLAKE2b-256 checksum
How to use checksums
96aa12256c6efd795e4d14a3b22a021ec337b403680ec57127a546c4b72daeb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Flask_CLI-0.4.0-py2.py3-none-any.whl

Download URL Flask_CLI-0.4.0-py2.py3-none-any.whl
Size 13.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
625b534f1bd4d05cbd2084b6b820e2d8cbfea8bc08dd3ee786f365bc0591f1d8
BLAKE2b-256 checksum
How to use checksums
2e6c67a364327f720806ebdd6ff3e98d7f9789971b34477e97ef8e77a0c45056
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

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