tank-core
Native Rust primitives for the Tank Python SDK. Provides SHA-512 integrity verification, tarball extraction with path traversal protection, semver resolution, and permission checks — built in Rust, exposed via pyo3.
Most users do not install this directly. Install the high-level SDK instead:
pip install "tank-sdk[native]"
That pulls tank-core as a dependency and the SDK loads it transparently. Installing tank-core alone is supported but exposes a low-level API that the SDK abstracts.
Install
pip install tank-core
Pre-built wheels ship for:
- Linux x86_64 and aarch64 (manylinux_2_28)
- macOS x86_64 (10.12+) and arm64 (11+)
- Windows x86_64
Built against Python's stable ABI (abi3), compatible with Python 3.11+. Unsupported platforms (e.g. musllinux, FreeBSD) fall back to an sdist build that requires a Rust toolchain.
Low-level API
import tankpkg_core
tankpkg_core.verify_integrity(data, "sha512-...")
tankpkg_core.extract_tarball(data, "/tmp/dest")
tankpkg_core.resolve_version(["1.0.0", "1.1.0", "2.0.0"], "^1.0.0")
tankpkg_core.is_path_allowed("/src/foo.ts", ["/src/**"])
tankpkg_core.is_domain_allowed("api.anthropic.com", ["*.anthropic.com"])
budget = tankpkg_core.Permissions(
network_outbound=["*.anthropic.com"],
fs_read=["/src/**"],
fs_write=["/output/**"],
subprocess=False,
)
skill_perms = tankpkg_core.Permissions(fs_read=["/src/**"])
tankpkg_core.check_permission_budget(budget, skill_perms, "@example/skill")
Errors use standard Python exceptions: ValueError for integrity failures, IOError for extraction failures, PermissionError for budget violations.
Building from source
Requires Rust and maturin:
cd packages/sdk-core/crates/python
maturin develop
Links
- Homepage: https://tankpkg.dev
- SDK: https://pypi.org/project/tank-sdk/
- Source: https://github.com/tankpkg/tank
- Issues: https://github.com/tankpkg/tank/issues
License
MIT
Metadata
Release files for tank-core 0.16.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tank_core-0.16.2.tar.gz | 13.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| tank_core-0.16.2-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| tank_core-0.16.2-cp39-abi3-manylinux_2_28_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| tank_core-0.16.2-cp39-abi3-manylinux_2_28_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| tank_core-0.16.2-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| tank_core-0.16.2-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 1.9 MB
Release files / tank_core-0.16.2.tar.gz
| Download URL | tank_core-0.16.2.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f607f6d8dfd089309767bbae85dcf89eb08d5a06c96c8eed53193aeaff65c37
|
|
BLAKE2b-256 checksum How to use checksums |
b1fa8ae14e00d5e877b59d1b1b3712f8e830dd976024d4d8bea08fd7bd75e050
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 23, 2026.
Transparency logRelease files / tank_core-0.16.2-cp39-abi3-win_amd64.whl
| Download URL | tank_core-0.16.2-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 314.6 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
fa74891c40d90d16ee03e06c429efc21486005b9d8df6e99c787ee4908262860
|
|
BLAKE2b-256 checksum How to use checksums |
40da7fa9314409f84fb76261fc03fb38cad2ac1b2bbcf3da29233bb37e7b2fd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 23, 2026.
Transparency logRelease files / tank_core-0.16.2-cp39-abi3-manylinux_2_28_x86_64.whl
| Download URL | tank_core-0.16.2-cp39-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 398.3 kB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
71808fd52b0fdaa818669123104df34a394620210722f08e36073f82b3d33110
|
|
BLAKE2b-256 checksum How to use checksums |
f293baffc0c7da4f946c45ab29360e8bfc45d0f099dd06aba56510f48f0eeed9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 23, 2026.
Transparency logRelease files / tank_core-0.16.2-cp39-abi3-manylinux_2_28_aarch64.whl
| Download URL | tank_core-0.16.2-cp39-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 381.9 kB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
b1f06edd6a7ab8549bdec92cf762161c836f053a439771c5cf5d6ef501568b5b
|
|
BLAKE2b-256 checksum How to use checksums |
141806434cbf87b033eb86ec56563e5b61d54ee30379134b9d54e615d8ec7891
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 23, 2026.
Transparency logRelease files / tank_core-0.16.2-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | tank_core-0.16.2-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 365.4 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a2bddfa2a728af6985ccdc37c3a988c5b31b40c445509dcc1d31de69ecc26776
|
|
BLAKE2b-256 checksum How to use checksums |
3ab45e565d52bd343ee22ba571f4f7262de19de9c3d3193f42f2fca86097a673
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 23, 2026.
Transparency logRelease files / tank_core-0.16.2-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | tank_core-0.16.2-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 386.6 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
3611ccb8fd2127923db9a218f0264c230e8132e2fe596be5392050a52f633cfd
|
|
BLAKE2b-256 checksum How to use checksums |
87fc7d059ce2f9a1a591b9faabde2d129dad6ed553dabd68cf8b9fb925c9008f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 23, 2026.
Transparency log