New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

flaredantic

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flaredantic

A Python library for creating free Cloudflare tunnels with ease

  • 0.1.2
  • Source
  • PyPI
  • Socket score

Maintainers
1

Flaredantic Logo

Flaredantic

PyPI version Python Versions License Monthly Downloads

Flaredantic is a Python library that simplifies the process of creating Cloudflare tunnels, making it easy to expose your local services to the internet. It's designed to be a user-friendly alternative to ngrok, localtunnel, and similar services, leveraging Cloudflare's robust infrastructure.

🌟 Features

  • 🔌 Zero-configuration tunnels
  • 🔒 Secure HTTPS endpoints
  • 🚀 Easy-to-use Python API
  • 💻 Command-line interface (CLI)
  • 📦 Automatic binary management
  • 🎯 Cross-platform support (Windows, macOS, Linux)
  • 🔄 Context manager support
  • 📊 Download progress tracking
  • 📝 Detailed logging with verbose mode

🎯 Why Flaredantic?

While tools like ngrok are great, Cloudflare tunnels offer several advantages:

  • Free and unlimited tunnels
  • Better stability and performance
  • Cloudflare's security features
  • No rate limiting

Flaredantic makes it dead simple to use Cloudflare tunnels in your Python projects!

🚀 Installation

pip install flaredantic

After installation, you can use either the CLI command flare or the Python API.

📖 Quick Start

Command Line Usage

The simplest way to create a tunnel is using the CLI:

# Basic usage - expose port 8080 with verbose output
flare --port 8080 -v

CLI Options:

-p, --port     Local port to expose (required)
-t, --timeout  Tunnel start timeout in seconds (default: 30)
-v, --verbose  Show detailed progress output

Python API Usage

Basic Usage
from flaredantic import FlareTunnel, FlareConfig

# Create a tunnel for your local server running on port 8000
config = FlareConfig(port=8080)
with FlareTunnel(config) as tunnel:
    print(f"Your service is available at: {tunnel.tunnel_url}")
    # Your application code here
    input("Press Enter to stop the tunnel...")

Custom Configuration

from flaredantic import FlareTunnel, FlareConfig
from pathlib import Path

# Configure tunnel with custom settings
config = FlareConfig(
    port=8080,
    bin_dir=Path.home() / ".my-tunnels",
    timeout=60,
    verbose=True  # Enable detailed logging
)

# Create and start tunnel
with FlareTunnel(config) as tunnel:
    print(f"Access your service at: {tunnel.tunnel_url}")
    input("Press Enter to stop the tunnel...")

Flask Application

from flask import Flask
from flaredantic import FlareTunnel, FlareConfig
import threading

app = Flask(__name__)

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

def run_tunnel():
    config = FlareConfig(
        port=5000,
        verbose=True  # Enable logging for debugging
    )
    with FlareTunnel(config) as tunnel:
        print(f"Flask app available at: {tunnel.tunnel_url}")
        app.run(port=5000)

if __name__ == '__main__':
    threading.Thread(target=run_tunnel).start()

⚙️ Configuration Options

OptionTypeDefaultDescription
portintRequiredLocal port to expose
bin_dirPath~/.flaredanticDirectory for cloudflared binary
timeoutint30Tunnel start timeout in seconds
verboseboolFalseShow detailed progress and debug output

📚 More Examples

For more detailed examples and use cases, check out more examples.

  • HTTP Server example
  • Django integration
  • FastAPI application
  • Flask application
  • Custom configuration
  • Error handling
  • Development vs Production setup

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc