Skip to main content

Python toolkit for Jupyter runtimes, powered by runtimed Rust binaries

Project description

runtimed

Python bindings for the runtimed notebook daemon. Execute code, manage kernels, and interact with notebooks programmatically.

Installation

pip install runtimed

Quick Start

Synchronous API

import runtimed

with runtimed.Session() as session:
    session.start_kernel()
    result = session.run("print('hello')")
    print(result.stdout)  # "hello\n"

Async API

import asyncio
import runtimed

async def main():
    async with runtimed.AsyncSession() as session:
        await session.start_kernel()
        result = await session.run("print('hello async')")
        print(result.stdout)

asyncio.run(main())

Features

  • Code execution via daemon-managed kernels
  • Sync and async APIs for flexibility
  • Document-first model with automerge sync
  • Multi-client support for shared notebooks
  • Rich output capture (stdout, stderr, display_data, errors)

Session API

session = runtimed.Session(notebook_id="my-notebook")
session.start_kernel()

# Simple execution
result = session.run("x = 42")

# Document-first pattern (for fine-grained control)
cell_id = session.create_cell("print(x)")
result = session.execute_cell(cell_id)

# Inspect results
print(result.success)
print(result.stdout)
print(result.error)

AsyncSession API

async with runtimed.AsyncSession(notebook_id="my-notebook") as session:
    await session.start_kernel()
    result = await session.run("x = 42")

    # Or document-first pattern
    cell_id = await session.create_cell("print(x)")
    result = await session.execute_cell(cell_id)

DaemonClient API

client = runtimed.DaemonClient()
client.ping()        # Health check
client.status()      # Pool statistics
client.list_rooms()  # Active notebooks

Requirements

  • runtimed daemon running (runt daemon start)
  • Python 3.9+

Documentation

See docs/python-bindings.md for full documentation.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

runtimed-0.1.5a202603042356-cp39-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.9+Windows x86-64

runtimed-0.1.5a202603042356-cp39-abi3-manylinux_2_39_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.39+ x86-64

runtimed-0.1.5a202603042356-cp39-abi3-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file runtimed-0.1.5a202603042356-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: runtimed-0.1.5a202603042356-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runtimed-0.1.5a202603042356-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4f7ff2bfa7427de6d162379bedae052e384d5981c660a6a669261b62acfd49ce
MD5 a747a9ab546140d0f957e3f63b6ce823
BLAKE2b-256 ae10e98e872387ca8624d3c4d10685791872056fe3d2d10a7149c99429b5c344

See more details on using hashes here.

File details

Details for the file runtimed-0.1.5a202603042356-cp39-abi3-manylinux_2_39_x86_64.whl.

File metadata

  • Download URL: runtimed-0.1.5a202603042356-cp39-abi3-manylinux_2_39_x86_64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.9+, manylinux: glibc 2.39+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runtimed-0.1.5a202603042356-cp39-abi3-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 93735a24a4212caf1e31f2ab51734f7c54a310f023ae55a34a6cdf8db7cd7027
MD5 6f6861679a5f6179ffb1ce2b4136ff13
BLAKE2b-256 86457a0a50d536593fd3232fbffab743eb2fb34eb31e9b86f21aa3c279d9bd61

See more details on using hashes here.

File details

Details for the file runtimed-0.1.5a202603042356-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: runtimed-0.1.5a202603042356-cp39-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.9+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runtimed-0.1.5a202603042356-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b3ffb0386b61ce8c481e67e56af082d9895e2952bcf2d566fda9e6b61f0271ca
MD5 8400bfa383609fa8d34aff39494e81f7
BLAKE2b-256 5b58b44f6e8013201a749075f06bc8f920e19c696c362da4c08b7343ea6cec84

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page