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

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.3.0
File Size Uploaded Provenance Actions
lampson-0.3.0.tar.gz 5.3 kB Without provenance Details for lampson-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 10.9 kB

Release files / lampson-0.3.0.tar.gz

Download URL lampson-0.3.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4d02ad956d9146c766caf49a59642b6c5e912729e3276a890d5a6cea533a8c18
BLAKE2b-256 checksum
How to use checksums
059bf5a750b07887a8dd4e9d33732dd248701a67ff549c1ede131802ae953344
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.3.0-py3-none-any.whl

Download URL lampson-0.3.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0de0b2db3ae91b1f4a85adecf454eb382dcbf33659c41f8e300ba2e798d444f8
BLAKE2b-256 checksum
How to use checksums
3fd9e520a12f00641e00bc68fd157ee1bcf69297bf5b71b3140477db580dabf7
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.3.0

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