RepositoryPython
PA

pallets/jinja

A very fast and expressive template engine.

11.8ksao
2.0kfork
80issue
4lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: jinja2

#1 Repository Của Tuần

1
TINIX TRENDING·Chủ đề: pallets

#1 Repository Của Tuần

1
TINIX TRENDING·Chủ đề: templates

#1 Repository Của Tuần

⚡ Jinja: Engine template nhanh từ Pallets, biên dịch thành Python

Jinja biên dịch template thành code Python tối ưu, hỗ trợ async, autoescaping và sandbox an toàn.

Jinja là một engine template nhanh, biểu cảm và có khả năng mở rộng cao, phát triển bởi tổ chức Pallets. Template sử dụng cú pháp giống Python để chèn dữ liệu và logic, sau đó được biên dịch thành mã Python thực thi. Dự án là lựa chọn mặc định trong nhiều framework Python như Flask.

✨ Điểm nổi bật

  • Kế thừa & bao gồm template: Hỗ trợ {% extends %} và {% include %} để tái sử dụng cấu trúc.
  • Macro định nghĩa & nhập khẩu: Viết lại logic thành hàm tùy biến trong template.
  • Autoescaping HTML: Ngăn chặn XSS từ dữ liệu người dùng chưa đáng tin cậy.
  • Môi trường sandbox: Render template không tin cậy một cách an toàn.
  • Hỗ trợ AsyncIO: Gọi hàm bất đồng bộ và render template không đồng bộ.
  • I18N với Babel: Hỗ trợ đa ngôn ngữ qua Babel.
  • Biên dịch JIT/AOT: Template được biên dịch thành code Python tối ưu và lưu cache.
  • Debug dễ dàng: Lỗi trỏ trực tiếp đến dòng trong template.
  • Mở rộng toàn diện: Tùy biến filter, test, hàm và cú pháp.

💡 Vì sao đáng chú ý

Jinja khác biệt nhờ cách biên dịch template thành code Python thực thi tối ưu thay vì giải thích tại thời gian chạy, mang lại tốc độ nhanh và khả năng tích hợp sâu. Thiết kế cho phép logic trong template nhưng khuyến khích giữ logic trong Python, cân bằng giữa tiện lợi và vệ sinh mã.


#Jinja #TemplateEngine #Python #Pallets #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryC++
jinja2cpp/Jinja2Cpp

Jinja2 C++ (and for C++) almost full-conformance template engine implementation

602
Nov 30, 2026
RepositoryPython
pallets/flask

The Python micro framework for building web applications.

75.4k
Oct 30, 2026
RepositoryRust
mitsuhiko/minijinja

MiniJinja is a powerful but minimal dependency template engine for Rust compatible with Jinja/Jinja2

2.8k
Nov 29, 2026
RepositoryPython
django/django

The Web framework for perfectionists with deadlines.

91.8k
Nov 27, 2026
RepositoryPython
adamchainz/heroicons

Use heroicons in your Django and Jinja templates.

119
Nov 4, 2026
RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

379.9k
Sep 15, 2026
RepositoryPython
vinta/awesome-python

The definitive list that answers "I want to do X in Python, which tool should I use?"

338.6k
Nov 28, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.9k
Nov 30, 2026
RepositoryPython
TheAlgorithms/Python

All Algorithms implemented in Python

226.6k
Nov 13, 2026