Skip to main content

A bundeld set of tools, clients for the lange-suite of tools and more.

Project description

lange-python

Python helpers for Lange services.

Mesh Relay Worker

MeshRelay connects a local HTTP service to the Lange mesh relay and forwards public relay requests to your local target.

pip install lange-python
from lange.mesh.relay import MeshRelay

relay = MeshRelay(
    host="wss://api.lange-labs.com",
    key="default",
    target="http://localhost:3000",
)

relay.start()

try:
    print(relay.status)
    print(relay.remote_relay_address)
finally:
    relay.stop()

By default, MeshRelay reads authentication from the LANGE_LABS_API_KEY environment variable. Keep API keys in the environment or a local secret store instead of hardcoding them in application code.

export LANGE_LABS_API_KEY="your-api-key"

The relay exposes lifecycle state for integrations:

  • status: one of unauthenticated, off, pending, connected, or failed
  • connected: whether the relay websocket is currently connected
  • remote_relay_address: public REST relay address returned by the API
  • worker_config: full worker configuration returned by the API

Reload authentication or reconnect the worker without rebuilding it:

relay.reload()
relay.reload(api_key=None)
relay.reconnect()

Project details


Download files

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

Source Distribution

lange_python-0.5.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

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

lange_python-0.5.0-py3-none-any.whl (39.4 kB view details)

Uploaded Python 3

File details

Details for the file lange_python-0.5.0.tar.gz.

File metadata

  • Download URL: lange_python-0.5.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.9 Darwin/25.1.0

File hashes

Hashes for lange_python-0.5.0.tar.gz
Algorithm Hash digest
SHA256 fb2653af27d5207eebe69c272f04c23be9d7013d1adbaac1c7453a9ea56d8b5f
MD5 5d9c102e706279a2a1683ed08b571840
BLAKE2b-256 81c910ed3716c5607dd915af2675801fae5d868fdfa298abc655353cabd1ca82

See more details on using hashes here.

File details

Details for the file lange_python-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: lange_python-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 39.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.9 Darwin/25.1.0

File hashes

Hashes for lange_python-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e784feaa30e17bc6f8f8e82effe78ac42ecbbe00ab3039bedd5ea2658f4e10e3
MD5 1375e29ff599eec5b7eea13d250ef655
BLAKE2b-256 5cb78dd963230e146d0d72d02d80048aefb97595dbd06268c2e0cb3c9d293e1d

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 Pingdom Monitoring Sentry Error logging StatusPage Status page