Skip to main content

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

License

MIT

Metadata

Release files for tank-core 0.17.1

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

Source distribution (sdist)

Source distribution for tank-core 0.17.1
File Size Uploaded Provenance Actions
tank_core-0.17.1.tar.gz 13.2 kB With provenance Details for tank_core-0.17.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tank-core 0.17.1
File Actions
tank_core-0.17.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for tank_core-0.17.1-cp39-abi3-win_amd64.whl
tank_core-0.17.1-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details for tank_core-0.17.1-cp39-abi3-manylinux_2_28_x86_64.whl
tank_core-0.17.1-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for tank_core-0.17.1-cp39-abi3-manylinux_2_28_aarch64.whl
tank_core-0.17.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for tank_core-0.17.1-cp39-abi3-macosx_11_0_arm64.whl
tank_core-0.17.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for tank_core-0.17.1-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 1.8 MB

Release files / tank_core-0.17.1.tar.gz

Download URL tank_core-0.17.1.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f834cff07d41866539a498189fc377fa0f98ddd3b6619e814ecbe953186e30d8
BLAKE2b-256 checksum
How to use checksums
976e89ca88d4001c9b06ac71ed7857ef490ad80ccbf46565697e8bfec7497d41
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 17, 2026.

Transparency log

Release files / tank_core-0.17.1-cp39-abi3-win_amd64.whl

Download URL tank_core-0.17.1-cp39-abi3-win_amd64.whl
Size 315.3 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
bddd268dedabc5e41874dc6ed50df38b95116916609dfd2eba4c616e0dde8e7d
BLAKE2b-256 checksum
How to use checksums
d0935bfcc8c32c32b7cd1da2f1b680ebafc084d476369105679e48e57d8d7857
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 17, 2026.

Transparency log

Release files / tank_core-0.17.1-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL tank_core-0.17.1-cp39-abi3-manylinux_2_28_x86_64.whl
Size 394.9 kB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
9b5bf9a6f86620eb1e43e6067f52bb9079eac5548dca0b6c578825cde3f6740d
BLAKE2b-256 checksum
How to use checksums
4baeb317c6b55b52d8a0021241d176ff4fba325b0f0efc57f9a5a0081bd8ef8d
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 17, 2026.

Transparency log

Release files / tank_core-0.17.1-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL tank_core-0.17.1-cp39-abi3-manylinux_2_28_aarch64.whl
Size 377.0 kB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
a07cccb43554839fe4de70db5940216fed8895c8bc6403f4584030dc92a11de2
BLAKE2b-256 checksum
How to use checksums
c6978d0cbbdb7330dce7d52bf262f5b0525717cef356fa6c163ba4d3ed3e7ff5
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 17, 2026.

Transparency log

Release files / tank_core-0.17.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL tank_core-0.17.1-cp39-abi3-macosx_11_0_arm64.whl
Size 362.9 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0e95a92e446f37dd732a3edbac6daa9e43fcf6904c173c6d3427f301b6ead586
BLAKE2b-256 checksum
How to use checksums
af6cd08c023d78d21e57e42998435a8c0c5e846c905aacf5890569292e5e3857
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 17, 2026.

Transparency log

Release files / tank_core-0.17.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL tank_core-0.17.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 383.1 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
1f102203bcb0077d2d7ab6d9af731d9f0dcf9e158de4de76f6f96cdb0b194846
BLAKE2b-256 checksum
How to use checksums
5ea1ee6a594a487b141e265380040f9d85c78cd3321c33b192a22745db62758b
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 17, 2026.

Transparency log

Security for tank-core 0.17.1

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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for tank_core-0.17.1.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 Nov 17, 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