pod_porter.render package

Submodules

pod_porter.render.render module

Rendering engine

class pod_porter.render.render.Render(templates_dir: str | None = None)[source]

Bases: object

Render the templates class

Parameters:

templates_dir (Optional[str] = None) – The directory where the templates are located

Return type:

None

Returns:

Nothing

BASE_DIRECTORY = '/home/docs/checkouts/readthedocs.org/user_builds/pod-porter/checkouts/latest/pod_porter/render'
TEMPLATE_DIRECTORY = '/home/docs/checkouts/readthedocs.org/user_builds/pod-porter/checkouts/latest/pod_porter/render/templates'
from_file(template_name: str, render_vars: dict) str[source]

Render the template from a file

Parameters:
  • template_name (str) – The name of the template to render

  • render_vars (dict) – The variables to render the template with

Return type:

str

Returns:

The rendered template

from_string(template_string: str, render_vars: dict)[source]

Render the template from a string

Parameters:
  • template_string (str) – The string of the template to render

  • render_vars (dict) – The variables to render the template with

Return type:

str

Returns:

The rendered template

Module contents