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.
Metadata
Release files for flask-cloudflared 0.0.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flask_cloudflared-0.0.15.tar.gz | 7.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flask_cloudflared-0.0.15-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.7 kB
Release files / flask_cloudflared-0.0.15.tar.gz
| Download URL | flask_cloudflared-0.0.15.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
241a892f8e871280e7ac84d11911e2d38a26a0910f9c3ad0b85d66fe090670f5
|
|
BLAKE2b-256 checksum How to use checksums |
e7db178c4dbe5cd06534fd2930b4cbd0b40b427c91934d3e19a5c222d6d7ee50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / flask_cloudflared-0.0.15-py3-none-any.whl
| Download URL | flask_cloudflared-0.0.15-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03703581367367ae239d0c3a457f7969020926fb95db4ce60ced002651b9b385
|
|
BLAKE2b-256 checksum How to use checksums |
4d8ec216518a6cd057663de7b29832713eaf5129f56b0e10ffe96d9e5b7e5314
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|