Loading repository data…
Loading repository data…
altxriainc / repository
Iris is a modern, lightweight Python template engine for rendering dynamic HTML with advanced directive support, layout inheritance, and safe variable evaluation. Ideal for fast and flexible application templating.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
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.
Click here for the documentation
@extends, @include, and control structures.Install Iris via pip:
pip install iris-templates
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)
Iris provides advanced features for layout inheritance, template inclusion, and custom directives. For example:
@include('header.html')
<p>This is the body content.</p>
@include('footer.html')
@if(user.is_admin)
<p>Welcome, Admin {{ user.name }}!</p>
@else
<p>Welcome, {{ user.name }}!</p>
@endif
Iris is free to use for both personal and commercial projects. However, Iris itself cannot be resold or distributed as a standalone product.
Developed and maintained by Altxria Inc. with contributions from a growing community of passionate developers.
If you find Iris useful, consider sponsoring us to support ongoing development and new features!