--- id: pyngrok version: "8.1.2" license: MIT license_treatment: permissive maintenance: active --- # pyngrok — A Python wrapper for ngrok License: permissive · Maintenance: active · Downloads: 2.8M/mo ## What it is and what it does pyngrok is a Python wrapper around ngrok, a reverse proxy that creates secure tunnels from public URLs to services running on localhost. It manages the ngrok binary automatically, so you don't need to download or configure it separately. You can use it either through a Python API (calling `ngrok.connect()` to open tunnels and get public URLs) or directly from the command line (the ngrok binary is placed on your PATH). The package supports both ngrok v2 and v3 APIs, handles tunnel configuration through Python kwargs or ngrok config files, and provides access to ngrok's local agent API for advanced operations like reserving domains or creating cloud endpoints. It's designed for rapid development workflows—testing webhooks, demoing local websites, enabling SSH access—as well as production use cases like traffic policies and load balancing. Use it for: - Test webhook integrations locally by exposing your development server to external services without deploying. - Demo a local web application to stakeholders or clients by sharing a public ngrok URL. - Enable SSH or other protocol access to a machine behind a firewall or NAT. - Set up end-to-end testing that requires external services to reach your test server. - Create temporary public ingress to internal networks or devices for development or debugging. - Build production APIs with traffic policies, OAuth, or load balancing using ngrok's cloud endpoints. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyngrok wraps the ngrok reverse-proxy binary and exposes it through a Python API, allowing you to programmatically open secure tunnels from public URLs to localhost. Yes. pyngrok is mature, actively maintained, has no known vulnerabilities, and installs with minimal friction. It solves a real problem—making ngrok accessible from Python without manual binary management—and is well-suited for both development and production use. The single dependency (PyYAML) is lightweight and widely trusted. ## Install pip install pyngrok uv add pyngrok poetry add pyngrok ## Installing pyngrok Before you install: Low friction: pure Python wheel with a single runtime dependency (PyYAML). The package is actively maintained with a recent release and no known vulnerabilities. License in practice: MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects. Quickstart: pip install pyngrok from pyngrok import ngrok # Open a HTTP tunnel on the default port 80 http_tunnel = ngrok.connect() print(http_tunnel.public_url) The ngrok binary is downloaded and managed automatically on first use; internet connectivity is required for tunnel operation. Verify before relying: - Whether the ngrok binary download happens at install time or at first tunnel creation. - Storage location and size of the downloaded ngrok binary on disk. - Whether PyYAML is used for ngrok config file parsing or for other internal purposes. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ngrok python wrapper, reverse proxy tunnel localhost, expose local server publicly, webhook testing tunneling, secure tunnel public url, ngrok api python, local development tunneling, tunneling, webhook-testing, local-development [View on SkillFed](https://skillfed.io/packages/pyngrok) · [View on PyPI](https://pypi.org/project/pyngrok/)