askama
A template rendering engine based on Jinja, generating type-safe Rust code at compile time.
File Explorer
Download Latest Version (.zip)- bug_report.md
- feature_request.md
- rust.yml
- dependabot.yml
- escape.rs
- strings.inc
- to-json.rs
- alloc.rs
- core.rs
- default.rs
- escape.rs
- humansize.rs
- indent.rs
- json.rs
- mod.rs
- std.rs
- urlencode.rs
- ascii_str.rs
- error.rs
- helpers.rs
- html.rs
- lib.rs
- values.rs
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- tomlfmt.toml
- complex-expression.rs
- derive-template.rs
- macro_invocation.rs
- mod.rs
- paths.rs
- expr.rs
- filter.rs
- node.rs
- rustc_literal_escaper.rs
- ascii_str.rs
- config.rs
- filter_fn.rs
- generator.rs
- heritage.rs
- html.rs
- input.rs
- integration.rs
- lib.rs
- spans.rs
- tests.rs
- d.html
- b.html
- c.html
- a.html
- b.html
- include1.html
- include2.html
- include3.html
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- empty_test_config.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- tomlfmt.toml
- all.rs
- strings.inc
- ascii_str.rs
- html.rs
- lib.rs
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- tomlfmt.toml
- lib.rs
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- tomlfmt.toml
- item_info.html
- item_union.html
- LICENSE.md
- page.html
- print_item.html
- short_item_info.html
- sidebar.html
- source.html
- type_layout.html
- type_layout_size.html
- from_str.rs
- parse-complex-expression.rs
- ascii_str.rs
- expr.rs
- lib.rs
- node.rs
- target.rs
- tests.rs
- comment-depth.txt
- excessive_filter_block.txt
- filter-recursion.txt
- fuzzed-deeply-tested-if-let.txt
- fuzzed_span_is_not_substring_of_source.bin
- target-recursion.txt
- unary-recursion.txt
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- tomlfmt.toml
- main.rs
- greeting.html
- hello_world.html
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- run.sh
- tomlfmt.toml
- configuration.md
- creating_templates.md
- debugging.md
- features.md
- filters.md
- frameworks.md
- introduction.md
- performance.md
- runtime.md
- SUMMARY.md
- template_syntax.md
- upgrading.md
- .gitignore
- 404.html
- book.toml
- ethicalads-theme.css
- ethicalads-theme.sass
- main.rs
- _layout.css
- _layout.html
- error.html
- greet.html
- index.html
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- tomlfmt.toml
- main.rs
- _layout.css
- _layout.html
- error.html
- greet.html
- index.html
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- tomlfmt.toml
- main.rs
- askama.toml
- Cargo.toml
- README.md
- main.rs
- _layout.css
- _layout.html
- error.html
- greet.html
- index.html
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- tomlfmt.toml
- main.rs
- _layout.css
- _layout.html
- error.html
- greet.html
- index.html
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- tomlfmt.toml
- main.rs
- _layout.css
- _layout.html
- error.html
- greet.html
- index.html
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- tomlfmt.toml
- clusterfuzz-testcase-minimized-derive-4654117948817408
- clusterfuzz-testcase-minimized-derive-4793932351602688
- clusterfuzz-testcase-minimized-derive-4864653254787072
- clusterfuzz-testcase-minimized-derive-4955521990066176
- clusterfuzz-testcase-minimized-derive-5037184261619712
- clusterfuzz-testcase-minimized-derive-5064777150038016
- clusterfuzz-testcase-minimized-derive-5107711304073216
- clusterfuzz-testcase-minimized-derive-5144827852554240
- clusterfuzz-testcase-minimized-derive-5353647120908288
- clusterfuzz-testcase-minimized-derive-5387873899839488
- clusterfuzz-testcase-minimized-derive-5611392537526272
- clusterfuzz-testcase-minimized-derive-5780292277436416
- clusterfuzz-testcase-minimized-derive-6051930453639168
- clusterfuzz-testcase-minimized-derive-6236623325167616
- clusterfuzz-testcase-minimized-derive-6380739026550784
- clusterfuzz-testcase-minimized-derive-6503980895371264
- clusterfuzz-testcase-minimized-derive-6542584430526464
- clusterfuzz-testcase-minimized-derive-6573215117017088
- clusterfuzz-testcase-minimized-derive-6617490908315648
- clusterfuzz-testcase-minimized-derive-6639137261420544
- clusterfuzz-testcase-minimized-derive-6696196543676416
- clusterfuzz-testcase-minimized-parser-5584199838138368
- minimized-from-b44b4bd1da1759dee0924a8586a6001e80da76fa
- clusterfuzz-testcase-minimized-parser-5944098940059648
- clusterfuzz-testcase-parser-5640096178307072
- .gitattributes
- all.rs
- derive.rs
- filters.rs
- html.rs
- parser.rs
- html.rs
- mod.rs
- all.rs
- ascii_str.rs
- derive.rs
- filters.rs
- lib.rs
- parser.rs
- Cargo.toml
- corpus
- main.rs
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- README.md
- tomlfmt.toml
- all.rs
- .gitignore
- test_block_in_include_partial.py
- .gitignore
- .python-version
- pyproject.toml
- README.md
- test.sh
- .gitignore
- char-literal-1.txt
- char-literal-2.txt
- char-literal-3.txt
- char-literal-4.txt
- char-literal-5.txt
- char-literal-6.txt
- char-literal-7.txt
- fragment.html
- includer.html
- included.html
- included.html
- allow-whitespaces.html
- attr.html
- base-decl.txt
- base.html
- big-table.html
- block_in_include_base.html
- block_in_include_extended.html
- block_in_include_partial.html
- blocks.txt
- child.html
- compare.html
- composition.html
- cycle1.html
- cycle2.html
- deep-base.html
- deep-import-child.html
- deep-import-parent.html
- deep-kid.html
- deep-mid.html
- deep-nested-macro.html
- else-if.html
- else.html
- extend-duplicated.html
- extend_and_import.html
- filter-recursion.html
- filters.html
- filters_join.html
- foo.askama
- foo.html
- foo.html.askama
- foo.html.jinja
- foo.jinja
- for-break-continue.html
- for-range.html
- for.html
- format.html
- fragment-base.html
- fragment-mid-super.html
- fragment-nested-block.html
- fragment-nested-super.html
- fragment-simple.html
- fragment-super.html
- fragment-unused-expr.html
- fuzzed-recursion-mul-deref.txt
- generics.html
- hello.html
- html-base.html
- if-coerce.html
- if-let-else.html
- if-let-shadowing.html
- if-let-struct.html
- if-let.html
- if.html
- import.html
- include-base.html
- include-extends-base.html
- include-extends-included.html
- include-extends.html
- include-macro.html
- include-nested.html
- include.html
- include_invalid_syntax.html
- included-macro.html
- included.html
- invalid_syntax.html
- latex-file.tex
- let-base.html
- let-child.html
- let-decl.html
- let-destruct-tuple.html
- let-shadow.html
- let.html
- literals-escape.html
- literals.html
- macro-call-raw-string-many-hashes.html
- macro-import-callexpr.html
- macro-import-str-cmp-macro.html
- macro-import-str-cmp.html
- macro-no-args.html
- macro-recursion-1.html
- macro-recursion-2.html
- macro-recursion-3.html
- macro-self-arg.html
- macro-short-circuit.html
- macro-with-caller.html
- macro.html
- match-custom-enum.html
- match-enum-or.html
- match-literal-char.html
- match-literal-num.html
- match-literal.html
- match-no-ws.html
- match-opt-bool.html
- match-opt.html
- match-option-result-option.html
- named-end.html
- nested-attr.html
- nested-base.html
- nested-child.html
- nested-for.html
- nested-macro-args.html
- nested-macro-callexpr.html
- nested-macro.html
- no-block-with-base-template.txt
- no-block-with-include-times-2.txt
- no-block-with-include.txt
- no-block.txt
- num-literals.html
- operators.html
- option.html
- precedence-for.html
- precedence.html
- ranges.txt
- raw-complex.html
- raw-simple.html
- raw-ws.html
- render_in_place.html
- rust-macro-args.html
- rust-macros-full-path.html
- rust-macros.html
- simple-no-escape.txt
- simple.html
- size-child-super.txt
- size-child.txt
- size-parent.txt
- symlink-escape.html
- symlink-target
- teams.html
- transclude-there.html
- tuple-attr.html
- use-var.txt
- paths.rs
- Cargo.toml
- lib.rs
- duplicated-block-call.rs
- duplicated-block-call.stderr
- duplicated_block_calls.rs
- duplicated_block_calls.stderr
- Cargo.toml
- lib.rs
- lib.rs
- empty.txt
- Cargo.toml
- empty.txt
- Cargo.toml
- lib.rs
- Cargo.toml
- lib.rs
- ambiguous-ws-raw.rs
- ambiguous-ws-raw.stderr
- arrays.rs
- arrays.stderr
- as-primitive-type.rs
- as-primitive-type.stderr
- askama-block.rs
- askama-block.stderr
- assign-to-askama.rs
- assign-to-askama.stderr
- block_in_filter_block.rs
- block_in_filter_block.stderr
- blocks_below_top_level.rs
- blocks_below_top_level.stderr
- break_outside_of_loop.rs
- break_outside_of_loop.stderr
- broken-config.rs
- broken-config.stderr
- caller_arguments.rs
- caller_arguments.stderr
- calls.rs
- calls.stderr
- char_literal.rs
- char_literal.stderr
- character_literal-multiple-chars.rs
- character_literal-multiple-chars.stderr
- comments-in-macro-calls.rs
- comments-in-macro-calls.stderr
- comparator-chaining.rs
- comparator-chaining.stderr
- compound-assignment.rs
- compound-assignment.stderr
- concat.rs
- concat.stderr
- crate_identifier.rs
- crate_identifier.stderr
- cycle.rs
- cycle.stderr
- cycle2.rs
- cycle2.stderr
- declare.rs
- declare.stderr
- default.rs
- default.stderr
- duplicated_template_attribute.rs
- duplicated_template_attribute.stderr
- empty-match.rs
- empty-match.stderr
- end-block.rs
- end-block.stderr
- enum.rs
- enum.stderr
- error_file_path.rs
- error_file_path.stderr
- escape-filter-invalid-kind.rs
- escape-filter-invalid-kind.stderr
- excessive_nesting.rs
- excessive_nesting.stderr
- expr_fn_calls.rs
- expr_fn_calls.stderr
- extend.rs
- extend.stderr
- filter-invocation-invalid-arguments.rs
- filter-invocation-invalid-arguments.stderr
- filter-recursion.rs
- filter-recursion.stderr
- filter-signature-validation.rs
- filter-signature-validation.stderr
- filter_block_ws.rs
- filter_block_ws.stderr
- fuzzed_recursion_depth_mul_deref.rs
- fuzzed_recursion_depth_mul_deref.stderr
- fuzzing.rs
- fuzzing.stderr
- garbled-closing-blocks.rs
- garbled-closing-blocks.stderr
- generics.rs
- generics.stderr
- groups.rs
- groups.stderr
- illegal-string-literals.rs
- illegal-string-literals.stderr
- include-a-folder.rs
- include-a-folder.stderr
- incorrect_path.rs
- incorrect_path.stderr
- invalid_array_repeat.rs
- invalid_array_repeat.stderr
- is_defined.rs
- is_defined.stderr
- iso646.rs
- iso646.stderr
- json-too-many-args.rs
- json-too-many-args.stderr
- let_destructuring_has_rest.rs
- let_destructuring_has_rest.stderr
- lit_on_assignment_lhs.rs
- lit_on_assignment_lhs.stderr
- loop-fields.rs
- loop-fields.stderr
- loop_cycle_empty.rs
- loop_cycle_empty.stderr
- loop_cycle_wrong_argument_count.rs
- loop_cycle_wrong_argument_count.stderr
- macro-args-hashtag.rs
- macro-args-hashtag.stderr
- macro-args-with-type.rs
- macro-args-with-type.stderr
- macro-args.rs
- macro-args.stderr
- macro-caller-with-callexpr.rs
- macro-caller-with-callexpr.stderr
- macro-caller.rs
- macro-caller.stderr
- macro-named-crate.rs
- macro-named-crate.stderr
- macro-recursion.rs
- macro-recursion.stderr
- macro-super.rs
- macro-super.stderr
- macro.rs
- macro.stderr
- macro_default_value.rs
- macro_default_value.stderr
- macro_named_argument.rs
- macro_named_argument.stderr
- match-unit-structs.rs
- match-unit-structs.stderr
- match_with_extra.rs
- match_with_extra.stderr
- multiple_extends.rs
- multiple_extends.stderr
- name_mismatch_endblock.rs
- name_mismatch_endblock.stderr
- name_mismatch_endmacro.rs
- name_mismatch_endmacro.stderr
- named_filter_arguments.rs
- named_filter_arguments.stderr
- no-block.rs
- no-block.stderr
- no-such-escaper.rs
- no-such-escaper.stderr
- no_template_attribute.rs
- no_template_attribute.stderr
- non-ident-invalid-block-content.rs
- non-ident-invalid-block-content.stderr
- num-suffix.rs
- num-suffix.stderr
- number.rs
- number.stderr
- pluralize.rs
- pluralize.stderr
- raw-prefix.rs
- raw-prefix.stderr
- ref_deref.rs
- ref_deref.stderr
- references.rs
- references.stderr
- rest_pattern.rs
- rest_pattern.stderr
- struct-expressions.rs
- struct-expressions.stderr
- terminator-operator.rs
- terminator-operator.stderr
- transclude-missing.rs
- transclude-missing.stderr
- truncate.rs
- truncate.stderr
- type.rs
- type.stderr
- typo_in_keyword.rs
- typo_in_keyword.stderr
- unclosed-nodes.rs
- unclosed-nodes.stderr
- underscore.rs
- underscore.stderr
- unexpected-tag.rs
- unexpected-tag.stderr
- union.rs
- union.stderr
- values.rs
- values.stderr
- vars.rs
- vars.stderr
- wrong-end.rs
- wrong-end.stderr
- array.rs
- block_fragments.rs
- blocks.rs
- book-examples.rs
- book_example_performance_fmt_call_fast_writable.rs
- book_example_runtime_values_in_custom_filters.rs
- calls.rs
- clippy_lints.rs
- coerce.rs
- compound-assignment.rs
- cow_str_implements_fast_writable.rs
- custom_ui.rs
- declare.rs
- default.rs
- enum.rs
- extend.rs
- filter_block.rs
- filters.rs
- gen_loop_else.py
- gen_ws_tests.py
- generics.rs
- hello.rs
- if.rs
- if_let.rs
- include.rs
- inheritance.rs
- is_defined.rs
- let.rs
- let_destructoring.rs
- literal.rs
- loop_else.rs
- loops.rs
- macro-include.rs
- macro.rs
- matches.rs
- methods.rs
- named_filter_arguments.rs
- no_implicit_prelude.rs
- operators.rs
- path.rs
- paths.rs
- print.rs
- recursive-template.rs
- reexported-askama.rs
- ref_deref.rs
- render_in_place.rs
- rest_pattern.rs
- rust_macro.rs
- simple.rs
- size_hint.rs
- source-in-code.rs
- struct_expressions.rs
- try.rs
- tuple.rs
- ui.rs
- values.rs
- vars.rs
- whitespace.rs
- ws.rs
- .rustfmt.toml
- _typos.toml
- build.rs
- Cargo.toml
- clippy.toml
- delim-clash.toml
- delim-too-short.toml
- deny.toml
- issue-128-2.toml
- issue-128.toml
- LICENSE-APACHE
- LICENSE-MIT
- operator-paren-config.toml
- operator-plus-config.toml
- test_minimize.toml
- test_trim.toml
- tomlfmt.toml
- hello-world.html
- hello-world.rs
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- tomlfmt.toml
- hello-world.html
- hello-world.rs
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- tomlfmt.toml
- hello-world.html
- hello-world.rs
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- tomlfmt.toml
- .gitattributes
- .gitignore
- .gitmodules
- .readthedocs.yaml
- .rustfmt.toml
- _typos.toml
- Cargo.toml
- clippy.toml
- deny.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
- tomlfmt.toml
# Installation Guide
1. Get the code
git clone https://github.com/askama-rs/askama
Downloads the entire project code from GitHub to your computer.
cd askama
Moves into the project folder you just downloaded.
2. Python
Easy RecommendedPrerequisites
β οΈ This is a large repository, so this method may point to an internal sub-package rather than the actual core product. Check the full README as well.
pip install .
Installs the package published on PyPI directly β no need to clone the source.
python <μ€νν νμΌλͺ
>.py # READMEμμ μ νν μ€ν νμΌλͺ
μ νμΈνμΈμ
Runs the Python script (or module).
If it runs without errors and prints output in the terminal, it worked.
3. Rust
MediumPrerequisites
- Git Needed to download the project code from GitHub.
- Rust (rustup) Installing via rustup also installs cargo.
cargo add askama
Type this command into your terminal and run it.
If cargo build finishes without errors, it worked. The executable is created under target/.
Pulled directly from this repo's README.
// repository documentation
Was this content helpful?
(0 ratings)
