A command line interface in Flask achieved through a click package integration.
Questions tagged [flask-cli]
22 questions
0
votes
1 answer
Why running flask application using python instead of Flask-CLI produces ImportError?
When I run my application using flask-cli, the app starts normally.
I set HOST and PORT env variables and run it like:
flask run --host ${HOST} --port ${PORT} --no-reload --no-debugger
PROBLEM:
When I run it like python3.6 main.py, I get some…

Dinko Pehar
- 5,454
- 4
- 23
- 57
0
votes
1 answer
Dockerfile cannot run manage.py on Windows 10
Here is my Dockerfile:
# base image
FROM python:3.7.2-alpine
# set working directory
WORKDIR /usr/src/app
# add and install requirements
COPY ./requirements.txt /usr/src/app/requirements.txt
RUN pip install -r requirements.txt
# add app
COPY .…

Terence
- 652
- 11
- 34
0
votes
1 answer
Execute Flask CLI command only if app in development mode
I integrated Flask-Migrate into my project. When I'm using development mode (FLASK_ENV='development') I would normally call flask db migrate to apply changes to SQLite database. But, in testing mode (FLASK_ENV='testing') I'm using internal memory…

devaerial
- 2,069
- 3
- 19
- 33
0
votes
0 answers
Flask app doesn't open in browser while using flask cli
I wrote flask web which I was testing by running the server like ‘python src/run.py’
Now recently I decided to use flask cli approach.
So I did ‘export FLASK_APP=src/run.py‘
then ‘flask run‘ it work starts web app at 5000 by default but nothing…

Ciasto piekarz
- 7,853
- 18
- 101
- 197
0
votes
1 answer
Flask app.errorhandler not catching exceptions when running with Flask-CLI
I am struggling to get my Flask application to properly handle errors when invoking the application using Flask-CLI.
Here is a simple file called app_runner.py:
import click
from flask import Flask
from flask_cli import FlaskCLI
app =…

Mason Stricklin
- 167
- 1
- 9
0
votes
1 answer
flask cli can't locate the script manage.py
my flask app is a package named app located at /Users/gexinjie/Codes/MyProject/xinnjie_blog
the file tree is like this
xinnjie_blog
├── app
| ├── __init__.py
│ ├── config.py
│ ├── exceptions.py
│ ├── model.py
│ ├── model_sqlalchemy.py
│ …

xinnjie
- 672
- 5
- 12
-1
votes
1 answer
Use of `create_app` parameter inside FlaskGroup
I have flask application which uses application factory pattern to instantiate flask application. I am trying to integrate Flask CLI command line to my flask app.
Can any one help me in understanding the use of create_app parameter inside…

madhu sudhan
- 177
- 1
- 14