Install Scenet#

Requirements#

Python 3.12 or newer. No system libraries, no fonts to install, no configuration.

The 3.12 floor is not arbitrary — see why 3.12 if you are curious, but the short version is that a bug only reproducible on older Pythons made it worth testing against them.

As a tool#

To use the scenet command without adding it to a project:

uv tool install scenet

or

pipx install scenet

Either puts scenet on your PATH in its own isolated environment.

As a library#

uv add scenet

or

pip install scenet

Extras#

Two features need a package the plain install leaves out. Ask for it as an extra, in square brackets, with any of the commands above:

Extra

Adds

For

mcp

the mcp package

scenet mcp, which serves the compiler to a model or an agent. Without it, the command says so and exits 2

watch

watchfiles

scenet build --watch, which rebuilds on every save. Without it, --watch still works, by polling

uv tool install "scenet[mcp,watch]"

or, in a project:

uv add "scenet[watch]"

The quotation marks keep a shell from reading the brackets as a pattern.

Verify#

scenet --version

And from Python:

import scenet

assert scenet.__version__
assert "compile_source" in scenet.__all__

Types#

Scenet ships a py.typed marker, so mypy, pyright, ty and basedpyright all read its annotations directly from the installed package. There is no separate stubs package to install and nothing to configure.

from scenet import CompileResult, compile_source

result: CompileResult = compile_source("cast: {a: {reference: alice}}")
assert result.core.actors[0].id == "a"

What gets installed with it#

Scenet has eight runtime dependencies, all under permissive licenses, all checked by a CI gate that fails if any dependency ever changes to a license outside the allowed set:

Dependency

What for

pydantic

Validating the scene graph, and generating the JSON Schema

pyyaml

The YAML surface syntax

kiwisolver

The Cassowary constraint solver behind actor placement

shapely

Polygon intersection for the balloon occlusion cost

fonttools

Reading real font metrics, and extracting glyph outlines

numpy

A transitive requirement of shapely

fonts, font-source-sans-pro

The lettering font, as a dependency rather than a system lookup

That last row is the unusual one. Determinism requires that text measures identically everywhere, and a system font lookup cannot promise that — so the font arrives as an ordinary package. It is under the SIL Open Font License, which is the one dependency whose notice must travel with redistribution; see THIRD_PARTY_NOTICES.md.

Without installing anything#

The playground runs the same compiler in your browser under WebAssembly; Use the playground says what it can do, and why it cannot drift from what the command line does.