Filesystem template loader.
最初に以下の最小例でモジュール利用方法を確認し、その後 API リファレンスを参照してください。
from nexom.app.template import ObjectHTMLTemplates
templates = ObjectHTMLTemplates(base_dir='templates', reload=False)
html = templates.render('default', title='Nexom')
分類: public class
クラスドキュメントは未定義です。
このクラスにメソッド定義はありません。
分類: internal class
Callable attribute-chain proxy. Examples: templates.default(title="x") -> templates.render("default", title="x") templates.layout.base(title="x") -> templates.render("layout.base", title="x")
分類: special method
__init__(self, templates: 'ObjectHTMLTemplates', name: str) -> None
メソッドドキュメントは未定義です。
templates / kind=positional-or-keyword / type='ObjectHTMLTemplates' / 必須 / default=なしname / kind=positional-or-keyword / type=str / 必須 / default=なしNone
実装コード内の例外仕様を確認してください。
from nexom.app.template import _TemplateAccessor
obj = _TemplateAccessor(templates=..., name="sample")
分類: special method
__getattr__(self, part: str) -> '_TemplateAccessor'
メソッドドキュメントは未定義です。
part / kind=positional-or-keyword / type=str / 必須 / default=なし'_TemplateAccessor'
実装コード内の例外仕様を確認してください。
from nexom.app.template import _TemplateAccessor
obj = _TemplateAccessor(...)
result = obj.__getattr__(part="sample")
print(result)
分類: special method
__call__(self, **kwargs: str) -> str
メソッドドキュメントは未定義です。
kwargs / kind=variadic-keyword(**kwargs) / type=str / 必須 / default=なしstr
実装コード内の例外仕様を確認してください。
from nexom.app.template import _TemplateAccessor
obj = _TemplateAccessor(...)
result = obj.__call__()
print(result)
分類: special method
__repr__(self) -> str
メソッドドキュメントは未定義です。
str
実装コード内の例外仕様を確認してください。
from nexom.app.template import _TemplateAccessor
obj = _TemplateAccessor(...)
result = obj.__repr__()
print(result)
分類: public class
Loads all *.html templates under base_dir and renders them using ObjectHTML. Public API: render("a.b", **kwargs) -> str Sugar: templates.a.b(**kwargs) -> render("a.b", **kwargs)
分類: special method
__init__(self, base_dir: str, reload: bool = False) -> None
メソッドドキュメントは未定義です。
base_dir / kind=positional-or-keyword / type=str / 必須 / default=なしreload / kind=positional-or-keyword / type=bool / 任意 / default=FalseNone
実装コード内の例外仕様を確認してください。
from nexom.app.template import ObjectHTMLTemplates
obj = ObjectHTMLTemplates(base_dir="sample", reload=False)
分類: special method
__getattr__(self, name: str) -> _TemplateAccessor
メソッドドキュメントは未定義です。
name / kind=positional-or-keyword / type=str / 必須 / default=なし_TemplateAccessor
実装コード内の例外仕様を確認してください。
from nexom.app.template import ObjectHTMLTemplates
obj = ObjectHTMLTemplates(...)
result = obj.__getattr__(name="sample")
print(result)
分類: public method
render(self, name: str, **kwargs: str) -> str
メソッドドキュメントは未定義です。
name / kind=positional-or-keyword / type=str / 必須 / default=なしkwargs / kind=variadic-keyword(**kwargs) / type=str / 必須 / default=なしstr
実装コード内の例外仕様を確認してください。
from nexom.app.template import ObjectHTMLTemplates
obj = ObjectHTMLTemplates(...)
result = obj.render(name="sample")
print(result)
分類: internal method
_rebuild_engine(self) -> None
メソッドドキュメントは未定義です。
None
実装コード内の例外仕様を確認してください。
from nexom.app.template import ObjectHTMLTemplates
obj = ObjectHTMLTemplates(...)
result = obj._rebuild_engine()
print(result)
分類: internal method
_scan_templates(self, root: Path) -> list[TemplateEntry]
メソッドドキュメントは未定義です。
root / kind=positional-or-keyword / type=Path / 必須 / default=なしlist[TemplateEntry]
実装コード内の例外仕様を確認してください。
from nexom.app.template import ObjectHTMLTemplates
obj = ObjectHTMLTemplates(...)
result = obj._scan_templates(root="/path/to/value")
print(result)
分類: internal method
_path_to_template_name(self, rel_path: Path) -> str
メソッドドキュメントは未定義です。
rel_path / kind=positional-or-keyword / type=Path / 必須 / default=なしstr
実装コード内の例外仕様を確認してください。
from nexom.app.template import ObjectHTMLTemplates
obj = ObjectHTMLTemplates(...)
result = obj._path_to_template_name(rel_path="/path/to/value")
print(result)
nexom.app.templateservices/venv/lib/python3.10/site-packages/nexom/app/template.py2026-03-14