Developer SDK

Python examples

Install the SDK · View source on GitHub ↗

Python SDK installation

Python uses ctypes over sdk/cgo. Platform wheels contain the matching native library and do not require Go, a compiler, or a custom library search path.

Publication status: not yet published: urnetwork-sdk on PyPI. Its first publication comes with the next nightly that carries the stable SDK packages; until then, build the local package below. Stable releases use the app's release version (for example 2026.11.22); nightlies use the prerelease form 2026.11.22.dev1105365180.

Install with the native package manager

Shell
pip install urnetwork-sdk

Equivalent project installs: uv add urnetwork-sdk and poetry add urnetwork-sdk. Python code imports urnetwork. Pin with pip install urnetwork-sdk==<version>.

For preview releases, use pip install --pre urnetwork-sdk or pin the exact preview version. The unqualified command targets stable releases.

Supported platforms

Python 3.10+, on the OS/architecture of an available wheel. Linux tags state the glibc floor; current cross-builds target glibc 2.35. Do not assume Alpine/musl compatibility.

GitHub and local builds

For source development: pip install 'urnetwork-sdk @ git+https://github.com/urnetwork/sdk.git@<commit>#subdirectory=python' requires Go/C tools and resolvable Go dependencies. Alternatively clone the workspace, run make -C sdk/python, and pip-install its .whl. Standalone source archives fail explicitly without a staged runtime.

Examples

  • Integration: service provisioning, scoped client credentials and Device lifecycle.
  • Sockets: TCP/UDP, TLS/DTLS and HTTP client adapters.
  • Messages: live peer discovery and interoperable text/ACK exchange.
  • Provider: a provider client of your network with the consent disclaimer, status, payout wallet display and background run.
  • Embed: URnetwork inside your own app, for its own traffic: your backend provisions one client per installation, puts it in its ACL group and sets its data caps; the app runs a local Device and shows its status.
  • Hosted proxies: hosted proxies with unique exit IPs (Pro), reached over HTTPS and SOCKS5 with Requests; no SDK needed.

Apps use URNETWORK_CLIENT_JWT and a persisted URNETWORK_INSTANCE_ID; only the service backend holds URNETWORK_ROOT_JWT. See the shared contract and official networking research.

Use an SDK release containing the required APIs. The package plan records package names, build outputs and publication gates.

References