Skip to main content

lampson (Python SDK)

Talk to Lampson agents from Python. Standard library only.

from lampson import Lampson

# server mode: a running Lampson, an API key from `lampson key add`
lampson = Lampson(url="https://my-lampson.com/w/<workspace>", key="lk_...")

# or local mode: Lampson as a child process on this machine (needs the `lampson` command)
lampson = Lampson(local={"workspace": "./my-project"})

r = lampson.ask(agent="shop", thread="customer-42", text="do you have whole-wheat bread?")
print(r["text"])

for ev in lampson.stream(agent="shop", thread="customer-42", text="and the price?"):
    if ev["kind"] == "assistant":
        print(ev["data"])

lampson.close()

The same methods in both modes: ask, stream, agents, job (server), close, and Lampson.verify_signature(raw_body, signature, secret) for callbacks.

Metadata

Release files for lampson 0.2.10

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

Source distribution (sdist)

Source distribution for lampson 0.2.10
File Size Uploaded Provenance Actions
lampson-0.2.10.tar.gz 5.2 kB Without provenance Details for lampson-0.2.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lampson 0.2.10
File Interpreter ABI Platform Actions
lampson-0.2.10-py3-none-any.whl Python 3 none any Details for lampson-0.2.10-py3-none-any.whl

Total release size: 10.8 kB

Release files / lampson-0.2.10.tar.gz

Download URL lampson-0.2.10.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7604254d09ea409df81ee528ba5683535b8cbf6aee92cd883e6a19c82aa906c9
BLAKE2b-256 checksum
How to use checksums
20f1d0718e45ee4fa9f633c3f978312893f9ae557c31670104e1f290d4ece439
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.2

Release files / lampson-0.2.10-py3-none-any.whl

Download URL lampson-0.2.10-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd85d6a08159484fa0c3a43b9d3687d45e845bf180e486ea356755187ed419fd
BLAKE2b-256 checksum
How to use checksums
ea50b2fad29eb2c6fd4700a36bb255e20c7a3d90d698adb038d5b033c2214196
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.2

Security for lampson 0.2.10

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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