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, HAProxy PROXY-protocol support, 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.
Release files for pinggy 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pinggy-0.3.1-cp36-abi3-win_arm64.whl | CPython 3.6 | abi3 | Windows ARM64 | Details |
| pinggy-0.3.1-cp36-abi3-win_amd64.whl | CPython 3.6 | abi3 | Windows x86-64 | Details |
| pinggy-0.3.1-cp36-abi3-win32.whl | CPython 3.6 | abi3 | Windows x86-32 | Details |
| pinggy-0.3.1-cp36-abi3-manylinux_2_28_x86_64.whl | CPython 3.6 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| pinggy-0.3.1-cp36-abi3-manylinux_2_28_i686.whl | CPython 3.6 | abi3 | Linux glibc 2.28+ x86-32 | Details |
| pinggy-0.3.1-cp36-abi3-manylinux_2_28_armv7l.whl | CPython 3.6 | abi3 | Linux glibc 2.28+ ARMv7l | Details |
| pinggy-0.3.1-cp36-abi3-manylinux_2_28_aarch64.whl | CPython 3.6 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| pinggy-0.3.1-cp36-abi3-macosx_11_0_universal2.whl | CPython 3.6 | abi3 | macOS 11.0+ universal2 (ARM64, x86-64) | Details |
Total release size: 48.2 MB
Release files / pinggy-0.3.1-cp36-abi3-win_arm64.whl
| Download URL | pinggy-0.3.1-cp36-abi3-win_arm64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.6 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
50640379a11e407421e1368583cf6243b280036c63683b7b31c812ff8d8e0520
|
|
BLAKE2b-256 checksum How to use checksums |
229608c4a3846ff87ef0f1d53c55e071788a184978023cf04f5140933827d029
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.15
|
Release files / pinggy-0.3.1-cp36-abi3-win_amd64.whl
| Download URL | pinggy-0.3.1-cp36-abi3-win_amd64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.6 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2dcb5f9d526424e763e68aab037ebbce20e4a0614562f6b656ae0634c1a613f4
|
|
BLAKE2b-256 checksum How to use checksums |
cf2e75a80f54bca9a66f8c77dfa58877f06ccb322f6e1a1d18afdb520a758a9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.15
|
Release files / pinggy-0.3.1-cp36-abi3-win32.whl
| Download URL | pinggy-0.3.1-cp36-abi3-win32.whl |
|---|---|
| Size | 6.3 MB |
| Tags | CPython 3.6 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
b7bded4347b0d6eddfa3727913df569715f4c55e3530ed033525ea755316bf77
|
|
BLAKE2b-256 checksum How to use checksums |
0fcd5e27590505f7670c9d64de10fcf797cb858151485dc90ff7fa20fe504c8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.15
|
Release files / pinggy-0.3.1-cp36-abi3-manylinux_2_28_x86_64.whl
| Download URL | pinggy-0.3.1-cp36-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | CPython 3.6 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d5d0571a9db51976c61d34f949faaf5bb5b35d4e9b66500f00270fccdeda2520
|
|
BLAKE2b-256 checksum How to use checksums |
be74070fa372f5714bad5140c2feaf6b02ae4b75af310ff590da78150cd3dbf4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.15
|
Release files / pinggy-0.3.1-cp36-abi3-manylinux_2_28_i686.whl
| Download URL | pinggy-0.3.1-cp36-abi3-manylinux_2_28_i686.whl |
|---|---|
| Size | 6.4 MB |
| Tags | CPython 3.6 Linux glibc 2.28+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
25b076062be31ee36725b5c1b3d6617b08a8b6e0a17aa99a864e3c191b88c6e9
|
|
BLAKE2b-256 checksum How to use checksums |
1171f56232dd58252a6a5df19fb034d4c61522ae2dddee3a02b6e7d4c54a7acb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.15
|
Release files / pinggy-0.3.1-cp36-abi3-manylinux_2_28_armv7l.whl
| Download URL | pinggy-0.3.1-cp36-abi3-manylinux_2_28_armv7l.whl |
|---|---|
| Size | 5.2 MB |
| Tags | CPython 3.6 Linux glibc 2.28+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
7a86623ab0923800bbe3890ef9c6550136036786509e35ba36dd234590728b63
|
|
BLAKE2b-256 checksum How to use checksums |
bc48210cb2a619373b85c7b3ee105e5da88780dd976fe0e341b532fecde188a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.15
|
Release files / pinggy-0.3.1-cp36-abi3-manylinux_2_28_aarch64.whl
| Download URL | pinggy-0.3.1-cp36-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | CPython 3.6 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
b9583e0d131eefb5830a17249ccac84b48e1eac098d00555156c54d8700e60f1
|
|
BLAKE2b-256 checksum How to use checksums |
4f3ec0b6d44d486692adafb35f67b7c4d790f6f12fa0a90a07ff52ead79b5da7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.15
|
Release files / pinggy-0.3.1-cp36-abi3-macosx_11_0_universal2.whl
| Download URL | pinggy-0.3.1-cp36-abi3-macosx_11_0_universal2.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.6 abi3 macOS 11.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
3c2207c95f7083819d2b1f0ca4eb0a0efa2fe8b2c20b648ad968ca786ba45b57
|
|
BLAKE2b-256 checksum How to use checksums |
ae26eb910074d4d6abb9877b4cdf30c6579d8f90027214c45d84a7ac4ad99daf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.15
|