betty.generate module

Provide the Generation API.

class betty.generate.GenerationContext(app)[source]

Bases: Context

Parameters:
app

property app : App
class betty.generate.Generator[source]

Bases: object

async generate(job_context)[source]
Parameters:
job_context

Return type:

None

async betty.generate.create_file(path)[source]

Create the file for a resource.

Parameters:
path

Return type:

typing.AsyncContextManager[aiofiles.threadpool.text.AsyncTextIOWrapper]

async betty.generate.create_html_resource(path)[source]

Create the file for an HTML resource.

Parameters:
path

Return type:

typing.AsyncContextManager[aiofiles.threadpool.text.AsyncTextIOWrapper]

async betty.generate.create_json_resource(path)[source]

Create the file for a JSON resource.

Parameters:
path

Return type:

typing.AsyncContextManager[aiofiles.threadpool.text.AsyncTextIOWrapper]

async betty.generate.generate(app)[source]

Generate a new site.

Parameters:
app

Return type:

None

betty.generate.getLogger()[source]

Get the site generation logger.

Return type:

logging.Logger