Skip to main content

sdk-garden-python

Lightweight SDK observability client for Python — stdlib only, non-blocking

Add SDK Garden telemetry to your Python SDK in minutes. Events are sent on a background daemon thread — your users never see a delay or an exception from the instrumentation layer.

Install

pip install sdk-garden-python

Quick Start

from sdk_garden import SdkGarden

sg = SdkGarden(api_key="YOUR_API_KEY", sdk_name="my-sdk", sdk_version="1.0.0").start()

@sg.track_method("process_payment")
def process_payment(amount):
    ...

Track arbitrary events:

sg.track("feature_used", properties={"feature": "streaming"})

Track errors with automatic PII scrubbing:

try:
    process_payment(100)
except Exception as e:
    sg.track_error(e)

Configuration

Parameter Type Default Description
api_key str required Your SDK Garden API key (sgk_...)
sdk_name str required Name of your SDK (e.g. "my-payments-sdk")
sdk_version str required Version of your SDK (e.g. "1.2.3")
endpoint str https://ingest.sdkgarden.dev/track Ingest endpoint URL
debug bool False Print [SDK Garden] debug lines to stdout
disabled bool False Disable all tracking (no thread spawned, no network calls)
batch_size int 10 Maximum events per HTTP POST
flush_interval float 5.0 Seconds between flush cycles
started_at float import time time.time() when your SDK began initializing; reported as time_to_init_ms for the dashboard's init timing

What gets sent

Each event carries your SDK's name and version, an event type, a random session ID created per client instance, and a timestamp. Depending on the event:

  • sdk_initialized (sent by start()): Python implementation and version, and time_to_init_ms.
  • method_called / method_success: method name, duration, and the number of positional arguments.
  • sdk_error: error type and message (email addresses are redacted) plus the method and duration.

Never sent: argument or return values, request or response bodies, stack traces, hostnames, environment variables or user identifiers. Nothing is sent when disabled=True.

Telling your users

Copy this into your SDK's README or privacy docs so your users know what's collected (edit the names to match):

Telemetry. This SDK reports anonymous usage data to its maintainers through SDK Garden: the SDK version, runtime version, which SDK methods are called, how long they take, and error types. It never sends your data, request contents or personal information. To opt out, set YOUR_SDK_TELEMETRY_DISABLED=1 (wire this environment variable to disabled=True in your SDK).

Behaviour Guarantees

All network errors are caught and discarded. Your program will never see an exception from sdk-garden-python.

Runs on a daemon thread — your program exits normally even if events are queued. When the process exits the daemon thread is killed automatically; any unsent events in the buffer are dropped. This is intentional — sdk-garden-python prioritises zero impact on your SDK over delivery guarantees.

Pass disabled=True in test environments to suppress all network calls. When disabled, start() returns immediately without spawning a thread, and track() / track_method() / track_error() are all no-ops.

HTTP requests use a 2-second timeout. Slow or unreachable ingest endpoints are silently abandoned after 2 seconds.

Queue overflow is silent. The internal queue holds a maximum of 100 events. If your SDK generates events faster than the flush thread can drain them, new events are discarded without raising an exception.

Notes

  • start() must be called before events are flushed. Calling track() before start() is safe — events are queued and will be flushed once start() is called.
  • track_method() returns a decorator. The decorated function behaves identically to the original; timing and error telemetry are captured transparently.
  • Error messages passed to track_error() are PII-scrubbed: email addresses matching the standard user@example.com pattern are replaced with [REDACTED] before the event is enqueued.

License

MIT

Metadata

Release files for sdk-garden-python 0.1.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 sdk-garden-python 0.1.0
File Size Uploaded Provenance
sdk_garden_python-0.1.0.tar.gz 7.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sdk-garden-python 0.1.0
File Interpreter ABI Platform
sdk_garden_python-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.9 kB

Release files / sdk_garden_python-0.1.0.tar.gz

Download URL sdk_garden_python-0.1.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2892a060efca0d1e5443f2cd7859a1972fe4f9623ad41b2b4efbf81d756998ba
BLAKE2b-256 checksum
How to use checksums
49e682816585e537ae10359e7c982614136c714d3948da764e075f76d265bceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / sdk_garden_python-0.1.0-py3-none-any.whl

Download URL sdk_garden_python-0.1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01e6d07989f1f2209d3afab4d80ae722f7bfc6be839f2bb2b825818d6cb4a99f
BLAKE2b-256 checksum
How to use checksums
a764c8f1c8af6e70d0718cb3ad0bba2241f243dceabb536c77ccff3289b66a61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for sdk-garden-python 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sdk_garden_python-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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