Turn your phone into a remote control for Python functions!
Send interactive notifications with buttons that execute Python functions on your computer from anywhere in the world. Perfect for home automation, server management, or any remote control needs.
- 📱 Interactive Notifications - Send Yes/No buttons that execute functions
- 🌐 Global Access - Works from anywhere using ngrok tunnels
- 🔧 Easy Setup - Simple decorator syntax and .env configuration
- 🛡️ Secure - HTTPS tunnels and unique webhook URLs
- ⚡ Real-time - Instant execution and result feedback
- 🎯 Zero Config - Works out of the box with sensible defaults
- Install dependencies:
pip install -r requirements.txt- Configure (optional):
# Copy the example config
cp env.example .env
# Edit .env with your settings
NTFY_TOPIC=my-remote-control
NGROK_TOKEN=your_ngrok_token_here # Get from https://ngrok.com- Create your remote functions:
# example.py
from ngrok_webhook import NgrokWebhookManager
manager = NgrokWebhookManager("my-topic")
@manager.webhook_function(description="Say hello")
def hello():
print("🎉 Hello from your phone!")
return "Hello executed successfully!"
@manager.webhook_function(description="Check system status")
def system_status():
import platform
return f"System: {platform.system()} - All OK!"
# Start everything
manager.run_server()- Run and use:
python example.py
# Check your phone for notifications with buttons!- 📱 You get a notification on your phone with action buttons
- 👆 You tap a button (like "Yes, execute")
- 🌐 Webhook triggers via secure ngrok tunnel
- 🔥 Function executes on your computer
- 📲 You get results back as another notification
Perfect for:
- 🏠 Home automation - Control lights, temperature, security
- 🖥️ Server management - Restart services, check status
- 📊 Monitoring - Get system stats, disk usage, uptime
- 🔧 Remote tasks - Backups, updates, maintenance
The system uses .env files for easy configuration:
# .env file
NTFY_TOPIC=my-remote-control
NGROK_TOKEN=your_token_here
WEBHOOK_PORT=8000
USE_NGROK=true
# For private ntfy servers
NTFY_BASE_URL=https://your-ntfy-server.com
NTFY_ACCESS_TOKEN=your_access_token# Main example (recommended)
python example.py
# Setup wizard for first-time users
python setup_ngrok.pyExplore the /examples folder for specific use cases:
# Basic concepts
python examples/basic_hello_world.py
# Home automation & IoT
python examples/home_automation.py
# Server management & DevOps
python examples/server_management.py
# Development workflow
python examples/development_tools.py
# Personal productivity
python examples/personal_assistant.pySee examples/README.md for detailed descriptions.
- 📱 Interactive notifications with executable buttons
- 🌐 Global access via secure ngrok tunnels
- 🔧 Easy setup with .env configuration
- ⚡ Real-time execution and result feedback
- 🛡️ Secure webhooks with unique URLs per function
Perfect for turning your phone into a remote control for any Python script! 🎮
- 📖 Ntfy.sh docs: https://docs.ntfy.sh/
- 🌐 Ngrok: https://ngrok.com/
- 🔧 Get started: Run
python example.pyand check your phone!