Skip to main content

Command line wrapper to run a named Flask script inside a Gunicorn server

Project description

flask-gunicorn-cmd

Command line wrapper to run a named Flask script inside a Gunicorn server.

This project is used in ContainDS Dashboards, which is a user-friendly way to launch Jupyter notebooks as shareable dashboards inside JupyterHub. Also works with Streamlit and other visualization frameworks.

Install and Run

Install using pip.

pip install flask-gunicorn-cmd

The file to start is specified on the command line, for example:

flask-gunicorn-cmd ~/Dev/myflaskscript.py

By default the server will listen on port 8888, importing the Flask app named 'app', or locating the first app.Flask object that it can find otherwise.

To specify a different port, use the --port flag.

To explicitly specify the name of your Flask app, use the --server-name flag.

flask-gunicorn-cmd --server-name=app --port=8888 --workers=4 ~/Dev/myflaskscript.py

To run directly in python: python -m flask_gunicorn_cmd.main <rest of command line>

Changelog

  • v0.0.6 Change CWD to script's folder, and also add that folder to the Python search path.

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-gunicorn-cmd-0.0.6.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

flask_gunicorn_cmd-0.0.6-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file flask-gunicorn-cmd-0.0.6.tar.gz.

File metadata

  • Download URL: flask-gunicorn-cmd-0.0.6.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.7

File hashes

Hashes for flask-gunicorn-cmd-0.0.6.tar.gz
Algorithm Hash digest
SHA256 54ac00822b14c19c994e1f7e60584ab5d98fddfd9d09eba3c2e845bb266d564b
MD5 b7f9947d85358e007b4db1af73d29025
BLAKE2b-256 ae2e81f0645e04707ce9090abd3458ea56ec658637541b70e8c1e65ebfe438d7

See more details on using hashes here.

File details

Details for the file flask_gunicorn_cmd-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: flask_gunicorn_cmd-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.7

File hashes

Hashes for flask_gunicorn_cmd-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4779a708c51e2dccf5e90c631e36475c9f6560bd27fa8b8922b743676011d347
MD5 308b9eb40e5faa68a653b0023ffd1436
BLAKE2b-256 1e938f70c984150bf1e2221df5ae516f1f3e5af284df65b8a53f9d900ad81c69

See more details on using hashes here.

Supported by

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