- clubs, booking platforms and user are now defined in customization files -> there are less environment variables - the responsibility of the session moved - booking cancellation is available
12 lines
357 B
Python
12 lines
357 B
Python
from pathlib import Path
|
|
|
|
from jinja2 import Environment, FileSystemLoader
|
|
|
|
|
|
class PayloadBuilder:
|
|
@staticmethod
|
|
def build(template_path: Path, **kwargs) -> str:
|
|
environment = Environment(loader=FileSystemLoader(template_path.parent))
|
|
template = environment.get_template(template_path.name)
|
|
|
|
return template.render(**kwargs)
|