Skip to main content

gVisor Python Bindings

Python bindings for gVisor.

Overview

gVisor is an application kernel, written in Go, that implements a substantial portion of the Linux system surface. It includes an Open Container Initiative (OCI) runtime called runsc that provides an isolation boundary between the application and the host kernel. The runsc runtime delivers strong sandbox isolation while still allowing applications to behave as they would under standard runtimes.

These Python bindings provide a programmable interface to interact with gVisor.

Installation

pip install gvisor

The bindings run sandboxes with runsc, which needs the sidecar binaries that ship with it. Install a full gVisor release from the apt repository or the release tarball, as described in the gVisor installation guide. The package uses the runsc on your PATH, or the binary set in RUNSC_PATH.

Quickstart

from gvisor import Mount, NetworkMode, Sandbox

with Sandbox(
    network=NetworkMode.NONE,
    mounts=[Mount.tmpfs("/tmp")],
) as sb:
    stdout, _ = sb.exec("uname", "-a")
    print(stdout)

    stdout, _ = sb.exec("sh", "-c", "echo hi > /tmp/out && cat /tmp/out")
    print(stdout)

Documentation

License

Apache License 2.0

Metadata

Release files for gvisor 2026.11.2.0

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

Source distribution (sdist)

Source distribution for gvisor 2026.11.2.0
File Size Uploaded Provenance Actions
gvisor-2026.11.2.0.tar.gz 8.1 kB With provenance Details for gvisor-2026.11.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gvisor 2026.11.2.0
File Interpreter ABI Platform Actions
gvisor-2026.11.2.0-py3-none-any.whl Python 3 none any Details for gvisor-2026.11.2.0-py3-none-any.whl

Total release size: 16.5 kB

Release files / gvisor-2026.11.2.0.tar.gz

Download URL gvisor-2026.11.2.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7efe7f248d599ebce380a2ee718e0e2e8ccaec0bcab2b6cc6bd82bb2e81c541e
BLAKE2b-256 checksum
How to use checksums
c56244988633bd5a1a5cf7e5da021193091f489608d45988358125e76c061f70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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 Google Cloud, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / gvisor-2026.11.2.0-py3-none-any.whl

Download URL gvisor-2026.11.2.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
094c1d740ebac54c5ed6b8db8590b5e94adb17498e4c1e19abf626de2427bc12
BLAKE2b-256 checksum
How to use checksums
4ebe6643bcf797ba7535f73dff082ef59a91cd1e2f9bfcf34f5918578d42fe06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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 Google Cloud, verified by PyPI on Nov 2, 2026.

Transparency log

Security for gvisor 2026.11.2.0

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

Select from 2 files

Attestation for gvisor-2026.11.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by Google Cloud, verified by PyPI on Nov 2, 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