Start a TryCloudflare Tunnel from your flask app.
Project description
flask-cloudflared
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
241a892f8e871280e7ac84d11911e2d38a26a0910f9c3ad0b85d66fe090670f5
|
|
| MD5 |
05b6ad3ef67ac4a18acf1854d94a4f89
|
|
| BLAKE2b-256 |
e7db178c4dbe5cd06534fd2930b4cbd0b40b427c91934d3e19a5c222d6d7ee50
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03703581367367ae239d0c3a457f7969020926fb95db4ce60ced002651b9b385
|
|
| MD5 |
b4139d3fac5dc3e9962c77c3a2473403
|
|
| BLAKE2b-256 |
4d8ec216518a6cd057663de7b29832713eaf5129f56b0e10ffe96d9e5b7e5314
|