whisk.whisk

Main module.

Module Contents

Functions

root_module_dir()

Returns a Path object with the root whisk module directory.

cookiecutter_template_dir()

to_slug(str)

Converts a string to a slug:

create(dir, force=False, module_name=None, dependency=f'whisk=={whisk.__version__}', install_requires=f'whisk=={whisk.__version__}')

Creates a whisk project.

Attributes

logger

whisk.whisk.logger[source]
whisk.whisk.root_module_dir()[source]

Returns a Path object with the root whisk module directory.

whisk.whisk.cookiecutter_template_dir()[source]
whisk.whisk.to_slug(str)[source]

Converts a string to a slug:

  • Makes all letters lowercase

  • Replaces spaces with underscores

whisk.whisk.create(dir, force=False, module_name=None, dependency=f'whisk=={whisk.__version__}', install_requires=f'whisk=={whisk.__version__}')[source]

Creates a whisk project.

dirstr

Path of the directory to create the project. The directory name is converted to a slug via project_name_to_slug().

module_namestr, optional

Name of the module used when importing the project. This is converted to a slug via project_name_to_slug(). Default is the project_name.

forcebool, optional

Recreates the project directory if it exists. Default is False.

dependencystr, optional

The whisk dependency entry in the project’s requirements.txt file. Default locks to the current version. The version lock is restrictive as earlier and later versions of whisk could expect a different template structure and break functionality.

install_requiresstr, optional

The whisk install_requires entry in the project’s setup.py file. Default locks to the current version. The version lock is restrictive as earlier and later versions of whisk could expect a different template structure and break functionality.