معرفی شرکت ها


chameleon-fetcher-0.0.2


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Utility to quickly fetch and render a chameleon template
ویژگی مقدار
سیستم عامل -
نام فایل chameleon-fetcher-0.0.2
نام chameleon-fetcher
نسخه کتابخانه 0.0.2
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Joerg Baach
ایمیل نویسنده mail@baach.de
آدرس صفحه اصلی https://github.com/jhb/chameleon_fetcher
آدرس اینترنتی https://pypi.org/project/chameleon-fetcher/
مجوز -
# Chameleon fetcher A small wrapper for [chameleon page templates](https://github.com/malthe/chameleon) to easily fetch and render templates. ## Installation ```bash pip install chameleon_fetcher ``` ## Usage E.g. you have in template dir `my_template_dir` a file `simple.pt` with the following content: ```html <test>${template_name} ${myvar} ${some_var}</test> ``` You can then do: ```python from chameleon_fetcher import ChameleonFetcher cf = ChameleonFetcher('my_template_dir', some_var=42) output = cf('simple', myvar='test') assert output == '<test>simple test 42</test>' ``` Please note how `some_var` is set "globally", while for the specific template also a variable `myvar` is used. The following parameters are accepted by ChameleonFetcher: - **template_dir**: the directory where the templates are located And optionally: - _extension_: extension of the template files, defaults to '.pt' - _boolean_attributes_: what boolean attributes should be supported, defaults to all valid html boolean attributes. See https://meiert.com/en/blog/boolean-attributes-of-html/ - _auto_reload_: if the templates should be reloaded on change, defaults to True - **kwargs: other params you want to have available in all templates, e.g. flask=flask For using the actual templates, check the fantastic [chameleon documentation](https://chameleon.readthedocs.io/en/latest/).


نیازمندی

مقدار نام
- Chameleon
- pytest


زبان مورد نیاز

مقدار نام
>=3.6 Python


نحوه نصب


نصب پکیج whl chameleon-fetcher-0.0.2:

    pip install chameleon-fetcher-0.0.2.whl


نصب پکیج tar.gz chameleon-fetcher-0.0.2:

    pip install chameleon-fetcher-0.0.2.tar.gz