templates.template Module

The templates.template module

Abstract template class

class solidbyte.templates.template.Template(*args, **kwargs)[source]

Template abstract

__init__(*args, **kwargs)[source]

Init the Template object. Arguments can be added by subclasses. The one used by Template are documented below.

Parameters:
  • dir_mode – (int) The directory mode permissions
  • pwd – (pathlib.Path) The current working directory
copy_template_file(dest_dir, subdir, filename)[source]

Copy a file from the template module directory to dest

Parameters:
  • dest_dir – (pathlib.Path) - The destination directory in the project structure
  • subdir – (pathlib.Path) - The subdirectory under dest_dir
  • filename – (str) - The name of the destination file
Returns:

(str) Destination path

create_dirs()[source]

Create the project directory structure

initialize()[source]

This method performs all steps necessary to build a template. It must be implemented by the Template subclass.