Skip to main content Switch to mobile version byterun 0.0.5 Official Python SDK for ByteRun, an AI infrastructure platform for Python, SQL and AI agent execution.
pip install byterun==0.0.5 Copy PIP instructions
The official Python SDK for ByteRun, an AI infrastructure platform that provides execution environments for Python, SQL and AI agents.
Early preview. Version 0.0.x is a preview: byterun login, and a first client that starts a project and runs Python in it. The API may still change between 0.0.x releases. Try ByteRun in the playground on byterun.io, and follow the roadmap for what comes next.
ByteRun gives developers managed environments to run code and AI agents without operating the infrastructure themselves. Today that covers Python, SQL and agent execution; the platform roadmap also includes headless jobs, workflows and inference. See the platform overview for details.
What this SDK is for
This SDK is meant to be the single Python entry point to ByteRun, so you can work with the platform from your own code, scripts and services. AI agent execution comes first; other platform capabilities will be added to the same package rather than split into separate ones.
Available today: projects (start, stop, status) and running Python code in them. Planned, in no fixed order and subject to change: files, SQL, headless jobs, workflows and inference.
Requires Python 3.10 or newer.
pip install byterun Check that it installed:
python -c "import byterun; print(byterun.__version__)" Running code
from byterun import ByteRun with ByteRun() as client: project = client.project() # the key's default project result = project.exec("x = 6 * 7; print(x)") print(result.stdout) # 42 print(project.exec("print(x + 1)").stdout) # 43: state is kept until the project stops project.stop() exec() starts the project if it is stopped and waits until it is ready (auto_start=False to refuse instead). A Python exception or a timeout comes back as a result: check result.ok, result.status and result.error. Problems with the request itself raise ByteRunError.
A run is safe to wait for. exec() submits it with a key made for that call and polls until it finishes, so a dropped connection, a rate limit or a gateway error is retried without running your code twice. Only two cases are unknown: the backend restarted mid-run (ExecutionOutcomeUnknownError, reason="lost") or nothing answered before the deadline. Both carry execution_id. If the run finished but its result is no longer stored, you get ExecutionExpiredError.
Ctrl-C asks ByteRun to cancel the run, then raises KeyboardInterrupt as usual with a note saying whether the run may still be going. cancel_on_interrupt=False leaves the run alone.
exec_file("script.py") runs one local file's text as exec(text); nothing else is uploaded.
client.project("name") picks a project by name, and creates it if the key may create projects.
project.start(), project.stop() and project.status() manage the project. stop() is never done for you: a running project uses your plan's compute hours.
ByteRun() finds a key in this order: the api_key= argument, then the BYTERUN_API_KEY environment variable, then the key byterun login saved. For CI, servers and containers, create a key in Settings, API keys on byterun.io and set BYTERUN_API_KEY.
Logging in from the command line
pip install byterun byterun login # opens your browser; approve the request, and a key is saved on this machine byterun logout # revokes this machine's key and deletes the saved credentials byterun login prints a short code and a link, opens the link in your browser and waits. Check that the code on the page matches the one in your terminal before you approve, and only approve a login you started. Each machine gets its own key (limited to your starter project, 90 days), so revoking one never affects another. You can see and revoke keys in Settings on byterun.io.
--no-browser only prints the link, for SSH and headless machines: open it on any device.
--force logs in again even if this machine is already logged in. The new key is saved first, then the old one is revoked.
byterun logout --local-only only deletes the local file; the key stays valid until revoked.
Exit codes: 0 success, 1 failure (denied, expired, network), 2 usage error, 130 Ctrl+C.
The key is stored in ~/.config/byterun/credentials.json (or under $XDG_CONFIG_HOME), a 0600 file in a 0700 directory, and is never printed. The SDK talks to https://api.byterun.io; set BYTERUN_API_URL only to point at another deployment. A key is accepted on the API host only.
A key lets code run in your project's container with that project's privileges. ByteRun is not a sandbox for untrusted code: treat the key like a password.
Feedback and contributions
Questions, ideas and bug reports are welcome as GitHub issues. The API is still being designed, so please open an issue to discuss before sending a large pull request.
Website: https://byterun.io/
Platform: https://byterun.io/platform
Roadmap: https://byterun.io/roadmap
PyPI: https://pypi.org/project/byterun/
Licensed under the Apache License, Version 2.0. Unless required by applicable law or agreed to in writing, the software is distributed on an "AS IS" basis, without warranties or conditions of any kind.
Released: Dec 5, 2026
Both files in this release have provenance metadata.
View provenance details
Apache-2.0 View SPDX License List
agents ai byterun execution infrastructure python sdk
Development Status 1 - Planning
Intended Audience Developers
Operating System OS Independent
Programming Language Python :: 3
Release files for byterun 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 68.8 kB
Release files / byterun-0.0.5.tar.gz
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 Dec 5, 2026.
Release files / byterun-0.0.5-py3-none-any.whl
Security for byterun 0.0.5
Both files in this release have been uploaded with provenance metadata.
With provenance byterun-0.0.5.tar.gz Dec 5, 2026
With provenance byterun-0.0.5-py3-none-any.whl Dec 5, 2026
Attestation for byterun-0.0.5.tar.gz
Attestation for byterun-0.0.5-py3-none-any.whl
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.
Release history Release notifications | RSS feed
Dec 6, 2026 2 release files Full provenance
Dec 5, 2026 2 release files Full provenance
Dec 4, 2026 2 release files Full provenance
Dec 1, 2026 2 release files Full provenance
Nov 17, 2026 2 release files Full provenance
Nov 17, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 4d99e05











