Tunneling tool
Project description
Pinggy
Official Python SDK for Pinggy — expose a local server
to the public internet through a managed tunnel. Wraps the native
libpinggy library with a small, ergonomic API.
Supports HTTP, TCP, TLS, TLS-over-TCP, and UDP tunnels with multi-port forwarding, authentication, header rewriting, a built-in web debugger, and auto-reconnect.
Installation
pip install pinggy
Wheels for Linux, macOS, and Windows bundle the native libpinggy library
— no extra setup required. Python 3.6+.
Quick start
import pinggy
tunnel = pinggy.start_tunnel(forwardto="localhost:8080")
print("Public URLs:", tunnel.urls)
tunnel.wait() # block until the tunnel ends
start_tunnel() runs the tunnel in a background thread and blocks until
the tunnel is established (so tunnel.urls is populated) or raises
RuntimeError if it fails to start.
For a TCP tunnel, an authenticated tunnel, or any other configuration, pass the relevant kwargs:
tunnel = pinggy.start_tunnel(
forwardto="localhost:22",
type="tcp",
token="your_token_here",
)
Reacting to events
Either subclass BaseTunnelHandler:
class MyHandler(pinggy.BaseTunnelHandler):
def tunnel_established(self, urls):
print("Tunnel up:", urls)
def disconnected(self, msg):
print("Disconnected:", msg)
tunnel = pinggy.start_tunnel(forwardto=8080, eventclass=MyHandler)
tunnel.wait()
…or register callbacks directly on the tunnel:
import pinggy
tunnel = pinggy.Tunnel()
tunnel.add_forwarding("localhost:8080")
tunnel.on_tunnel_established = lambda urls: print("Tunnel up:", urls)
tunnel.on_disconnected = lambda msg: print("Disconnected:", msg)
tunnel.start(thread=True)
tunnel.wait()
Documentation
- API reference —
API_DOC.md - Pinggy product docs — https://pinggy.io/docs
- Changelog —
CHANGELOG.md - Source / issues — https://github.com/Pinggy-io/sdk-python
License
Apache 2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pinggy-0.2.0-cp36-abi3-win_arm64.whl.
File metadata
- Download URL: pinggy-0.2.0-cp36-abi3-win_arm64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.6+, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cfe7096845628efeb388a27f602ec37aaee77382c8dbfb468b3f58dd99846d3
|
|
| MD5 |
3527ea1fc9c5449dac99627687b7c584
|
|
| BLAKE2b-256 |
f70c3c621c1d9452b8094fab07c45a2cb001c46d130d107621971a89b18bae12
|
File details
Details for the file pinggy-0.2.0-cp36-abi3-win_amd64.whl.
File metadata
- Download URL: pinggy-0.2.0-cp36-abi3-win_amd64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.6+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b791e6282ed3d93323dd2f1353874dfeb01929d781fc46a592c79279d262363b
|
|
| MD5 |
bda3787385dba5c916133f5bb77a760a
|
|
| BLAKE2b-256 |
54d4ec6a2549761042ed76e422947502ca8f939b0b5f436b2c854d06c48b3acf
|
File details
Details for the file pinggy-0.2.0-cp36-abi3-win32.whl.
File metadata
- Download URL: pinggy-0.2.0-cp36-abi3-win32.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.6+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac1153dbeb9fdb736c62e0ee4ddf00aeb04e6739af802356f2fa2267057e9bf4
|
|
| MD5 |
da2a3ce6a8d0fdf4523352e9be3e2187
|
|
| BLAKE2b-256 |
0188aefb2ee6a24081718136f85fc063e03cdaf6dfe4675d831ae783471531ec
|
File details
Details for the file pinggy-0.2.0-cp36-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pinggy-0.2.0-cp36-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.6+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
377a1437d3945c8f6ed360a327cfaa8977b9730f2d97c04817ce2d51900075a2
|
|
| MD5 |
10230f9b4dec64a5a8845a70c2f9c2dd
|
|
| BLAKE2b-256 |
fe3e6c4ada4d5d8f671d8744aed7a3fb143eb8c9283b50240bdc7f2b22c3f5a4
|
File details
Details for the file pinggy-0.2.0-cp36-abi3-manylinux_2_28_i686.whl.
File metadata
- Download URL: pinggy-0.2.0-cp36-abi3-manylinux_2_28_i686.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.6+, manylinux: glibc 2.28+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
561676d687e8652d914de3e3767ca7cac6490e76b93210bc8a41d2b6c13d61ea
|
|
| MD5 |
c17e56e55b7db6896f5a8dd7da322d61
|
|
| BLAKE2b-256 |
23108b3cb4167c4748c039eecb70767e678475eed1fda9992df14e5c17407ba9
|
File details
Details for the file pinggy-0.2.0-cp36-abi3-manylinux_2_28_armv7l.whl.
File metadata
- Download URL: pinggy-0.2.0-cp36-abi3-manylinux_2_28_armv7l.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.6+, manylinux: glibc 2.28+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
255821245ad26eea0c6bc2d88b94d640192299af560d395e7faee1fc506bbce1
|
|
| MD5 |
823c61ed98d59187a276fe356a2d1ea2
|
|
| BLAKE2b-256 |
bc8e0c2623aef3055d89b4d7905d016ec6e9a319b170215af0b1561e237624f5
|
File details
Details for the file pinggy-0.2.0-cp36-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pinggy-0.2.0-cp36-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 7.0 MB
- Tags: CPython 3.6+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e1d25726f60313a1552b2cc19a2ca694656f9761b794dd7dc2b31d096508dfd
|
|
| MD5 |
6014dccc3e825c28e4c756abb3f6f376
|
|
| BLAKE2b-256 |
a54e85bf969930c1901986fdce304156a25d1d3754a014dcc5bbf2283ec0047a
|
File details
Details for the file pinggy-0.2.0-cp36-abi3-macosx_11_0_universal2.whl.
File metadata
- Download URL: pinggy-0.2.0-cp36-abi3-macosx_11_0_universal2.whl
- Upload date:
- Size: 10.8 MB
- Tags: CPython 3.6+, macOS 11.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6736435e7748ee711edc706d7ac07755c3fb6099fe723ba3939c4d3ec502b0e
|
|
| MD5 |
08150925565c43e35680261b2361ab39
|
|
| BLAKE2b-256 |
c484e93e2eb230ee65aca3d21ae2ddec0215cd55f746add8acaceb4904f053ca
|