execkit (Python)
Stateful, structured, safe shell sessions for AI agents - over local shells, SSH, and Docker. Native bindings to the execkit Rust core.
pip install execkit
from execkit import Session
with Session.local() as s:
r = s.exec("echo hi; echo err >&2; cd /tmp")
print(r.stdout, r.exit_code, r.cwd, r.stderr) # hi 0 /tmp err
State (cwd, env) persists across exec calls. Every result is a structured
ExecResult (split stdout/stderr, exit code, cwd, duration, truncated,
timed_out), already secret-redacted and output-bounded. Pass a Policy for an
advisory command fence: Session.local(policy=Policy(deny=["rm"])).
Timeouts
Session.local(timeout=...) sets the default per-command timeout in seconds, and
exec(cmd, timeout=...) overrides it for one call. A command that outlives it is
interrupted with Ctrl-C and returned with timed_out=True and exit_code == 124.
The session keeps its cwd and env:
with Session.local() as s:
r = s.exec("sleep 10", timeout=1)
print(r.timed_out, r.exit_code) # True 124
Only a command that ignores Ctrl-C raises execkit.Timeout and leaves the session
unusable. stdin is closed, so commands that prompt get end-of-file instead of
hanging; use non-interactive flags such as sudo -n.
Async callers: r = await asyncio.to_thread(s.exec, "npm ci") (the native call
releases the GIL).
Unix-only (local sessions need a POSIX shell). See the project README for the full picture and the operator security model.
License
Apache-2.0.
Metadata
Release files for execkit 0.10.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| execkit-0.10.1.tar.gz | 115.2 kB | With provenance | Details for execkit-0.10.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| execkit-0.10.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details for execkit-0.10.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| execkit-0.10.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ ARM64 | Details for execkit-0.10.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| execkit-0.10.1-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details for execkit-0.10.1-cp38-abi3-macosx_11_0_arm64.whl |
| execkit-0.10.1-cp38-abi3-macosx_10_12_x86_64.whl | CPython 3.8 | abi3 | macOS 10.12+ x86-64 | Details for execkit-0.10.1-cp38-abi3-macosx_10_12_x86_64.whl |
Total release size: 10.4 MB
Release files / execkit-0.10.1.tar.gz
| Download URL | execkit-0.10.1.tar.gz |
|---|---|
| Size | 115.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
358e5135e1df44eaa5577e142115c348711a504206fdfc9a0c2370f962799821
|
|
BLAKE2b-256 checksum How to use checksums |
3e2864b576db152c0752418cb4ad4557fcf24c9ccc83154d66630364c0a22c51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / execkit-0.10.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | execkit-0.10.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
aade0c9cbe7107edcb2fd23e4677fd23dde967fa4db58a03b8bc1a8d448b5512
|
|
BLAKE2b-256 checksum How to use checksums |
8b3be834aefaee2bcdb14f4b540ab6318d166b2a81e8188ad2d675aab56e1851
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / execkit-0.10.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | execkit-0.10.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
bee1bf5815cbaf88d099682de73ec2e93d65a312f0135e7cbdd33551e34ea995
|
|
BLAKE2b-256 checksum How to use checksums |
d5c50c52bc17b06363b4d2f8011e9abba8d4d13c5e051bfc17fac1be41b814e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / execkit-0.10.1-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | execkit-0.10.1-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
292916751e6eb6687b85c257d720dfb84721468eae9fa7ebc00b8c6c3477a234
|
|
BLAKE2b-256 checksum How to use checksums |
8399c9bae835012ee5a4e2b798922389a38e8b83013153deec7715bba4b56070
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / execkit-0.10.1-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | execkit-0.10.1-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
e8956a2d493af02ab17f240617832fa4225b95c3ecef05930918b301366841b2
|
|
BLAKE2b-256 checksum How to use checksums |
bf95ea0765975da5fe95edc399d62e05b5f73aa914146586062243cd0a4002d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logSecurity for execkit 0.10.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 5 files in this release have been uploaded with provenance metadata.
Attestation for execkit-0.10.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 Sep 26, 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.