<div align="center">

# `Flaredantic`
[](https://badge.fury.io/py/flaredantic)
[](https://pypi.org/project/flaredantic/)
[](https://opensource.org/licenses/Apache-2.0)
[](https://pepy.tech/project/flaredantic)
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.
</div>
## 🌟 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)
- 📱 Android support via Termux
- 🔄 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
```bash
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:
```bash
# 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
```python
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
```python
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
```python
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
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| port | int | Required | Local port to expose |
| bin_dir | Path | ~/.flaredantic | Directory for cloudflared binary |
| timeout | int | 30 | Tunnel start timeout in seconds |
| verbose | bool | False | Show detailed progress and debug output |
## 📚 More Examples
For more detailed examples and use cases, check out more [examples](docs/examples/Examples.md).
- HTTP Server example
- Django integration
- FastAPI application
- Flask application
- Custom configuration
- Error handling
- Development vs Production setup
---
Raw data
{
"_id": null,
"home_page": "https://github.com/linuztx/flaredantic",
"name": "flaredantic",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "cloudflare tunnel development networking proxy",
"author": "linuztx",
"author_email": "linuztx@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/5e/6e/679ea3022facaa046e20875608b975c58ea55e9de1474c0a9ace7f9469bf/flaredantic-0.1.3.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n\n\n# `Flaredantic`\n\n[](https://badge.fury.io/py/flaredantic)\n[](https://pypi.org/project/flaredantic/)\n[](https://opensource.org/licenses/Apache-2.0)\n[](https://pepy.tech/project/flaredantic)\n\nFlaredantic 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.\n\n</div>\n\n## \ud83c\udf1f Features\n\n- \ud83d\udd0c Zero-configuration tunnels\n- \ud83d\udd12 Secure HTTPS endpoints\n- \ud83d\ude80 Easy-to-use Python API\n- \ud83d\udcbb Command-line interface (CLI)\n- \ud83d\udce6 Automatic binary management\n- \ud83c\udfaf Cross-platform support (Windows, macOS, Linux)\n- \ud83d\udcf1 Android support via Termux\n- \ud83d\udd04 Context manager support\n- \ud83d\udcca Download progress tracking\n- \ud83d\udcdd Detailed logging with verbose mode\n\n## \ud83c\udfaf Why Flaredantic?\n\nWhile tools like ngrok are great, Cloudflare tunnels offer several advantages:\n- Free and unlimited tunnels\n- Better stability and performance\n- Cloudflare's security features\n- No rate limiting\n\nFlaredantic makes it dead simple to use Cloudflare tunnels in your Python projects!\n\n## \ud83d\ude80 Installation\n\n```bash\npip install flaredantic\n```\n\nAfter installation, you can use either the CLI command `flare` or the Python API.\n\n## \ud83d\udcd6 Quick Start\n\n### Command Line Usage\n\nThe simplest way to create a tunnel is using the CLI:\n\n```bash\n# Basic usage - expose port 8080 with verbose output\nflare --port 8080 -v\n```\n\nCLI Options:\n```\n-p, --port Local port to expose (required)\n-t, --timeout Tunnel start timeout in seconds (default: 30)\n-v, --verbose Show detailed progress output\n```\n\n### Python API Usage\n\n#### Basic Usage\n\n```python\nfrom flaredantic import FlareTunnel, FlareConfig\n\n# Create a tunnel for your local server running on port 8000\nconfig = FlareConfig(port=8080)\nwith FlareTunnel(config) as tunnel:\n print(f\"Your service is available at: {tunnel.tunnel_url}\")\n # Your application code here\n input(\"Press Enter to stop the tunnel...\")\n```\n\n### Custom Configuration\n\n```python\nfrom flaredantic import FlareTunnel, FlareConfig\nfrom pathlib import Path\n\n# Configure tunnel with custom settings\nconfig = FlareConfig(\n port=8080,\n bin_dir=Path.home() / \".my-tunnels\",\n timeout=60,\n verbose=True # Enable detailed logging\n)\n\n# Create and start tunnel\nwith FlareTunnel(config) as tunnel:\n print(f\"Access your service at: {tunnel.tunnel_url}\")\n input(\"Press Enter to stop the tunnel...\")\n```\n\n### Flask Application\n```python\nfrom flask import Flask\nfrom flaredantic import FlareTunnel, FlareConfig\nimport threading\n\napp = Flask(__name__)\n\n@app.route('/')\ndef hello():\n return 'Hello, World!'\n\ndef run_tunnel():\n config = FlareConfig(\n port=5000,\n verbose=True # Enable logging for debugging\n )\n with FlareTunnel(config) as tunnel:\n print(f\"Flask app available at: {tunnel.tunnel_url}\")\n app.run(port=5000)\n\nif __name__ == '__main__':\n threading.Thread(target=run_tunnel).start()\n```\n\n## \u2699\ufe0f Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| port | int | Required | Local port to expose |\n| bin_dir | Path | ~/.flaredantic | Directory for cloudflared binary |\n| timeout | int | 30 | Tunnel start timeout in seconds |\n| verbose | bool | False | Show detailed progress and debug output |\n\n## \ud83d\udcda More Examples\n\nFor more detailed examples and use cases, check out more [examples](docs/examples/Examples.md).\n- HTTP Server example\n- Django integration\n- FastAPI application\n- Flask application\n- Custom configuration\n- Error handling\n- Development vs Production setup\n\n---\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python library for creating free Cloudflare tunnels with ease",
"version": "0.1.3",
"project_urls": {
"Bug Reports": "https://github.com/linuztx/flaredantic/issues",
"Homepage": "https://github.com/linuztx/flaredantic",
"Source": "https://github.com/linuztx/flaredantic"
},
"split_keywords": [
"cloudflare",
"tunnel",
"development",
"networking",
"proxy"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e578e0a6b12fab801d73b06d7327967d47ee7f3f968cdde7f41140c320c9d1d3",
"md5": "1241bd23c494c1c6df1d80aaa2405986",
"sha256": "de5e87bc9d965ea28d30ae7d2c56e84ba8e162655e885768bb585975e4197658"
},
"downloads": -1,
"filename": "flaredantic-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1241bd23c494c1c6df1d80aaa2405986",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 16134,
"upload_time": "2025-02-18T01:33:21",
"upload_time_iso_8601": "2025-02-18T01:33:21.571547Z",
"url": "https://files.pythonhosted.org/packages/e5/78/e0a6b12fab801d73b06d7327967d47ee7f3f968cdde7f41140c320c9d1d3/flaredantic-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5e6e679ea3022facaa046e20875608b975c58ea55e9de1474c0a9ace7f9469bf",
"md5": "72ee3c86d6ba0ac8931bc86edf20ef48",
"sha256": "d36746858be4adb14afd88b9c4e3fdcdb471d1e9140718a46faa70ad322fc324"
},
"downloads": -1,
"filename": "flaredantic-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "72ee3c86d6ba0ac8931bc86edf20ef48",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 14343,
"upload_time": "2025-02-18T01:33:23",
"upload_time_iso_8601": "2025-02-18T01:33:23.265747Z",
"url": "https://files.pythonhosted.org/packages/5e/6e/679ea3022facaa046e20875608b975c58ea55e9de1474c0a9ace7f9469bf/flaredantic-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-18 01:33:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "linuztx",
"github_project": "flaredantic",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
">=",
"2.25.0"
],
[
"<",
"3.0.0"
]
]
},
{
"name": "tqdm",
"specs": [
[
">=",
"4.50.0"
],
[
"<",
"5.0.0"
]
]
}
],
"lcname": "flaredantic"
}