brussle (Python)
from brussle import And, Client
db = Client(api_key="...")
ns = db.namespace("acme/prod/tenant_123")
ns.write(upsert=[{"id": "t_123", "attributes": {"plan": "pro"}, "state": {"subject": "Refund"}}])
page = ns.query(filters=And(("attributes.plan", "Eq", "pro"), ("answers.needs_escalation.p", "Gte", 0.85)), top_k=10)
To load many documents, import_documents takes any iterable and writes it in batches, 4 at a time on a thread pool, with retries:
summary = ns.import_documents(records(), concurrency=4)
print(summary.documents, summary.failures)
Methods mirror the API's routes. Every route that changes something takes idempotency_key=. Reads, writes and calls with a key are retried after network errors, timeouts and 5xx, 2 times by default (max_retries). Requests and responses are plain JSON, typed in brussle.types. Filters and rank_by are tuples. Errors raise ApiError with the API's code and details, or unknown for an error response that is not the API's JSON (such as a proxy's error page), or a success whose body is not JSON. A call your organization's plan doesn't include raises plan_required (402), and details["required_plan"] names the plan that does. See the SDK overview.
Metadata
Release files for brussle 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| brussle-1.0.0.tar.gz | 113.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| brussle-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 177.1 kB
Release files / brussle-1.0.0.tar.gz
| Download URL | brussle-1.0.0.tar.gz |
|---|---|
| Size | 113.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c40a7a1fe87d62f6b420570b2ec6c8904ecdf7debe5db5d02a987955de20ab4
|
|
BLAKE2b-256 checksum How to use checksums |
5520895904afa7977987e6ba60ef25611b28872ad44cdc13d93cc3a9baca23c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / brussle-1.0.0-py3-none-any.whl
| Download URL | brussle-1.0.0-py3-none-any.whl |
|---|---|
| Size | 63.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff78bca4e4529184ac13ba164b33fbbff9c971dcdbb3e9409ccb7aa58253d9d8
|
|
BLAKE2b-256 checksum How to use checksums |
c4917eb8203390a49f4472cd4ed9b2e74a247acbb72893c438b031bd98f6115b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|