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.15

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.15
File Size Uploaded
prime_tunnel-0.1.15.tar.gz 23.1 kB Details

Built distribution (wheel)

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

Total release size: 43.0 kB

Release files / prime_tunnel-0.1.15.tar.gz

Download URL prime_tunnel-0.1.15.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
603a0de61fbc44851d7726079fbd2a7567760ecf016129fcf4da807e026b333d
BLAKE2b-256 checksum
How to use checksums
993feadac233b53397c384390ad88db0dd0f444cd23e3eb51a98ea61293563c6
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 14, 2026.

Transparency log

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

Download URL prime_tunnel-0.1.15-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6922479b9b511059b059089ffae89b0dfe8ab45ca329a29297c60bc8094e84f9
BLAKE2b-256 checksum
How to use checksums
8a07320d227582cc0b989c726ec5ad1ff33d7f48c7102a479c47c45249097fa9
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 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.15 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