Template Plugin¶
To register a template plugin that can be used to initialize a new project setup with the setup wizard,
register the pydjinni.builder
entry-point in the plugins pyproject.toml
:
Where FooTarget
is implementing the TemplateTarget
interface.
Pydjinni will now automatically load the plugin, once it is installed.
TemplateTarget¶
Bases: ABC
Abstract base class that all template plugins must derive from.
additional_files
abstractmethod
cached
property
¶
Map of additional files not in the templates directory that should be included in the output. The key is the source of the file, the value is the relative output path where the file should be written to.
key
abstractmethod
cached
property
¶
The name of the package plugin. Will be used as configuration key.
parameters
abstractmethod
cached
property
¶
List of custom parameters that are required for rendering the template. Each parameter will be added as mandatory command line option that will prompt for a value if not provided by the user in the command call.
supported_platforms
abstractmethod
cached
property
¶
A list of target platforms that are supported by the template. Possible values can be defined by the template plugin.