writer API reference¶
Writer class to be used with Jinja2 templates
-
class
biomajmanager.writer.
Writer
(template_dir=None, config=None, output=None)[source]¶ Writer class for BioMAJ manager to create what’s desired as output
-
__init__
(template_dir=None, config=None, output=None)[source]¶ Create Writer object
Parameters: Raises: - SystemExit – If ‘template_dir’ is not given
- SystemExit – If ‘MANAGER’ section not found in
manager.properties
- SystemExit – If ‘template.dir’ not set in
manager.properties
-
__weakref__
¶ list of weak references to the object (if defined)
-
write
(template=None, data=None)[source]¶ Print template ‘data’ to stdout using template file ‘template’.
‘data’ arg can be left None, this way method can be used to render file from scratch
Parameters: Returns: True, throws on error
Return type: Raises: - SystemExit – If ‘template’ is None
- SystemExit – If ‘template’ is not found
- SystemExit – If ‘template’ has a syntax error in it
- SystemExit – If ‘output’ file cannot be opened
-