Async Python bindings for the Rust-based Lattix SDK core
Project description
Lattix Python SDK
Async Python bindings for the Rust-based Lattix SDK core.
The public Lattix docs at https://lattix.io/docs intentionally stay focused on platform concepts and tenant/operator guidance. Per-language SDK reference material is distributed with each SDK package, so this README is part of the supported Python reference surface.
Overview
This package targets the lattix-platform-api SDK control-plane contract and exposes async methods for the metadata-only zero-trust flows:
capabilities()whoami()bootstrap()protection_plan(...)policy_resolve(...)key_access_plan(...)artifact_register(...)evidence(...)
Python stays thin: the Rust core owns HTTP, auth header shaping, and platform contract behavior.
What ships in this repo
lattixsdk.client.LattixClient— async wrapper over the native Rust bindinglattixsdk.binding.RustBinding— low-level ctypes bridge to the Rust SDK corelattixsdk.models— Pydantic models mirroring the/v1/sdk/*control-plane contractexamples/example.ipynb— notebook example using the current bootstrap flow
Installation
Official wheel install
Supported wheels bundle the matching native sdk-rust shared library for the
target platform, so a normal wheel install is enough:
pip install lattix-sdk-python
The import package remains lattixsdk.
Source and editable installs
Source installs remain supported for local development and constrained
environments, but they require a separately built matching sdk-rust native
library.
Build sdk-rust first:
cd ../sdk-rust
cargo build --release
Then either:
- set
LATTIX_SDK_RUST_LIBto the compiled library path; or - stage the native library into this package before building a wheel with
python tools/stage_native_library.py.
The canonical C ABI lives in sdk-rust/include/lattix_sdk.h; this package intentionally does not maintain a second handwritten header.
Quickstart
import asyncio
from lattixsdk import LattixClient
async def main() -> None:
async with LattixClient(
base_url="https://api.lattix.io",
bearer_token="replace-me",
tenant_id="tenant-a",
user_id="user-a",
) as client:
bootstrap = await client.bootstrap()
print(bootstrap.enforcement_model)
asyncio.run(main())
Design notes
- The SDK is aligned to the embedded-enforcement model: applications protect data locally and only send metadata to the platform.
- The async API is implemented by running the native Rust calls in an executor, so callers can integrate it cleanly into async Python services.
- Pydantic models live under
lattixsdk.modelsand mirror the platform-api SDK contract.
Testing
Unit tests use a fake binding, so they run without the native library:
pip install -e .[test]
pytest
Native smoke tests are included as well. They auto-skip if the Rust library has not been built yet, and they run a real Rust-backed client against a local in-process HTTP server when the native artifact is present.
Local quality gate
Run the local quality gate before committing when you want automated fixes, security scans, tests, package builds, wheel-install smoke coverage, and cleanup in one step:
./precommit.sh
On Windows:
./precommit.ps1
The gate applies automated fixes first, then runs linting, SAST, secret scanning, tests, package builds, and an installed-wheel smoke test in a temporary virtual environment.
To wire the same checks into local Git commits and pushes:
./install-hooks.sh
or:
./install-hooks.ps1
The installed pre-commit hook runs a faster version of the gate; the
installed pre-push hook runs the full gate.
Release process
Maintainer release notes live in RELEASING.md. The publish workflow supports a
TestPyPI rehearsal path through trusted publishing before the first real PyPI
publish.
License
Distributed under the proprietary Lattix SDK License in LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lattix_sdk_python-0.1.0.tar.gz.
File metadata
- Download URL: lattix_sdk_python-0.1.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cca37944c3f86809835f5ddc71304835c0c711aa273bb23917c47579224b2e4
|
|
| MD5 |
934aeba0201bf88a1f03c653d93aa248
|
|
| BLAKE2b-256 |
88ab5fc831b1a7b5a3d082b5ed43541918b11ca345c24599e48ab0bf8af73ea2
|
Provenance
The following attestation bundles were made for lattix_sdk_python-0.1.0.tar.gz:
Publisher:
pypi.yml on LATTIX-IO/sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lattix_sdk_python-0.1.0.tar.gz -
Subject digest:
2cca37944c3f86809835f5ddc71304835c0c711aa273bb23917c47579224b2e4 - Sigstore transparency entry: 1339996253
- Sigstore integration time:
-
Permalink:
LATTIX-IO/sdk-python@bd9e41ff7e18456ffda79404b8ca346d02df1b97 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/LATTIX-IO
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@bd9e41ff7e18456ffda79404b8ca346d02df1b97 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file lattix_sdk_python-0.1.0-py3-none-win_amd64.whl.
File metadata
- Download URL: lattix_sdk_python-0.1.0-py3-none-win_amd64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56f6a0340e15bcd38c5902fd5bde3c3fe72fa82b96f9bcc2626f8d3a1ed6f458
|
|
| MD5 |
27900d8d713091349b4588ab4c8931e9
|
|
| BLAKE2b-256 |
4bd120070411975eddfe5abc2ced6d75539365b7e82ff5d462b33c98c2a78944
|
Provenance
The following attestation bundles were made for lattix_sdk_python-0.1.0-py3-none-win_amd64.whl:
Publisher:
pypi.yml on LATTIX-IO/sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lattix_sdk_python-0.1.0-py3-none-win_amd64.whl -
Subject digest:
56f6a0340e15bcd38c5902fd5bde3c3fe72fa82b96f9bcc2626f8d3a1ed6f458 - Sigstore transparency entry: 1339996263
- Sigstore integration time:
-
Permalink:
LATTIX-IO/sdk-python@bd9e41ff7e18456ffda79404b8ca346d02df1b97 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/LATTIX-IO
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@bd9e41ff7e18456ffda79404b8ca346d02df1b97 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file lattix_sdk_python-0.1.0-py3-none-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: lattix_sdk_python-0.1.0-py3-none-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc91fea179b3e2ae152fbd979323ebe1d0d0c1b4537c6b1f7f8856451dc88d9c
|
|
| MD5 |
cc6bd343d73eb9b440549f7ec26a448e
|
|
| BLAKE2b-256 |
6cbc1705880d4e66916c5019099b43af8f69d8990b3c472d656e813b700fd55a
|
Provenance
The following attestation bundles were made for lattix_sdk_python-0.1.0-py3-none-manylinux_2_39_x86_64.whl:
Publisher:
pypi.yml on LATTIX-IO/sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lattix_sdk_python-0.1.0-py3-none-manylinux_2_39_x86_64.whl -
Subject digest:
fc91fea179b3e2ae152fbd979323ebe1d0d0c1b4537c6b1f7f8856451dc88d9c - Sigstore transparency entry: 1339996261
- Sigstore integration time:
-
Permalink:
LATTIX-IO/sdk-python@bd9e41ff7e18456ffda79404b8ca346d02df1b97 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/LATTIX-IO
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@bd9e41ff7e18456ffda79404b8ca346d02df1b97 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file lattix_sdk_python-0.1.0-py3-none-macosx_11_0_universal2.whl.
File metadata
- Download URL: lattix_sdk_python-0.1.0-py3-none-macosx_11_0_universal2.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3, macOS 11.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
847c66b06a100d1a9283f367feb7ebe53786f0bede98174d750d6628b1641935
|
|
| MD5 |
2f3a777af5974e29d9d27f0a0efdb2c4
|
|
| BLAKE2b-256 |
b80d0cf43fc822221fd640f09fc5b6392b58271bcc4f369f91c05ffd7a98b7ae
|
Provenance
The following attestation bundles were made for lattix_sdk_python-0.1.0-py3-none-macosx_11_0_universal2.whl:
Publisher:
pypi.yml on LATTIX-IO/sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lattix_sdk_python-0.1.0-py3-none-macosx_11_0_universal2.whl -
Subject digest:
847c66b06a100d1a9283f367feb7ebe53786f0bede98174d750d6628b1641935 - Sigstore transparency entry: 1339996258
- Sigstore integration time:
-
Permalink:
LATTIX-IO/sdk-python@bd9e41ff7e18456ffda79404b8ca346d02df1b97 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/LATTIX-IO
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@bd9e41ff7e18456ffda79404b8ca346d02df1b97 -
Trigger Event:
workflow_dispatch
-
Statement type: