Questions tagged [flask-script]

61 questions
1
vote
2 answers

why math.ceil return a integer in flask shell command?

ENV: python: 2.7.5 flask = 0.12.2 flask-cors = 2.0.1 flask-script = 2.0.5 start a python shell: $ python Python 2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2 Type "help", "copyright", "credits" or…
pangpang
  • 8,581
  • 11
  • 60
  • 96
1
vote
1 answer

Why is Cassandra hanging when I connect to it via Gunicorn and Flask?

I have a Flask app that connects to Cassandra. When I run this app under Gunicorn and invoke Gunicorn as a flask-script command python manage.py gunicorn, it hangs. But when I run this same app on the command line as gunicorn manage:app, it…
agtsai
  • 726
  • 1
  • 5
  • 10
1
vote
1 answer

Run multiple different flask apps with manage.py (flask-script)

I have a Flask app set up so it can run two different sites (the sites share businesslogic and database models, so they use the same back end). One is just the regular website, the other is a site that runs tasks (it's a web interface for shooting…
Erik Oosterwaal
  • 4,272
  • 3
  • 44
  • 64
1
vote
1 answer

Change Flask config after app creation

I am using Livereload + Flask + Flask SOcketIO + Flask Script. The problem is that SocketIO needs a gevent-socketio server. Which is all livereload is not. Do not get me wrong, I do not want to solve this issue. I only run livereload to do some…
CESCO
  • 7,305
  • 8
  • 51
  • 83
1
vote
1 answer

Flask-script add a command and an option

I want to have a boolean flag and an option that n arguments for my command. Desired example usage: python manage.py my_command --all # Execute my_command with all id's python manage.py my_command --ids id1 id2 id3 ... # Execute my_command with n…
goodcow
  • 4,495
  • 6
  • 33
  • 52
1
vote
1 answer

Troubles with MySQL, SQLAlchemy, Flask, and flask.ext.script -- create_all() doesn't create tables

I am not able to create tables when I do the following in my virtualenv: (plasma) $ python checkup_web.py shell > from app import db > db.create_all() There is no error message thrown at all. Here's the structure of my…
darksigma
  • 313
  • 5
  • 14
1
vote
1 answer

Interaction with Flask's app from within Flask-Script

I have a flask app running, I want something what can interacts with it. Let me explain it with the next example: Flask app: from flask import Flask MyApp = Flask(__name__) mytext = "Hello World!" @app.route('/') def hello_world(): return…
KennyPowers
  • 4,925
  • 8
  • 36
  • 51
1
vote
1 answer

Nose main() with no arguments produces odd behavior

I have a Flask app and I am using Flask-Script and Flask-Testing. Basically I have a manage.py file that looks like this: from flask.ext.script import Manager from app import app, db manager = Manager(app) @manager.command def test(): import…
linkyndy
  • 17,038
  • 20
  • 114
  • 194
0
votes
1 answer

Upgrade or migrate only single schema using Flask-Migrate(Alembic)

I have a multi-schema DB structure.I am using Flask-Migrate, Flask-Script and alembic to manage migrations.Is there a way to upgrade and perform migrations for only one single schema? Thank you
0
votes
1 answer

VScode Debugger Not Working with Flask-Script Commad

I have a command created with flask-script and I want to debug it with VSCode debugger. But when I run the VScode Debugger configured for Flask, it simply executes the command without stopping at the breakpoint. But, when I specify breakpoint() in…
Aadarsha
  • 176
  • 1
  • 13
0
votes
1 answer

Flask-migrate change db before upgrade

I have a multi-tenancy structure set up where each client has a schema set up for them. The structure mirrors the "parent" schema, so any migration that happens needs to happen for each schema identically. I am using Flask-Script with Flask-Migrate…
0
votes
1 answer

I couldn't create tables with SQLAlchemy on Flask

Hello I am triying to create database and their tables with SQLAlchemy, in order to do this I have the following code and structure: . ├── api │   ├── api.py │   ├── config.py │   ├── connector.py │   ├── detector │   │   ├── __init__.py │   │   └──…
Tlaloc-ES
  • 4,825
  • 7
  • 38
  • 84
0
votes
1 answer

Structuring your Flask project the right way (no Blueprint)

Intro I've read like a thousand posts on SO and other sites trying to figure out what's wrong with my Flask structure and why I can't seem to figure out something. As a last resort, I decided to finally ask the question here. My project is really…
0
votes
0 answers

What should I do to connect to an already running flask instance using flask-script and click inside a terminal in ubuntu

I want to be able to connect to an already running instance of a flask application inside ubuntu terminal. I've tried flask-script and click, but the problem is when I execute the "flask shell" command, it starts a new instance of the application…
0
votes
1 answer

How can I know the args passed to flask_script's Manager

I have a flask application, in one of its script commands I want to know what's the args passed to the Manager (not the command itself), how can I do that? $ cat manage.py #!/usr/bin/env python from flask import Flask from flask_script import…
vts
  • 871
  • 3
  • 10
  • 21