A templating engine with a simple templating language specifically designed for type inference, allowing consumers to provide users with slots of determined types.
Project description
YATLA 📑: Yet Another Templating Language (Again!)
YATLA is a templating engine with a simple templating language specifically designed for type inference, allowing consumers to provide users with slots of determined types.
Roadmap 🗺️
- Add numerical blocks
- Add type inference. Go from a template -> list of typed parameters
- Write own lexer to respect whitespace
- Write own own parsing system
- Add template validation (preventing non-unique identifiers...)
- Publish as pip-installable package
- Add foreach loops
- Add numerical function calls
- Improve Python interface
- Think about object accessors
Sample Template
This sample template gives a whirlwind tour of YATLA's functionality.
This a sample template.
This line contains a {{ slot }}.
Slots can also contain mathematical expressions: {{ 3 + factor * 7 }}.
With full support for operator precedence: {{ (3 + factor) * 7 }}.
Foreach loops are also valid. For example:
This is the {{ factor }} times table:
{{ foreach num in num_list }}
{{ factor }} * {{ num }} = {{ factor * num }}
{{ endforeach }}
There is also a standard library of mathematical functions.
Comparing {{ factor }} and {{ num }}, the largest is {{ Maximum(factor, num) }} and the smallest is {{ Minimum(factor, num) }}.
{{ RoundUp(15, 2) }} = 16, and {{ RoundDown(15, 2) }} = 14.
From the template above, YATLA will identify the parameters in the template, and infer their types:
slot: string or numberfactor: numbernum: numbernum_list: number array
Contributing
Contributions are welcome! If you encounter any issues or have suggestions for improvement, please submit an issue.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
YATLA is developed and maintained by Eugene Prout.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yatla-0.5.0.tar.gz.
File metadata
- Download URL: yatla-0.5.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
603cadc73c7690497ff986a18fd4cf5dca6aa487b8ec091ec251dd920795d774
|
|
| MD5 |
6b5a00f1a99cb7d531e9ec3b004ee867
|
|
| BLAKE2b-256 |
0214138e74e9584fbed8759e43a6127a75f1090ff1aca1e362a07fce366ed903
|
Provenance
The following attestation bundles were made for yatla-0.5.0.tar.gz:
Publisher:
main.yml on eugene-prout/yatla
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yatla-0.5.0.tar.gz -
Subject digest:
603cadc73c7690497ff986a18fd4cf5dca6aa487b8ec091ec251dd920795d774 - Sigstore transparency entry: 171374929
- Sigstore integration time:
-
Permalink:
eugene-prout/yatla@387b98d81ce263d3d88ddf51c5ce1f190d175287 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/eugene-prout
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@387b98d81ce263d3d88ddf51c5ce1f190d175287 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yatla-0.5.0-py3-none-any.whl.
File metadata
- Download URL: yatla-0.5.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8b0de5622d2a321bf054d44daa79fc33d59c0d707879b737a3f0dcd412e9bf1
|
|
| MD5 |
387e535c2d3b9a2188fa813b923fd336
|
|
| BLAKE2b-256 |
fa5c260da9a75773abcebffecf8d4fa3fc87f32952a928e40f52779dc7818b6a
|
Provenance
The following attestation bundles were made for yatla-0.5.0-py3-none-any.whl:
Publisher:
main.yml on eugene-prout/yatla
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yatla-0.5.0-py3-none-any.whl -
Subject digest:
a8b0de5622d2a321bf054d44daa79fc33d59c0d707879b737a3f0dcd412e9bf1 - Sigstore transparency entry: 171374930
- Sigstore integration time:
-
Permalink:
eugene-prout/yatla@387b98d81ce263d3d88ddf51c5ce1f190d175287 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/eugene-prout
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@387b98d81ce263d3d88ddf51c5ce1f190d175287 -
Trigger Event:
push
-
Statement type: