Skip to main content

struct-sdk-native

Native capture runtime for the Struct observability SDK. struct-sdk installs it automatically; you do not need to install or import it yourself.

Public struct.init(api_url=...) composes authenticated Observation configuration with native function-boundary hooks, boundary-plan lowering and the function lifecycle. The SDK emits outputs through OpenTelemetry and owns export and health. Capability depends on the interpreter, platform and verified adapter:

from struct_sdk_native import capability_report

capability_report().available  # True only on a supported, verified native build

The internal lifecycle disarms inherited hooks after fork and requires explicit initialize(fresh_consumer) in each worker. It supplies synchronous suppress_capture() scopes and shutdown(deadline) using an absolute time.monotonic() deadline. The native outcome counts describe consumer handoff, not export acknowledgement. Initialization establishes the process-owned cleanup worker; shutdown and cleanup retries never start threads on the deadline-bound caller. Retain the lifecycle and output adapter while cleanup is pending: active spans keep terminal hooks until their original function returns and restores context, even after the delivery deadline. Public struct.init() owns this composition; call it explicitly in each forked worker and call struct.shutdown() during application teardown. This native package installs no signal or exit handler.

CPython 3.12 and 3.13 install a compiled wheel on Linux (x86_64 and ARM64; glibc 2.28 or newer, or musl 1.2 or newer such as Alpine) and on macOS 11 or newer (Apple silicon and Intel). Every other platform, including Python 3.14, free-threaded builds and Windows, installs a pure Python wheel that reports the capability as unavailable. Neither case needs a Rust compiler, and no source distribution is published.

Interior observations can capture at verified exception handlers, supported await assignments and exact source statements. They require source that matches the loaded code; missing or unverifiable source leaves the candidate unavailable. These independent points do not provide paired coroutine or generator lifetimes.

Coexistence with tools that replace function code

Struct preserves another tool's replacement when it can see that replacement before cleanup. One narrow case is unsupported: another tool changes the same function inside Python's audit callback for Struct's own code assignment. Python can finish Struct's assignment and overwrite that nested edit. Installation then leaves Struct's verified code installed; rollback or cleanup restores the prior or original application code. The other tool's instrumentation can disappear, and Struct may report success without a conflict warning.

This limitation does not permit instrumentation errors to escape into the application. If an audit callback rejects a change, Struct contains the failure. Rejected cleanup remains retryable with capture inactive. Application return values and escaping exceptions must be preserved.

The server's publication path uses struct_sdk_native.sil.prepare_definition(bytes) to revalidate immutable stored artifacts outside database locks, then a fresh configuration_index() to check every enabled observation's prepared versions together. Preparation preserves existing identities; the index retains only target/metric signatures. Both call the shared Rust compiler with the GIL released and report typed refusals. The customer SDK never imports this compiler surface.

Metadata

Release files for struct-sdk-native 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for struct-sdk-native 0.2.0
File Actions
struct_sdk_native-0.2.0-py3-none-any.whl Python 3 none any Details for struct_sdk_native-0.2.0-py3-none-any.whl
struct_sdk_native-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details for struct_sdk_native-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl
struct_sdk_native-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ ARM64 Details for struct_sdk_native-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl
struct_sdk_native-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for struct_sdk_native-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl
struct_sdk_native-0.2.0-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details for struct_sdk_native-0.2.0-cp313-cp313-manylinux_2_28_aarch64.whl
struct_sdk_native-0.2.0-cp313-cp313-macosx_11_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 11.0+ x86-64 Details for struct_sdk_native-0.2.0-cp313-cp313-macosx_11_0_x86_64.whl
struct_sdk_native-0.2.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for struct_sdk_native-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
struct_sdk_native-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details for struct_sdk_native-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl
struct_sdk_native-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ ARM64 Details for struct_sdk_native-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl
struct_sdk_native-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for struct_sdk_native-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl
struct_sdk_native-0.2.0-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details for struct_sdk_native-0.2.0-cp312-cp312-manylinux_2_28_aarch64.whl
struct_sdk_native-0.2.0-cp312-cp312-macosx_11_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 11.0+ x86-64 Details for struct_sdk_native-0.2.0-cp312-cp312-macosx_11_0_x86_64.whl
struct_sdk_native-0.2.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for struct_sdk_native-0.2.0-cp312-cp312-macosx_11_0_arm64.whl

Total release size: 41.7 MB

Release files / struct_sdk_native-0.2.0-py3-none-any.whl

