mljet.cookie#
Subpackages#
Submodules#
mljet.cookie.cutter module#
Module that contains app builder.
- exception mljet.cookie.cutter.MypyValidationError[source]#
Bases:
Exception
Exception raised when the template is not passing mypy check.
- args#
- mljet.cookie.cutter.build_backend(template_path, methods_to_replace, methods, imports=None, ignore_mypy=False)[source]#
Build app from template.
- Parameters:
- Return type:
- Returns:
Result with app source code.
- Template specification:
template should have __main__ entrypoint.
template should have methods to replace, associated with passed methods.
template should have associated methods-endpoints.
template should have typing, that is pass mypy check.
- Some:
Reporting intermediate ddd data such as the current trial number back to the framework, as done in
MyPyValidationError
.
- Raises:
MypyValidationError – if template is not passing mypy check.
ValidationError – if template is not passing validation.
TypeError – if template is not passing validation.
FileNotFoundError – if template is not found.
Note
After app is built, it should be formatted with black, isort.
mljet.cookie.validator module#
Static code analysis of the template.