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 ordinary-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 on Linux glibc (x86_64, ARM64, glibc 2.28 or newer) and macOS arm64 installs a compiled wheel. Every other platform, including Python 3.13 and musl, 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.1.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| struct_sdk_native-0.1.15-py3-none-any.whl | Python 3 | none | any | Details for struct_sdk_native-0.1.15-py3-none-any.whl |
| struct_sdk_native-0.1.15-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.1.15-cp312-cp312-manylinux_2_28_x86_64.whl |
| struct_sdk_native-0.1.15-cp312-cp312-manylinux_2_28_aarch64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ ARM64 | Details for struct_sdk_native-0.1.15-cp312-cp312-manylinux_2_28_aarch64.whl |
| struct_sdk_native-0.1.15-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details for struct_sdk_native-0.1.15-cp312-cp312-macosx_11_0_arm64.whl |
Total release size: 2.7 MB
Release files / struct_sdk_native-0.1.15-py3-none-any.whl
| Download URL | struct_sdk_native-0.1.15-py3-none-any.whl |
|---|---|
| Size | 42.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03e0a86b336807a1c3dc743da4b61dca920ed4742c4108b4bb9d0cb9c80c56c5
|
|
BLAKE2b-256 checksum How to use checksums |
5bfe2cea2fa1b3a6139d90ba53877ef1be9321bb2eb789792267f08c295179e9
|
| 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 12, 2026.
Transparency logRelease files / struct_sdk_native-0.1.15-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | struct_sdk_native-0.1.15-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 905.1 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
39bd7c95e937222dbfc8866088df74e1983ecfbe4c8fc15258b5a73a0f846c03
|
|
BLAKE2b-256 checksum How to use checksums |
03293a1db1b42fcde5b1e71556f597b271f2d92df02437187cc4b15ea8526a2d
|
| 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 12, 2026.
Transparency logRelease files / struct_sdk_native-0.1.15-cp312-cp312-manylinux_2_28_aarch64.whl
| Download URL | struct_sdk_native-0.1.15-cp312-cp312-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 893.7 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
591845151d2d145fee4066cf10b0b6a4194f69fae6cc7c52c09fae4e68876aa9
|
|
BLAKE2b-256 checksum How to use checksums |
c037bc9cab4ad52e16ac1f2f7b65f9a00ab0bc5435beeec14b182309605ae3fb
|
| 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 12, 2026.
Transparency logRelease files / struct_sdk_native-0.1.15-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | struct_sdk_native-0.1.15-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 824.1 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7fcca41d48c91a10bee731342e5098fe724769a34450923bbdd0c5e09ba2bb34
|
|
BLAKE2b-256 checksum How to use checksums |
73f506ff7b2d92a97d640f0d1ca6ce769a612be972a52ea883e89a5c2e9746d1
|
| 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 12, 2026.
Transparency logSecurity for struct-sdk-native 0.1.15
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 4 files in this release have been uploaded with provenance metadata.
Attestation for struct_sdk_native-0.1.15-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 12, 2026.
Transparency logA 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.