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.

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.

Users on Apple Silicon

Because cloudflared doesn't support Darwin arm64 natively yet, Rosetta 2 is used to create a compatibility layer. If you don't have Rosetta 2 installed yet, please check Apple's support page.

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.14.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

flask_cloudflared-0.0.14-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flask_cloudflared-0.0.14.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for flask_cloudflared-0.0.14.tar.gz
Algorithm Hash digest
SHA256 be88151714f306d042923c6996332de39519c24a1914692547d92789d098912a
MD5 049b641720d7e6f490df2dca07ad005b
BLAKE2b-256 49cfd01e9f44c042bb77194c83d00bc98bcf1cd8ff24cdf686191d8d57b8d4dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flask_cloudflared-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 abd11c16030d5c68f91cf64efaecdebf09ab0dce10db43333aaebc790569bdbf
MD5 05b96a0f13ec124508997c0932a03962
BLAKE2b-256 f9e0d90aa747ae35adfcd6fa116936b1eb42a6e5d8c69419694862476cefd34b

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