ninjadog.ext package

Submodules

ninjadog.ext.pyramid module

class ninjadog.ext.pyramid.PugRendererFactory(info)[source]

Bases: object

template_cache = {}
ninjadog.ext.pyramid.changed(dictionary: dict, key: typing.Any, value: typing.Any) → bool[source]

Return true if the value for the given key in the dictionary has changed.

Parameters:
  • dictionary – dict
  • key – any
  • value – any

Returns:

ninjadog.ext.pyramid.includeme(config)[source]
ninjadog.ext.pyramid.remove_file_if_exists(file: pathlib.Path) → True[source]

Removes the file from the file system if it exists.

Parameters:file – filepath

Returns: True

ninjadog.ext.pyramid.resolve(path: str, caller=None) → pathlib.Path[source]

Return the path of the given string, given a path or asset spec.

Parameters:
  • path – absolute or relative path or asset spec
  • caller – the python module or package that called the function

Returns: Path to file

ninjadog.ext.pyramid.truth(value: typing.Union[bool, str]) → bool[source]

Return whether the value is True or not.

Parameters:value – an element parsed from a settings dictionary

Returns: bool

Module contents