coima-0.0.2
توضیحات
Extremely plain and simple template engine for text files
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | coima-0.0.2 |
| نام | coima |
| نسخه کتابخانه | 0.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Alfredo Deza |
| ایمیل نویسنده | alfredodeza [at] gmail [dot] com |
| آدرس صفحه اصلی | http://github.com/alfredodeza/coima |
| آدرس اینترنتی | https://pypi.org/project/coima/ |
| مجوز | MIT |
Small template engine that replaces variables via dictionary values::
cat file.txt
"This is a {{variable}} in a {{string}}"
from coima import Template
t = Template({'variable':'word', 'string':'sentence'}, 'file.txt')
t.render()
u"This is a word in a sentence"
Syntax
-------
No Python or code blocks are allowed, this is basically a **dumb** templating
engine.
Variables should be a one word or 2 words together with an underscore. These are
valid variables:
{{variable}}
{{variable_one}}
Invalid variables are left 'as is' and left in the final rendered template.
نحوه نصب
نصب پکیج whl coima-0.0.2:
pip install coima-0.0.2.whl
نصب پکیج tar.gz coima-0.0.2:
pip install coima-0.0.2.tar.gz