Skip to main content

Start a TryCloudflare Tunnel with a context manager.

Project description

Cloudflared Context Manager

Simple context manager to create a Cloudflared tunnel for a localhost port of choice.

Minimal example on how to use this package with Gradio:

import gradio as gr
import cloudflared_tunnel

with gr.Blocks() as demo:
    with gr.Column():
        with gr.Row():
            input_text = gr.Textbox(lines=10, label="Input")
            output_text = gr.Textbox(lines=10, label="Output")
        submit_button = gr.Button(value="Echo")
    submit_button.click(lambda x: x, inputs=input_text, outputs=output_text)

if __name__ == "__main__":
    with cloudflared_tunnel.run() as port:
        demo.launch(show_api=False, server_port=port)

Acknowledgements

This project is derived from flask-cloudflared, which in turn 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

cloudflared_tunnel-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

cloudflared_tunnel-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file cloudflared_tunnel-0.1.0.tar.gz.

File metadata

  • Download URL: cloudflared_tunnel-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for cloudflared_tunnel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 07dd00bd8f87f09031e79855f552c530a66e625c27589eea00545dc24cd8ba79
MD5 ebfc79768f3f461f755687306d732407
BLAKE2b-256 bd2775908adbf1d828923af1f05eb357fe5380a9a827398a4866e4d54faacbbc

See more details on using hashes here.

File details

Details for the file cloudflared_tunnel-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudflared_tunnel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9911f2163b464b1db8610b2baab24c30c45c31ff917a1e46068c3798f6403a8f
MD5 0d76385f0cf17fedcbf11efff9b8d3c3
BLAKE2b-256 ef7d898bcc65b4c2ca3fb1c1c1d365a75e838c99fa14990884de3db3d135434a

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