Example of usage
Make template file hello.tmpl:
Foo: <TMPL_var foo.bar> Spam: <TMPL_var foo[spam]> Array: <TMPL_var array[0].key> <TMPL_var array[1]['key']>Create Python script:
#!/usr/bin/env python import pyctpp2 if __name__ == '__main__': engine = pyctpp2.Engine() template = engine.parse('hello.tmpl') result = template.render({ 'foo': { 'bar': 'baz' }, 'spam': 'bar', 'array': [ { 'key': 'first' }, { 'key': 'second' } ] })Check output:
Foo: baz Spam: baz Array: first secondSee pydoc pyctpp2.Engine and pydoc pyctpp2.Template for more information.
CHANGES
0.12.2 (19.01.2012)
Fixed version.py.
0.12.1 (19.01.2012)
Fixed version.py.
0.12.0 (19.01.2012)
Updated documentation.
Fixed searching CTPP2 library.
Fixed support of Python 3.
Support CTPP2 library >= 2.8 version only.
0.11.2 (13.09.2011)
Fixed Restructed text syntax.
Updated documentation.
Fixed setup.py.
Fixed bug with empty language.
Updated build without cython.
0.11.1 (30.06.2011)
Fixed extract method ‘ctpp2’ for Babel.
0.11.0 (29.06.2011)
Added support of new CTPP2 gettext implementation.
Support CTPP2 library >= 2.7 version only.
0.10.0 (23.05.2011)
Added support of array/hash indirect calls (foo{bar} and foo[bar]).
Support CTPP2 library >= 2.6.16 version only.
0.9.10 (17.05.2011)
Added duplicate information about dicts for HASH_ELEMENT support.
0.9.9 (17.05.2011)
Fixed HASH_ELEMENT support.
0.9.8 (12.05.2011)
Fixed extract method ‘ctpp2’ for Babel.
0.9.7 (28.04.2011)
Fixed support of render params with types.LongType.
0.9.6 (19.04.2011)
Fixed extract method ‘ctpp2’ for Babel.
0.9.5 (19.04.2011)
Fixed build with Cython.
0.9.4 (19.04.2011)
Added extract method ‘ctpp2’ for Babel.
0.9.3 (15.04.2011)
Added support of i18n.
Fixed tests.
Changed Template and Engine API.
0.9.2 (28.03.2011)
Fixed installation by pip.
0.9.1 (13.01.2011)
Added COPYING.txt.
Added support of traversable objects.
Some bug fixes.
0.9.0 (11.01.2011)
Initial release.
Metadata
Release files for pyctpp2 0.12.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyctpp2-0.12.2.tar.gz | 73.2 kB | Without provenance | Details for pyctpp2-0.12.2.tar.gz |
Release files / pyctpp2-0.12.2.tar.gz
| Download URL | pyctpp2-0.12.2.tar.gz |
|---|---|
| Size | 73.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f654280a4687d92c738575265737e58e82e4cb9dfeb3c6596b5ce9137ae32951
|
|
BLAKE2b-256 checksum How to use checksums |
f4c59f4d883ad0d0e516a896e8fa5f69cae3932366bf2d67a001ffe7a42d23c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyctpp2 0.12.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.