Skip to main content

Start a TryCloudflare Tunnel from your flask app.

Project description

flask-cloudflared

PyPI - Downloads Run it button

Start a TryCloudflare tunnel to your flask app right from code.
This requires at least Python 3.6

Behavior

The Flask app will run on port 5000 by default and start the Cloudflared metrics page on a random port between 8100 and 9000.
This can be changed by passing the port and metrics_port arguments to the app.run() function after using the run_with_cloudflared decorator. Using get_cloudflared_url the tunnel URL can be returned.

Custom tunnel domain

By default, the tunnel will be created with a random subdomain of trycloudflare.com.
To use custom domains, follow this tutorial by Cloudflare and pass either the tunnel_id or config_path arguments to the app.run() function after using the run_with_cloudflared decorator. For an example check out examples/flask_cloudflared_example.py.

Acknowledgements

This project is based on flask-ngrok.

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_cloudflared-0.0.15.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

flask_cloudflared-0.0.15-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file flask_cloudflared-0.0.15.tar.gz.

File metadata

  • Download URL: flask_cloudflared-0.0.15.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for flask_cloudflared-0.0.15.tar.gz
Algorithm Hash digest
SHA256 241a892f8e871280e7ac84d11911e2d38a26a0910f9c3ad0b85d66fe090670f5
MD5 05b6ad3ef67ac4a18acf1854d94a4f89
BLAKE2b-256 e7db178c4dbe5cd06534fd2930b4cbd0b40b427c91934d3e19a5c222d6d7ee50

See more details on using hashes here.

File details

Details for the file flask_cloudflared-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: flask_cloudflared-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for flask_cloudflared-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 03703581367367ae239d0c3a457f7969020926fb95db4ce60ced002651b9b385
MD5 b4139d3fac5dc3e9962c77c3a2473403
BLAKE2b-256 4d8ec216518a6cd057663de7b29832713eaf5129f56b0e10ffe96d9e5b7e5314

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