skillfed

flask-cloudflared

Start a TryCloudflare Tunnel from your flask app.

flask-cloudflared v0.0.15 98.1K downloads/30d#13,103 on PyPI43
Permissive license AGING released

What it is and what it does

flask-cloudflared wraps a Flask application with a decorator that automatically starts a Cloudflare TryCloudflare tunnel, making your local Flask app accessible via a public URL without manual tunnel setup. It depends on Flask, requests, and tqdm, and runs your app on port 5000 by default while starting a metrics page on a random port between 8100 and 9000. You can retrieve the tunnel URL programmatically and customize the port, metrics port, and tunnel domain through function arguments.

The package is designed for rapid prototyping, testing, and sharing—scenarios where you need a temporary public endpoint without infrastructure setup. It abstracts away the Cloudflare tunnel CLI, letting you manage tunneling directly from Python code. For persistent or custom domains, you can pass a tunnel ID or config path to use your own Cloudflare tunnel configuration.

Use it for:

  • Quickly share a local Flask development server with teammates or external users without deploying to production.
  • Test webhooks or third-party integrations that require a public URL pointing to your local machine.
  • Demonstrate a Flask prototype or MVP to stakeholders without setting up hosting infrastructure.
  • Debug issues in a live-like environment by exposing your local app to the internet temporarily.
  • Set up automated testing or CI/CD workflows that need a public endpoint for callback validation.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Starts a Cloudflare TryCloudflare tunnel for a Flask app, exposing it to the internet with a public URL without manual configuration.

Yes, if you need rapid, zero-configuration tunneling for Flask development and testing. The low install friction, permissive license, and straightforward decorator API make it a practical choice for prototyping and temporary sharing. The aging maintenance status and small community (43 stars) mean it is not a long-term production solution, but it is reliable for its intended use case of quick local-to-public exposure.

Install

flask-cloudflared on PyPI

pip

pip install flask-cloudflared

uv

uv add flask-cloudflared

poetry

poetry add flask-cloudflared

Installing flask-cloudflared

Before you install

Low install friction with three lightweight runtime dependencies. Last commit was 2026-01-27 and the repository is active, though the project shows aging maintenance signals with infrequent updates.

License in practice

Licensed under Apache Software License (permissive), which allows commercial and private use with minimal restrictions.

Quickstart

pip install flask-cloudflared

from flask import Flask
from flask_cloudflared import run_with_cloudflared, get_cloudflared_url

app = Flask(__name__)

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

@run_with_cloudflared
def run():
    app.run()

if __name__ == '__main__':
    run()
    print(get_cloudflared_url())

Requires Python 3.6 or later and a working Cloudflare TryCloudflare service connection.

Verify before relying

  • Whether the package works reliably with Python versions beyond 3.6, given the classifier specifies only 3.6 support
  • Current status of Cloudflare's TryCloudflare service and whether it remains stable for production-like use cases

Package facts

License not declared (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 3 — Flask, requests, tqdm
Maintenance aging — 199 days since the last release
Last repo commit
First released
Downloads 98,133/month — #13,103 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: flask_cloudflared-0.0.15-py3-none-any.whl

Keywords: flask, cloudflared

License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.6

Tags

cloudflare tunnel flaskexpose flask app publiclytrycloudflare integrationflask ngrok alternativetemporary public url flaskcloudflared decoratorflask tunneling
tunnelingdevelopment-toolcloudflare

More Dynamic Content packages