Skip to main content

Prime Tunnel SDK

Expose local services via secure tunnels on Prime infrastructure.

Installation

uv pip install prime-tunnel

Or with pip:

pip install prime-tunnel

Quick Start

from prime_tunnel import Tunnel

# Create and start a tunnel
async with Tunnel(local_port=8765) as tunnel:
    print(f"Tunnel URL: {tunnel.url}")
    # Your local service on port 8765 is now accessible at tunnel.url

If a tunnel stops serving while it should stay at the same URL, restart its client. The registration is kept, so tunnel.url does not change:

await tunnel.restart()

A tunnel that was deleted, expired, or stayed disconnected for too long cannot be restarted: restart() raises TunnelGoneError, and tunnel.is_gone turns true as soon as the tunnel service rejects the client. Stop it and start a new tunnel, which gets a new URL. await tunnel.status() reports the client process and the service's record of the tunnel:

status = await tunnel.status()
if status.gone:
    await tunnel.stop()

CLI Usage

# Start a tunnel
prime tunnel start --port 8765

# List active tunnels
prime tunnel list

# Get tunnel status
prime tunnel status <tunnel_id>

Documentation

Full API reference: https://github.com/PrimeIntellect-ai/prime/tree/main/packages/prime-tunnel

  • prime - Full CLI + SDK with pods, inference, and more (includes this package)

License

MIT License - see LICENSE file for details

Metadata

Release files for prime-tunnel 0.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prime-tunnel 0.1.14
File Size Uploaded
prime_tunnel-0.1.14.tar.gz 22.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prime-tunnel 0.1.14
File Interpreter ABI Platform
prime_tunnel-0.1.14-py3-none-any.whl Python 3 none any Details

Total release size: 41.7 kB

Release files / prime_tunnel-0.1.14.tar.gz

Download URL prime_tunnel-0.1.14.tar.gz
Size 22.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4968787d8702578b213204d2524c3525985cd0362f50841af5fa2465d0d4e2cb
BLAKE2b-256 checksum
How to use checksums
db7d8d8cdd03aada223acc53d4de49cf7f195d7656705a0f3d2339051890a9f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / prime_tunnel-0.1.14-py3-none-any.whl

Download URL prime_tunnel-0.1.14-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0e21f2b9ff61cf07c038486ddc541fe07326c65e703aaf4c795fae460ac6402
BLAKE2b-256 checksum
How to use checksums
b8d451e2b8fea13709edf3a6b94fb81d27a0eb3da11b339d870ace41de813dbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.15

2 release files

This release

0.1.14 This release

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page