Repository navigation
v0.1.0
First release. Everything below is new.
Added
- Clients.
BrontoClient(sync) andAsyncBrontoClient(async) over
httpx, with identical method names, context-manager support,close()/
aclose(), andfrom_env()readingBRONTO_API_KEYplusBRONTO_REGIONor
BRONTO_BASE_URL. A caller-suppliedhttp_clientis never closed by the SDK.
The async client adds amax_concurrencysemaphore (default 20) bounding
in-flight requests.client.get()/client.post()remain public escape
hatches so an uncovered endpoint never blocks a consumer on an SDK release. - Two-mode credentials. A client is either client-bound (built with
api_keyorbearer_token) or per-request (built with neither, holding no
credential). The modes never mix and there is no fallback between them, which
makes a long-lived multi-tenant client safe by construction. Bearer wins over
API key within one origin; an empty per-request credential fails closed. - Error hierarchy.
BrontoError,BrontoConfigError,
BrontoConnectionErrorandBrontoAPIError, with status-mapped subclasses
for 400, 401, 403, 404, 429 (carryingretry_after) and 5xx. Errors expose
status_code,correlation_id,details,error_type,body,headers
and aretryableflag;str()always surfaces the status and correlation id.
No credential reaches an error, arepr()or a log line — headers are
redacted by key name and the stored body is bounded. - Regional registry.
validate_region,rest_base_url,mcp_urland
ingest_base_url. Region is a validated slug rather than a closed enum, so a
new region works without an SDK release while a value that would smuggle a
host offbronto.iois rejected.KNOWN_REGIONSis a hint for error
messages, never an allow-list. Redirects are not followed, deliberately. - Per-request options.
RequestOptionsfortimeout,headers, a
per-request credential, and anidempotentflag reserved for v0.2 retries. bronto_sdk.models: Pydantic v2 models for the covered REST subset —
SearchRequest/SearchResponse,Monitor/MonitorsResponse,
MonitorEventsResponse,Dataset/DatasetsResponseandErrorResponse.
Response models accept unknown fields so a new server-side field is additive,
and no sequence number or epoch-millisecond field is typedfloat.bronto_sdk.resources: the typed operation surface, wired onto both
clients asclient.search,client.monitorsandclient.datasets—
search.run(),monitors.list(),monitors.retrieve(),monitors.events()
anddatasets.list(), each returning a parsed model. Path parameters are
URL-quoted.bronto_sdk.domain: pure Bronto helpers with no I/O.iso_to_ms,
ms_to_iso,parse_time_rangeandparse_windowresolve natural-language
windows the way the query engine does, with nodateparserdependency;
quote_value,quote_attributeandwildcard_patternescape values for a
where clause — opt-in, never automatic;project_datasetreads both the
REST and MCP dataset shapes.bronto_sdk.mcp: the MCP endpoint registry —url()(by region, or by
base_urlfor a staging deployment the region slug cannot name) and
auth_headers(). String and dict helpers only: nomcporlangchain
import, and no session opener until v0.2.- Documentation: a full README with quickstarts, the credential model, the
error hierarchy, the domain helpers and a migration table from an ad-hoc
client, plus four runnable scripts inexamples/.
Not in this release
Automatic retries and backoff, pagination iterators, an MCP session opener,
LangChain tool decorators, OpenTelemetry hooks, an ingestion client (URL helper
only), and REST coverage beyond the five operations above.