Download URL struct_sdk_native-0.2.0-py3-none-any.whl
Size 61.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a17ec69e5fddb82864d73133c3b796424ef36c7db6155edfed2ddb313ec3905a
BLAKE2b-256 checksum
How to use checksums
6c163cfc51f25d89bbe4ec726c7103acff2e6a2ae24bf0156955e31533cc9075
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL struct_sdk_native-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl
Size 3.7 MB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
239c7a02eb4b41fe0cb9fb3b74901570d23705de34eef6e12369d14e18cca882
BLAKE2b-256 checksum
How to use checksums
f0cefb41a80ca6e52f0187e53f739ec524153c1227dc475e71ca51930bcc0441
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl

Download URL struct_sdk_native-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl
Size 3.6 MB
Tags CPython 3.13 Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
d76fdf4ca74d3f83b2b1f222f243a0fa8eff60949c9142fee9713bc0aa28d7cf
BLAKE2b-256 checksum
How to use checksums
752618917e2b84fb830256298c91dfaf6bc057388229a804d47c2325e65b7e72
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL struct_sdk_native-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 3.5 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4e72609e15dce562dbd489921745197f9cd3b4487c92ed3fb192475bc4a94962
BLAKE2b-256 checksum
How to use checksums
9f8ac5d62db202e11abaa523c1fb888fc898039cc46fb35b5dc0bc37297b510f
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL struct_sdk_native-0.2.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 3.5 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
aeb7bfbc00fedf08a0836102500a39c521fbd1dd7a86cf902ca0eb35f226c2fc
BLAKE2b-256 checksum
How to use checksums
a484ae28d95d08abd84b533e0c17d95c673bb81e3390f5f73c4b4e3fddeea37c
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp313-cp313-macosx_11_0_x86_64.whl

Download URL struct_sdk_native-0.2.0-cp313-cp313-macosx_11_0_x86_64.whl
Size 3.3 MB
Tags CPython 3.13 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
71d8110fd852722feec8bd0f27044d0fe6b8560032cd80ff9876935afd6e7fb3
BLAKE2b-256 checksum
How to use checksums
db1e78844c51b6899603e153728c0f349b2bccdbeaedca31a538ab6783382eb3
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL struct_sdk_native-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Size 3.2 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
feb214c6264af8cf9cbbd9d5557b6d9d9087fb825ec275814bbd94c7e6ce0a5f
BLAKE2b-256 checksum
How to use checksums
e856133a61cba9b799a49b5c63cc9a01ccd59a98c7f663414f2610267a1f8e9b
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL struct_sdk_native-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl
Size 3.7 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
c0779d2d6c0b08a7488ddb284a9ccc4f81dd57b31071d250c7f7ee206c0c4ff0
BLAKE2b-256 checksum
How to use checksums
87df5ade24be3ec4e6508fe0c5c134e8b7eda820281d6986b28b5489421257e4
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl

Download URL struct_sdk_native-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl
Size 3.6 MB
Tags CPython 3.12 Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
8f1720f34af73c353f97eb899197fc085b2b89af7da7729acc43973dd6daae24
BLAKE2b-256 checksum
How to use checksums
7df4fea88c44544887d3db24667ae8742d155889d459e5c996b17bc83584eb65
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL struct_sdk_native-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 3.5 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
213dde1348863e31435e62a25d1308d6f8ed14eaed829731f1bf50cf4c3c7e4a
BLAKE2b-256 checksum
How to use checksums
61bec71a03583e67d6fa1a987e87de20af58f2e54f80d032b091ac459d9241af
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL struct_sdk_native-0.2.0-cp312-cp312-manylinux_2_28_aarch64.whl
Size 3.5 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
d1119beff1f32f40959d00e02daa64e67d35af925ea1f8c9f300e5965983a333
BLAKE2b-256 checksum
How to use checksums
4ea3f23e57e6ffef16360d57d8eac1f57f8e1fe9c6c5a93a4853cdc4cddeb07a
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp312-cp312-macosx_11_0_x86_64.whl

Download URL struct_sdk_native-0.2.0-cp312-cp312-macosx_11_0_x86_64.whl
Size 3.3 MB
Tags CPython 3.12 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
cb40fbd3a1cb0e753926b2e93c03134ef6d057c2a9e7fe2abeebf1ff0f97b993
BLAKE2b-256 checksum
How to use checksums
adce99395ed12082a519cdd6fd5f89e4237641d196fc3ab16a0e9d5f554fed21
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 Nov 20, 2026.

Transparency log

Release files / struct_sdk_native-0.2.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL struct_sdk_native-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Size 3.2 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4992e8623e4662195e9ab516a4c8a19aeed3b5ea39e4deae89afab253c564e5a
BLAKE2b-256 checksum
How to use checksums
d7412b15494c02c8e4a17bb99b3c235166423cb4b7c3d128b538df1b74158887
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 Nov 20, 2026.

Transparency log

Security for struct-sdk-native 0.2.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 13 files in this release have been uploaded with provenance metadata.

Select from 13 files

Attestation for struct_sdk_native-0.2.0-py3-none-any.whl

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

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