cuteninja
A python package that allows you to use KDL as the markup with Jinja2 syntax support.
Why? Because KDL is much more readable than HTML. While looking through the KDL repository I found a example file that used KDL as an alternative of HTML. That was what give me the initial idea of using KDL as the markup with Jinja in Python for succint and maintainable template.
This packages doesn't do much, it extract the Jinja syntax from source files and then parses the KDL via kdl-rs which generates the HTML. The previously extracted Jinja syntax is restored and returned as valid HTML with Jinja syntax. i.e.
!DOCTYPE html
html lang=en {
head {
title "{{ page_title }}"
}
body {
h1 "Hello, {{ user.name }}!"
{% if user.is_authenticated %}
div class=content {
p "You are logged in."
}
{% else %}
div class=login {
a href="/login" "Please log in"
}
{% endif %}
}
}
is turned to the following:
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ page_title }}</title>
</head>
<body>
<h1>Hello, {{ user.name }}!</h1>
{% if user.is_authenticated %}
<div class="content">
<p>You are logged in.</p>
</div>
{% else %}
<div class="login">
<a href="/login">Please log in</a>
</div>
{% endif %}
</body>
</html>
Contributing
This is an early-stage project with lots of room for improvement. You are welcome to help out in any shape or form.
License
MIT
Credits
Metadata
Release files for cuteninja 0.1.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 |
|---|---|---|---|---|
| cuteninja-0.1.2.tar.gz | 8.2 kB | Without provenance | Details for cuteninja-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cuteninja-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for cuteninja-0.1.2-py3-none-any.whl |
Total release size: 15.4 kB
Release files / cuteninja-0.1.2.tar.gz
| Download URL | cuteninja-0.1.2.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d1e5917d6bba2c7d797c319757afd53209526c81897d3f014a75d2ece521318
|
|
BLAKE2b-256 checksum How to use checksums |
e2e103a3170113fab6cdace97933dc185d64bb614e1c5a7e0018676e2fdddbff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / cuteninja-0.1.2-py3-none-any.whl
| Download URL | cuteninja-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f199486d1e48a15d84e707ebecc482670b838f480fcf8125f90b8f4407cdf282
|
|
BLAKE2b-256 checksum How to use checksums |
2e7480ce12bc4a792904038bb50b480c37bc4f9b184ea8459486224feca61679
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for cuteninja 0.1.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.