builtin (30)
boolean¶
boolean(value: Any) -> bool
Return true if the object is a boolean value.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
97 98 99 100 101 102 |
|
callable¶
callable(obj, /)
Return whether the object is callable (i.e., some kind of function).
DocStrings
defined¶
defined(value: Any) -> bool
Return true if the variable is defined:
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
divisibleby¶
divisibleby(value: int, num: int) -> bool
Check if a variable is divisible by a number.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
25 26 27 |
|
eq¶
eq(a, b, /)
Same as a == b.
Aliases: equalto
==
DocStrings
escaped¶
escaped(value: Any) -> bool
Check if the value is escaped.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
203 204 205 |
|
even¶
even(value: int) -> bool
Return true if the variable is even.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
20 21 22 |
|
false¶
false(value: Any) -> bool
Return true if the object is False.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
105 106 107 108 109 110 |
|
filter¶
filter(env: 'Environment', value: str) -> bool
Check if a filter exists by name. Useful if a filter may be
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
float¶
float(value: Any) -> bool
Return true if the object is a float.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
131 132 133 134 135 136 |
|
ge¶
ge(a, b, /)
Same as a >= b.
Aliases: >=
DocStrings
gt¶
gt(a, b, /)
Same as a > b.
Aliases: >
greaterthan
DocStrings
in¶
in(value: Any, seq: Container[Any]) -> bool
Check if value is in seq.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
208 209 210 211 212 213 |
|
integer¶
integer(value: Any) -> bool
Return true if the object is an integer.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
122 123 124 125 126 127 |
|
iterable¶
iterable(value: Any) -> bool
Check if it's possible to iterate over an object.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
193 194 195 196 197 198 199 200 |
|
le¶
le(a, b, /)
Same as a <= b.
Aliases: <=
DocStrings
lower¶
lower(value: str) -> bool
Return true if the variable is lowercased.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
139 140 141 |
|
lt¶
lt(a, b, /)
Same as a < b.
Aliases: <
DocStrings
mapping¶
mapping(value: Any) -> bool
Return true if the object is a mapping (dict etc.).
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
154 155 156 157 158 159 |
|
ne¶
ne(a, b, /)
Same as a != b.
Aliases: !=
DocStrings
none¶
none(value: Any) -> bool
Return true if the variable is none.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
92 93 94 |
|
number¶
number(value: Any) -> bool
Return true if the variable is a number.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
162 163 164 |
|
odd¶
odd(value: int) -> bool
Return true if the variable is odd.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
15 16 17 |
|
sameas¶
sameas(value: Any, other: Any) -> bool
Check if an object points to the same memory address than another
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
180 181 182 183 184 185 186 187 188 189 190 |
|
sequence¶
sequence(value: Any) -> bool
Return true if the variable is a sequence. Sequences are variables
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
167 168 169 170 171 172 173 174 175 176 177 |
|
string¶
string(value: Any) -> bool
Return true if the object is a string.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
149 150 151 |
|
test¶
test(env: 'Environment', value: str) -> bool
Check if a test exists by name. Useful if a test may be
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
true¶
true(value: Any) -> bool
Return true if the object is True.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
113 114 115 116 117 118 |
|
undefined¶
undefined(value: Any) -> bool
Like :func:defined
but the other way round.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
47 48 49 |
|
upper¶
upper(value: str) -> bool
Return true if the variable is uppercased.
DocStrings
Source code in .venv/lib/python3.12/site-packages/jinja2/tests.py
144 145 146 |
|