Skip to main content

Scrybe — MCP-native Markdown editor library (Rust-backed). Provides the `scrybe` import package.

Project description

scrybe-py

PyO3 bindings that expose scrybe-core and scrybe-render to Python as the scrybe._rust native extension module. Python on the outside, Rust on the inside — this crate is the seam between the two.

What it does

Wraps the Rust Document, ContentId, and render_html in Python-callable classes and functions. Python code (the scrybe package, plugins, and the gila scrybe CLI integration) calls these via the compiled extension module without any Rust toolchain at runtime.

Role in the architecture

scrybe-py is a thin translation layer. It re-exports scrybe-core and scrybe-render types directly and adds only the PyO3 #[pyclass] wrappers needed for the Python boundary. The module is built with maturin and installed as scrybe/_rust.so (Linux/macOS) or scrybe/_rust.pyd (Windows).

Key public types and entry points

Python name Rust source Description
scrybe._rust.Document scrybe_core::Document Load, inspect, and render Markdown; content_id(), render_html(theme?), ast_title()
scrybe._rust.ContentId scrybe_core::ContentId ContentId.of(bytes), verify(bytes), as_hex()
scrybe._rust.render_markdown(source, theme?) scrybe_render::render_html One-shot render without opening a Document object

The python feature gate controls whether PyO3 bindings are compiled in. The crate can also be used as a plain Rust library (re-exporting core types) without the feature.

Build and test

# Build the Python extension (editable install into active venv)
maturin develop --features python,extension-module

# Run Rust unit tests (no Python required)
cargo test -p scrybe-py

# Smoke test from Python
python -c "from scrybe._rust import Document; d = Document('# Hi'); print(d.content_id())"

Requires maturin (pip install maturin) and a Rust toolchain. The workspace Cargo.toml pins pyo3 = "0.28" with auto-initialize.

Project details


Download files

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

Source Distribution

scrybe_py-0.1.0a1.tar.gz (61.1 kB view details)

Uploaded Source

File details

Details for the file scrybe_py-0.1.0a1.tar.gz.

File metadata

  • Download URL: scrybe_py-0.1.0a1.tar.gz
  • Upload date:
  • Size: 61.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for scrybe_py-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 c5784ecad02288218f420ae0317523ff6707c46fb2625b1245faf2c3d1d046bc
MD5 f981e62d48b060cee130d497d1e399b0
BLAKE2b-256 98e95b88f7cbd1425c73abb6e33f3243b6ea56c00832f50f0071391b20709e57

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