Skip to main content

Python SDK

Requires Python 3.11+. Install the SDK from PyPI:

pip install vork

The SDK contains no renderer. For std() and render(), install it separately:

npm install -g @voyager-so/vork

Keep npm's optional dependencies enabled and use matching SDK and renderer versions. Or use the curl installer or platform archive. The renderer must be on PATH, or set VORK_BIN to the vork executable. Types and scene writing work without the renderer.

from vork import Scene, std, write_scene exposes the scene type, the shared CLI engines and scene writing:

from vork import Scene, std, write_scene

shape = std('rounded_box', name='block', size=[2,1,1], radius=0.1)
scene: Scene = {'version': 2, **shape,
                'nodes': [{'type': 'mesh', 'geometry': 'block'},
                          {'type': 'camera', 'translation': [3, 2, 5], 'target': [0, 0, 0]}]}
write_scene(scene, 'block.json')  # block.json + its immutable buffer sidecar

write_scene(scene, path, base_dir=None) mirrors the TypeScript writeScene: resource paths resolve against base_dir (default the working directory) and are written relative to the scene; inline buffers of 4 KiB or more (std shapes, bulky mesh data) go to one PATH.buffers.UUID.bin sidecar. The input is not modified.

std(function, argument) or std(function, **options) invokes vork std using JSON. Set VORK_BIN to choose the executable. Maths, tracks and settings are plain Python and scene data.

render('shot.json', 'still.png', at=0, profile='std/previs') runs vork render with render-time options (at, profile, set, channels); the scene file is unchanged.

Regenerate with scripts/generate-docs; check with python3 packages/python/generate.py --check.

Custom Slang programs declare vertex inputs as Attribute<float> through Attribute<float4>. The generated AttributeBinding type keeps JSON bindings such as {"attribute": "COLOR_0", "channel": "rgb", "factor": [1, 0.5, 1]}. read_attribute(inputs.tint, ctx) returns value and screen footprints (dx, dy) in raster and ray shading. Installation checks names and types on every bound mesh.

Scene writes complete the sidecar before atomically replacing the JSON, then remove obsolete generated sidecars referenced by the replaced JSON. Referenced resources and unrelated files are preserved. Serialize saves to the same destination and finish reading its buffers before regenerating it; copy the whole scene tree for a lasting snapshot. Fresh files use ordinary permissions (0666 masked by umask); replacement JSON preserves its existing permissions. Failed publication removes the new sidecar and keeps the old scene.

render() prints the CLI exposure lines and returns {exposure: [{output, exposure}], warnings}. warnings contains {code, requested, dropped} records for requested effects omitted or substituted by the renderer, also printed prominently by the CLI and written into each render metadata sidecar. Check this array before accepting a render. Each summary contains frames, coverage (mean alpha), clipped, near_black, mean, and worst_clipped/worst_near_black (share, absolute frame). EXR and control-only outputs have no entry. Statistics weight display RGB by alpha; empty coverage gives null metrics and worst-frame entries. Clip averages exclude empty frames. clipped is a display channel at 99% or more, where a view ran out of range; a canvas with no world, view or compositor shows authored colours as they are and gives null clipped and worst_clipped. Values retain full precision from the output metadata.

Surface programs author emitted light once with OpenPBR emission_color and emission_luminance; hits and light samples share that evaluation. Use lit for authored glow that should not become a sampled light.

Scene JSON may include "$schema": "https://voyager.so/vork/schema/scene.schema.json" for editor completion and validation. This metadata does not affect rendering and is never fetched by vork. vork init includes it automatically. SDK writers preserve an explicit $schema but do not insert one. SDK render helpers require the current completion metadata contract, including its warnings list.

Metadata

Release files for vork 0.6.1

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

Built distribution (wheel)

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

Release files / vork-0.6.1-py3-none-any.whl

Download URL vork-0.6.1-py3-none-any.whl
Size 34.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12107f9f13c7a0d4a5fac3a421d6d1e2b802475a8ed196aec857ac0152dd51c5
BLAKE2b-256 checksum
How to use checksums
3a0c5076daf05c57ccd2f0d5302082fb5282aa8112960f58c2b7a7a6bd05fd1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Security for vork 0.6.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

1 file in this release has been uploaded with provenance metadata.

Attestation for vork-0.6.1-py3-none-any.whl

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 Nov 18, 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