Everything the aifilm CLI does is also exposed as a clean, minimal Python API so you can automate batch renders, multi-style comparisons, or CI video generation.
aifilm
| Symbol | Signature / Description |
|---|---|
| __version__ | Installed aifilm version string (e.g. "0.1.0") |
__version__
"0.1.0"
| new_project(directory) | Creates <directory>/film.yaml and <directory>/film.schema.json, returning the path to film.yaml |
new_project(directory)
<directory>/film.yaml
<directory>/film.schema.json
film.yaml
| render(film, out, *, edit="cut", style=None, final=False, overwrite=False) | Renders an H.264 MP4 in an isolated worker process and returns the output Path |
render(film, out, *, edit="cut", style=None, final=False, overwrite=False)
Path
| FilmError | Exception raised on YAML validation errors, failed --final quality checks, or protected existing outputs |
FilmError
--final
> Isolation guarantee: render() executes Chromium and engine plugins in a short-lived worker subprocess so your calling Python process stays clean and safe for concurrent jobs.
render()