Python template engine.
Project description
Is a template engine built in completely other way then before.
First - you can use all python and more - you must use it if you want somwthing more then just tags.
Second - it completely iterative. You can feed iterators or generators as input and get iterative output.
Third - it works through imports. If you want to get template just import it and use. If you want include other template - import it. If you want template in some dir, import it! Like `from . import other_template`.
So, with this principles in mind, you can try this proof of concept thing, due it is not complete:
import backslant
sys.meta_path.insert(0, backslant.PymlFinder(‘./templates’, hook=’backslant_import’)) from backslant_import.home import index
- for chunk in index.render():
print(chunk)
I will complete feture set soon, stay tuned. Pssst, we will have ruby-like blocks, dont tell anyone.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file backslant-0.0.4.tar.gz
.
File metadata
- Download URL: backslant-0.0.4.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cdce6690a545e165ff0010ee0a35861cb4585d636be762d52215ed83244fa32 |
|
MD5 | 044e13876920d3d5ab860bc89f0e409d |
|
BLAKE2b-256 | 561b51e633043f73dd4223e09a0f945fa7e790bedbe36cb516241c259fc9e428 |
File details
Details for the file backslant-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: backslant-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 642406632530a8e9f7fadd87fb6be7bd646fbe55c7832d1d259291979b158ffb |
|
MD5 | 3f9d75ce6b4f3570c492a548f613a020 |
|
BLAKE2b-256 | c8ce5501ab1dda66d5a956ec7778a054cb0b199d02d3ed1b602d6b8cdf94eddb |