Skip to main content

A simple way to demo Flask apps from your machine.

Project description

flask-ngrok

PyPI version

A simple way to demo Flask apps from your machine. Makes your Flask apps running on localhost available over the internet via the excellent ngrok tool.

Compatability

Python 3.6+ is required.

Installation

pip install flask-ngrok

Inside Jupyter / Colab Notebooks

Notebooks have an issue with newer versions of Flask, so force an older version if working in these environments.

!pip install flask==0.12.2

Quickstart

  1. Import with from flask_ngrok import run_with_ngrok
  2. Add run_with_ngrok(app) to make your Flask app available upon running
# flask_ngrok_example.py
from flask import Flask
from flask_ngrok import run_with_ngrok

app = Flask(__name__)
run_with_ngrok(app)  # Start ngrok when app is run

@app.route("/")
def hello():
    return "Hello World!"

if __name__ == '__main__':
    app.run()

Running the example:

python flask_ngrok_example.py
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Running on http://<random-address>.ngrok.io
 * Traffic stats available on http://127.0.0.1:4040 

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-ngrok-0.0.18.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

flask_ngrok-0.0.18-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file flask-ngrok-0.0.18.tar.gz.

File metadata

  • Download URL: flask-ngrok-0.0.18.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.4

File hashes

Hashes for flask-ngrok-0.0.18.tar.gz
Algorithm Hash digest
SHA256 a48d79340701d4c94890d1d6647f8b09bd0dce8b40a082635e66b89d62f4c7a5
MD5 1b84c6cd6a11017e449cf1e50942d44d
BLAKE2b-256 70ff1be13dc8158fac23b0473ea96c95d86ed1b9c0307a9a2b6d5e9d02c0e909

See more details on using hashes here.

File details

Details for the file flask_ngrok-0.0.18-py3-none-any.whl.

File metadata

  • Download URL: flask_ngrok-0.0.18-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.4

File hashes

Hashes for flask_ngrok-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 ac9434adbc34900e7e4a82b6c8727ca415ebf882da36ad7baacede5f4784a955
MD5 dbb784e130bf7cffd23aac80d1332383
BLAKE2b-256 c7036978d8b81fa8bcce2f1a86e023de5a61782d706874c65522c5b9ff54f3e9

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