betty.generate module - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.generate module

Provide the Generation API.

class betty.generate.GenerateSiteEvent

  Bases: `ProjectEvent`

  Dispatched to generate (part of) a project’s site.

async betty.generate.create_file(path: Path) → AsyncContextManager[AsyncTextIOWrapper]

  Create the file for a resource.

async betty.generate.create_html_resource(path: Path) → AsyncContextManager[AsyncTextIOWrapper]

  Create the file for an HTML resource.

async betty.generate.create_json_resource(path: Path) → AsyncContextManager[AsyncTextIOWrapper]

  Create the file for a JSON resource.

async betty.generate.generate(project: Project) → None

  Generate a new site.