Iris
Iris is a modern, lightweight Python template engine designed for simplicity, flexibility, and performance. With advanced directive processing, includes, and dynamic context evaluation, Iris provides developers with a seamless way to render dynamic templates efficiently.
🚀 Key Features
- Advanced Directives: Includes support for custom template directives like
@extends,@include, and control structures. - Dynamic Context Injection: Easily pass and process dynamic data into your templates.
- Flexible Templating: Supports layout inheritance, template composition, and reusable components.
- Fast and Lightweight: Minimal overhead with high performance, designed for Python applications.
- Safe Evaluation: Includes built-in safeguards for variable evaluation to ensure template safety.
- Open for Personal & Commercial Use: Use Iris freely in personal and commercial projects (not for resale as a standalone product).
🛠️ How to Use Iris
Step 1: Install Iris
Install Iris via pip:
pip install iris-templates
Step 2: Render Your First Template
Create a template file, e.g., template.html:
@extends('base.html')
@section('title', 'Welcome to Iris')
@section('content')
<h1>Hello, {{ user }}!</h1>
@endsection
Create a Python script to render the template:
from altxria.iris.engine import TemplateEngine
engine = TemplateEngine(template_dir="./templates")
output = engine.render("template.html", {"user": "Alice"})
print(output)
Step 3: Explore More Features
Iris provides advanced features for layout inheritance, template inclusion, and custom directives. For example:
Including Other Templates
@include('header.html')
<p>This is the body content.</p>
@include('footer.html')
Dynamic Control Structures
@if(user.is_admin)
<p>Welcome, Admin {{ user.name }}!</p>
@else
<p>Welcome, {{ user.name }}!</p>
@endif
🔍 Project Status
📜 License and Usage
Iris is free to use for both personal and commercial projects. However, Iris itself cannot be resold or distributed as a standalone product.
🤝 Contributors
Developed and maintained by Altxria Inc. with contributions from a growing community of passionate developers.
❤️ Support Iris
If you find Iris useful, consider sponsoring us to support ongoing development and new features!
Release files for iris-templates 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 | |
|---|---|---|---|
| iris_templates-0.1.2.tar.gz | 24.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iris_templates-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.2 kB
Release files / iris_templates-0.1.2.tar.gz
| Download URL | iris_templates-0.1.2.tar.gz |
|---|---|
| Size | 24.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2ce0f1bb0380089f44f68db33cd37ecc28fa5348fec773483d409b637ed7287
|
|
BLAKE2b-256 checksum How to use checksums |
506831ac3f71566f2a1d495a20abd098e8224d017472d151d282e2f8b9bd4b83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.8
|
Release files / iris_templates-0.1.2-py3-none-any.whl
| Download URL | iris_templates-0.1.2-py3-none-any.whl |
|---|---|
| Size | 23.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43e3d0d0e0188f9ac8f104709dd2e7dddd1942cb1abee99a0bc6b1b846bc9f52
|
|
BLAKE2b-256 checksum How to use checksums |
3d6d0c4f1c46a461c3588af884c4c6749023c1157d6774ea4efea59759e23e05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.8
|