cuery.templates#
Jinja templates for common tasks in cuery.
Functions#
|
Get the absolute path to a resource file within the cuery package. |
|
Load a template from a local, relative resource path. |
|
Get a prompt with the chosen template appended. |
Package Contents#
- cuery.templates.resource_path(relpath)#
Get the absolute path to a resource file within the cuery package.
- Parameters:
relpath (str | pathlib.Path)
- cuery.templates.load_template(name)#
Load a template from a local, relative resource path.
- Parameters:
name (str | pathlib.Path)
- Return type:
str
- cuery.templates.prompt_with_template(prompt, template, separator='\n', params=None)#
Get a prompt with the chosen template appended.
- Parameters:
prompt (str)
template (str)
separator (str)
params (dict | None)
- Return type:
str