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
MeshWorker connects a local HTTP service to the Lange mesh relay and forwards
public relay requests to your local target.
pip install lange-python
import asyncio
import time
from lange.mesh.worker import MeshWorker
relay = MeshWorker(
name="default",
relay_target="http://localhost:3000",
)
relay.start()
try:
while relay.remote_relay_address is None and relay.is_alive():
time.sleep(0.25)
print(relay.remote_relay_address)
finally:
asyncio.run(relay.stop())
The worker connects to wss://mesh.lange-labs.com by default and receives a
public relay address such as https://default.mesh.lange-labs.com/.
If a mesh deployment requires bearer authentication, pass the token as
api_key. Keep API keys in the environment or a local secret store instead of
hardcoding them in application code.
import os
from lange.mesh.worker import MeshWorker
relay = MeshWorker(
name="default",
relay_target="http://localhost:3000",
api_key=os.environ["LANGE_LABS_API_KEY"],
)
The relay exposes lifecycle state for integrations:
remote_relay_address: public REST relay address returned by the mesh service
Stop the worker from an async context:
await relay.stop()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lange_python-0.7.1.tar.gz.
File metadata
- Download URL: lange_python-0.7.1.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e4d691fb7d61ac6f51bde0c27fb9e75d3e13e0731ce415b6a8776d89333b76d
|
|
| MD5 |
096ad319f636ef149c079a1968309437
|
|
| BLAKE2b-256 |
66d8fbf896cf998ff0f53b8aa44f721552eb3046b84e36f194130efaa1789de6
|
Provenance
The following attestation bundles were made for lange_python-0.7.1.tar.gz:
Publisher:
publish.yml on langelabs/lange-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lange_python-0.7.1.tar.gz -
Subject digest:
1e4d691fb7d61ac6f51bde0c27fb9e75d3e13e0731ce415b6a8776d89333b76d - Sigstore transparency entry: 2082493513
- Sigstore integration time:
-
Permalink:
langelabs/lange-python@be8fe33d9e9723612e46bf6f0c929092fc961731 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/langelabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@be8fe33d9e9723612e46bf6f0c929092fc961731 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lange_python-0.7.1-py3-none-any.whl.
File metadata
- Download URL: lange_python-0.7.1-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37ee508d5dc800e461ee38cd424850ae85420eadc14d53e603abccdf5ebf6d98
|
|
| MD5 |
98141f57a764487d5804ffecc49e0c32
|
|
| BLAKE2b-256 |
de8236af474578f7475638fdf454b448a069b892ca1883260ad174de3ceeb411
|
Provenance
The following attestation bundles were made for lange_python-0.7.1-py3-none-any.whl:
Publisher:
publish.yml on langelabs/lange-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lange_python-0.7.1-py3-none-any.whl -
Subject digest:
37ee508d5dc800e461ee38cd424850ae85420eadc14d53e603abccdf5ebf6d98 - Sigstore transparency entry: 2082493520
- Sigstore integration time:
-
Permalink:
langelabs/lange-python@be8fe33d9e9723612e46bf6f0c929092fc961731 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/langelabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@be8fe33d9e9723612e46bf6f0c929092fc961731 -
Trigger Event:
push
-
Statement type: