Larkup Python SDK
The synchronous and asynchronous Python clients for a generated Larkup server.
Install
pip install larkup
Use
from larkup import LarkupClient, LarkupClientOptions
client = LarkupClient(
LarkupClientOptions(
base_url="http://localhost:8080",
api_key="your-api-key",
)
)
result = client.query("What is Larkup?", top_k=5)
for event in client.chat("Summarize the result."):
if event.type == "text-delta":
print(event.text or "", end="", flush=True)
The SDK supports health and OpenAPI discovery, retrieval, document CRUD, sequential or parallel bulk indexing with progress, corpus filtering and export, scraping, and streaming chat grounded in retrieved content. AsyncLarkupClient provides matching asynchronous methods.
Agent Server
In Settings → Runtime, select Agent and start the server. Then use its
displayed URL.
Open <displayed-url>/reference for the interactive Scalar API reference or
<displayed-url>/openapi.json for the OpenAPI document:
import os
from larkup import LarkupAgentClient
agent = LarkupAgentClient(
base_url="http://localhost:8080",
api_key=os.environ["LARKUP_API_KEY"],
)
print(agent.health())
for capability in agent.capabilities():
print(capability.name, capability.tools)
print(agent.configuration().systemPrompt)
print(agent.sandbox())
for text in agent.stream_text("Hello"):
print(text, end="", flush=True)
Select an available chat model
Generated runtimes expose their usable chat catalog through the SDK. Model selection is per request, so it does not mutate the deployment default.
from larkup import AgentChatRequest
catalog = agent.chat_model_catalog()
models = agent.chat_models("anthropic")
if models:
print(agent.chat_text(AgentChatRequest(
messages=[{"role": "user", "content": "Summarize the project."}],
provider=catalog.configuredProvider,
modelId=models[0].id,
)))
AI Gateway runtimes can select any language model returned by the catalog; direct-provider runtimes are limited to their configured provider. See the Vercel AI Gateway model catalog for current providers and models.
LarkupHubClient and AsyncLarkupHubClient provide typed Marketplace catalog discovery. Install and uninstall operations remain in the CLI because they change the local Larkup tool directory.
See the Python SDK documentation for the complete guide.
Development
cd apps/sdk/py-sdk
uv run pytest
Metadata
Release files for larkup 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| larkup-0.2.5.tar.gz | 10.0 kB | Without provenance | Details for larkup-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| larkup-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for larkup-0.2.5-py3-none-any.whl |
Total release size: 22.0 kB
Release files / larkup-0.2.5.tar.gz
| Download URL | larkup-0.2.5.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e61539131d22a1f7532528779e903fd1b5eed190a9fc1ce72d2ed5061e47145
|
|
BLAKE2b-256 checksum How to use checksums |
375022af48466f19af2e40042757352ce80e96eb8eb4db9df37c138ea2307925
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / larkup-0.2.5-py3-none-any.whl
| Download URL | larkup-0.2.5-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c2f284e87b693bb27af39280b4271e5b1b8a279609691c6e1d69c19757e069d
|
|
BLAKE2b-256 checksum How to use checksums |
15f839a85f84d1a87b757ba8cbd2f3dd469b863d0c3adb7e0abff7a2c14f7d1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for larkup 0.2.5
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.