Skip to main content

Pinggy

PyPI Python versions License

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

License

Apache 2.0. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pinggy-0.3.0-cp36-abi3-win_arm64.whl (2.9 MB view details)

Uploaded CPython 3.6+Windows ARM64

pinggy-0.3.0-cp36-abi3-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.6+Windows x86-64

pinggy-0.3.0-cp36-abi3-win32.whl (6.3 MB view details)

Uploaded CPython 3.6+Windows x86

pinggy-0.3.0-cp36-abi3-manylinux_2_28_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.6+manylinux: glibc 2.28+ x86-64

pinggy-0.3.0-cp36-abi3-manylinux_2_28_i686.whl (6.4 MB view details)

Uploaded CPython 3.6+manylinux: glibc 2.28+ i686

pinggy-0.3.0-cp36-abi3-manylinux_2_28_armv7l.whl (5.2 MB view details)

Uploaded CPython 3.6+manylinux: glibc 2.28+ ARMv7l

pinggy-0.3.0-cp36-abi3-manylinux_2_28_aarch64.whl (7.0 MB view details)

Uploaded CPython 3.6+manylinux: glibc 2.28+ ARM64

pinggy-0.3.0-cp36-abi3-macosx_11_0_universal2.whl (10.7 MB view details)

Uploaded CPython 3.6+macOS 11.0+ universal2 (ARM64, x86-64)

File details

Details for the file pinggy-0.3.0-cp36-abi3-win_arm64.whl.

File metadata

  • Download URL: pinggy-0.3.0-cp36-abi3-win_arm64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.6+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.15

File hashes

Hashes for pinggy-0.3.0-cp36-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 39d0304131536e0ff2cff93222ab396c3ece848041b0c408a08c26c3a3e5c7af
MD5 dd804090bf00fb2a8f3ffc05ac002cb3
BLAKE2b-256 ce8c7c4f3423094eb88fc447ae6f3e3e374cc0f3a0ec8a04da76b9843430f529

See more details on using hashes here.

File details

Details for the file pinggy-0.3.0-cp36-abi3-win_amd64.whl.

File metadata

  • Download URL: pinggy-0.3.0-cp36-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.4 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

Hashes for pinggy-0.3.0-cp36-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3f4a92ac7500d980d2c145a88102e08f96fafd9a4167f318d241597cd2f974a8
MD5 cf8362a0024f4751d9870b19532087ec
BLAKE2b-256 e3adc66e869fa17fc197d7dc555156f8084f107bfeafeca58af01bce4f3be843

See more details on using hashes here.

File details

Details for the file pinggy-0.3.0-cp36-abi3-win32.whl.

File metadata

  • Download URL: pinggy-0.3.0-cp36-abi3-win32.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: CPython 3.6+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.15

File hashes

Hashes for pinggy-0.3.0-cp36-abi3-win32.whl
Algorithm Hash digest
SHA256 04804a067312fb1c6472267453b7c1f76ca191fc203b4c3c8ad0fc84f74aa6df
MD5 45ff6437b8545f88c944a6ba4749f46e
BLAKE2b-256 ef9c8ddfd59e35592deb2158f5f1c96060b21c900e59c7d7c9e478e7f6002308

See more details on using hashes here.

File details

Details for the file pinggy-0.3.0-cp36-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pinggy-0.3.0-cp36-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b35b3efd27254fe652ecadbda668acc37f63a390a8f2ee6b4b7b22edb43beff2
MD5 033dfb6850304945a307196752fd2756
BLAKE2b-256 abb5cfcc69c1c162eacec448f23a9cfb0e835547da8204fa92f89b6addc12163

See more details on using hashes here.

File details

Details for the file pinggy-0.3.0-cp36-abi3-manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for pinggy-0.3.0-cp36-abi3-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 b5ce848ae127659e17fc46aaffb70712fd765aca52cd0aa13131981dfbfadcd5
MD5 b824fa33d4ca661548024129e3c4f009
BLAKE2b-256 f4f5abf1a1c776b396458fa2b0c085567f7125c799bb8128b83e81cd9d8e2efe

See more details on using hashes here.

File details

Details for the file pinggy-0.3.0-cp36-abi3-manylinux_2_28_armv7l.whl.

File metadata

File hashes

Hashes for pinggy-0.3.0-cp36-abi3-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 81eca63cbd79990a4d3fcf0db7c6fa927da3e76682159c93e687d018af412a2f
MD5 000a1f02ecb62aaddb1774e426a1207e
BLAKE2b-256 75f38bf17ccba5c0861f7c5460a4652fb8041c7bfcd38226621472ca7ee23d28

See more details on using hashes here.

File details

Details for the file pinggy-0.3.0-cp36-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pinggy-0.3.0-cp36-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 40aa6b850de384fe49cf0c1a266cbfc09ffd565ad05fbd3a7c494320e335c5a7
MD5 b7f763caaad8046fd7c91040ffe37152
BLAKE2b-256 0823da832796eb42519873208e740a10cde8a97963a4e9908a41c4319a9ae9c5

See more details on using hashes here.

File details

Details for the file pinggy-0.3.0-cp36-abi3-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for pinggy-0.3.0-cp36-abi3-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 4de6f2c0a6ee6410540be83b7b3cba0002fcc8508904b46970913e76403a37d1
MD5 792daebaa78cb4488411579ee1f269a4
BLAKE2b-256 8a20c2600ecdbb06b80965cabe555639055990f47f84176b584319ad1eccb57d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page