ninjadog.ext package

Submodules

ninjadog.ext.pyramid module

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

Bases: object

ninjadog.ext.pyramid.get_and_update(dictionary: dict, key: typing.Any, value: typing.Any) → typing.Any[source]

Get the previous value for the key and update with the new value.

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

Returns: the previous value for that key or the value if the key didn’t exist

ninjadog.ext.pyramid.includeme(config)[source]
ninjadog.ext.pyramid.reset_tempdir()
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.run_once()[source]

Creates the temporary directory at runtime idempotently.

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