Skip to content

Session

Session

Session(client=None, timing=False)

Scoped workspace session.

The session owns a temporary workspace and a pipeline instance. generate_spec builds and runs the pipeline once; subsequent render() calls reuse the already-computed outputs.

When timing=True, all operations are tracked in self.timer.

generate_spec

generate_spec(prompt, data)

Generate a visualization specification.

All internal processing is done by the compiled engine. The session keeps the pipeline instance alive for render() reuse.

If the server-generated data pipeline fails locally, retries with a new server call (the plan is non-deterministic).

PARAMETER DESCRIPTION
prompt

Natural language visualization request.

TYPE: str

data

pandas DataFrame, dict of DataFrames, or compatible input.

TYPE: Any

RETURNS DESCRIPTION
NveilSpec

NveilSpec bound to this session's workspace.