enum.Enum
jinja2.utils._PassArg
- UndocumentedException
jinja2.compiler.CompilerExit
- Raised if the compiler encountered a situation where it just doesn't make sense to further process the code. Any block that raises such an exception is not further processed.jinja2.exceptions.TemplateError
- Baseclass for all template errors.jinja2.exceptions.TemplateNotFound
- Raised if a template does not exist.jinja2.exceptions.TemplatesNotFound
- Like TemplateNotFound
but raised if multiple templates are selected. This is a subclass of TemplateNotFound
exception, so just catching the base exception will catch both.jinja2.exceptions.TemplateRuntimeError
- A generic runtime error in the template engine. Under some situations Jinja may raise this exception.jinja2.exceptions.FilterArgumentError
- This error is raised if a filter was called with inappropriate argumentsjinja2.exceptions.SecurityError
- Raised if a template tries to do something insecure if the sandbox is enabled.jinja2.exceptions.UndefinedError
- Raised if a template tries to operate on Undefined
.jinja2.exceptions.TemplateSyntaxError
- Raised to tell the user that there is a problem with the template.jinja2.exceptions.TemplateAssertionError
- No summaryjinja2.nodes.Impossible
- Raised if the node could not perform a requested action.IOError
jinja2.exceptions.TemplateNotFound
- Raised if a template does not exist.jinja2.exceptions.TemplatesNotFound
- Like TemplateNotFound
but raised if multiple templates are selected. This is a subclass of TemplateNotFound
exception, so just catching the base exception will catch both.jinja2.bccache.Bucket
- Buckets are used to store the bytecode for one template. It's created and initialized by the bytecode cache and passed to the loading functions.jinja2.bccache.BytecodeCache
- To implement your own bytecode cache you have to subclass this class and override load_bytecode
and dump_bytecode
. Both of these methods are passed a ~jinja2.bccache.Bucket
.jinja2.bccache.FileSystemBytecodeCache
- A bytecode cache that stores bytecode on the filesystem. It accepts two arguments: The directory where the cache items are stored and a pattern string that is used to build the filename.jinja2.bccache.MemcachedBytecodeCache
- No summaryjinja2.compiler.Frame
- Holds compile time information for us.jinja2.compiler.MacroRef
- Undocumentedjinja2.environment.Environment
- No summaryjinja2.nativetypes.NativeEnvironment
- An environment that renders templates to native Python types.jinja2.environment.Template
- A compiled template that can be rendered.jinja2.nativetypes.NativeTemplate
- No class docstring; 1/2 method documentedjinja2.environment.TemplateExpression
- The jinja2.Environment.compile_expression
method returns an instance of this object. It encapsulates the expression-like access to the template with an expression it wraps.jinja2.environment.TemplateModule
- Represents an imported template. All the exported names of the template are available as attributes on this object. Additionally converting it into a string renders the contents.jinja2.environment.TemplateStream
- No summaryjinja2.ext._CommentFinder
- No summaryjinja2.ext.Extension
- No summaryjinja2.ext.AutoEscapeExtension
- Undocumentedjinja2.ext.DebugExtension
- A {% debug %} tag that dumps the available variables, filters, and tests.jinja2.ext.ExprStmtExtension
- Adds a do
tag to Jinja that works like the print statement just that it doesn't print the return value.jinja2.ext.InternationalizationExtension
- This extension adds gettext support to Jinja.jinja2.ext.LoopControlExtension
- Adds break and continue to the template engine.jinja2.ext.WithExtension
- Undocumentedjinja2.idtracking.Symbols
- Undocumentedjinja2.lexer.Failure
- Class that raises a TemplateSyntaxError
if called. Used by the Lexer
to specify known errors.jinja2.lexer.Lexer
- Class that implements a lexer for a given environment. Automatically created by the environment class, usually you don't have to do that.jinja2.lexer.TokenStream
- A token stream is an iterable that yields Token
s. The parser however does not iterate over it but calls next
to go one token ahead. The current active token is stored as current
.jinja2.lexer.TokenStreamIterator
- The iterator for tokenstreams. Iterate over the stream until the eof token is reached.jinja2.loaders.BaseLoader
- No summaryjinja2.loaders.ChoiceLoader
- This loader works like the PrefixLoader
just that no prefix is specified. If a template could not be found by one loader the next one is tried.jinja2.loaders.DictLoader
- Loads a template from a Python dict mapping template names to template source. This loader is useful for unittesting:jinja2.loaders.FileSystemLoader
- Load templates from a directory in the file system.jinja2.loaders.FunctionLoader
- No summaryjinja2.loaders.ModuleLoader
- This loader loads templates from precompiled templates.jinja2.loaders.PackageLoader
- Load templates from a directory in a Python package.jinja2.loaders.PrefixLoader
- No summaryjinja2.nodes.EvalContext
- Holds evaluation time information. Custom attributes can be attached to it in extensions.jinja2.nodes.Node
- Baseclass for all Jinja nodes. There are a number of nodes available of different types. There are four major types:jinja2.nodes.Expr
- Baseclass for all expressions.jinja2.nodes._FilterTestCommon
- Undocumentedjinja2.nodes.Filter
- Apply a filter to an expression. name is the name of the filter, the other fields are the same as Call
.jinja2.nodes.Test
- Apply a test to an expression. name is the name of the test, the other field are the same as Call
.jinja2.nodes.BinExpr
- Baseclass for all binary expressions.jinja2.nodes.Add
- Add the left to the right node.jinja2.nodes.And
- Short circuited AND.jinja2.nodes.Div
- Divides the left by the right node.jinja2.nodes.FloorDiv
- Divides the left by the right node and converts the result into an integer by truncating.jinja2.nodes.Mod
- Left modulo right.jinja2.nodes.Mul
- Multiplies the left with the right node.jinja2.nodes.Or
- Short circuited OR.jinja2.nodes.Pow
- Left to the power of right.jinja2.nodes.Sub
- Subtract the right from the left node.jinja2.nodes.Call
- No summaryjinja2.nodes.Compare
- Compares an expression with some other expressions. ops
must be a list of Operand
s.jinja2.nodes.Concat
- Concatenates the list of expressions provided after converting them to strings.jinja2.nodes.CondExpr
- A conditional expression (inline if expression). ({{ foo if bar else baz }})jinja2.nodes.ContextReference
- Returns the current template context. It can be used like a Name
node, with a 'load' ctx and will return the current ~jinja2.runtime.Context
object.jinja2.nodes.DerivedContextReference
- Return the current template context including locals. Behaves exactly like ContextReference
, but includes local variables, such as from a for loop.jinja2.nodes.EnvironmentAttribute
- Loads an attribute from the environment object. This is useful for extensions that want to call a callback stored on the environment.jinja2.nodes.ExtensionAttribute
- Returns the attribute of an extension bound to the environment. The identifier is the identifier of the Extension
.jinja2.nodes.Getattr
- Get an attribute or item from an expression that is a ascii-only bytestring and prefer the attribute.jinja2.nodes.Getitem
- Get an attribute or item from an expression and prefer the item.jinja2.nodes.ImportedName
- No summaryjinja2.nodes.InternalName
- No summaryjinja2.nodes.Literal
- Baseclass for literals.jinja2.nodes.Const
- No summaryjinja2.nodes.Dict
- Any dict literal such as {1: 2, 3: 4}. The items must be a list of Pair
nodes.jinja2.nodes.List
- Any list literal such as [1, 2, 3]jinja2.nodes.TemplateData
- A constant template string.jinja2.nodes.Tuple
- For loop unpacking and some other things like multiple arguments for subscripts. Like for Name
ctx
specifies if the tuple is used for loading the names or storing.jinja2.nodes.MarkSafe
- Mark the wrapped expression as safe (wrap it as Markup
).jinja2.nodes.MarkSafeIfAutoescape
- Mark the wrapped expression as safe (wrap it as Markup
) but only if autoescaping is active.jinja2.nodes.Name
- Looks up a name or stores a value in a name. The ctx
of the node can be one of the following values:jinja2.nodes.NSRef
- Reference to a namespace value assignmentjinja2.nodes.Slice
- Represents a slice object. This must only be used as argument for Subscript
.jinja2.nodes.UnaryExpr
- Baseclass for all unary expressions.jinja2.nodes.Neg
- Make the expression negative.jinja2.nodes.Not
- Negate the expression.jinja2.nodes.Pos
- Make the expression positive (noop for most expressions)jinja2.nodes.Helper
- Nodes that exist in a specific context only.jinja2.nodes.Keyword
- A key, value pair for keyword arguments where key is a string.jinja2.nodes.Operand
- Holds an operator and an expression.jinja2.nodes.Pair
- A key, value pair for dicts.jinja2.nodes.Stmt
- Base node for all statements.jinja2.nodes.Assign
- Assigns an expression to a target.jinja2.nodes.AssignBlock
- Assigns a block to a target.jinja2.nodes.Block
- A node that represents a block.jinja2.nodes.Break
- Break a loop.jinja2.nodes.CallBlock
- Like a macro without a name but a call instead. call
is called with the unnamed macro as caller
argument this node holds.jinja2.nodes.Continue
- Continue a loop.jinja2.nodes.EvalContextModifier
- Modifies the eval context. For each option that should be modified, a Keyword
has to be added to the options
list.jinja2.nodes.ScopedEvalContextModifier
- Modifies the eval context and reverts it later. Works exactly like EvalContextModifier
but will only modify the ~jinja2.nodes.EvalContext
for nodes in the body
.jinja2.nodes.ExprStmt
- A statement that evaluates an expression and discards the result.jinja2.nodes.Extends
- Represents an extends statement.jinja2.nodes.FilterBlock
- Node for filter sections.jinja2.nodes.For
- No summaryjinja2.nodes.FromImport
- No summaryjinja2.nodes.If
- If test
is true, body
is rendered, else else_
.jinja2.nodes.Import
- A node that represents the import tag.jinja2.nodes.Include
- A node that represents the include tag.jinja2.nodes.Macro
- A macro definition. name
is the name of the macro, args
a list of arguments and defaults
a list of defaults if there are any. body
is a list of nodes for the macro body.jinja2.nodes.Output
- A node that holds multiple expressions which are then printed out. This is used both for the print
statement and the regular template data.jinja2.nodes.OverlayScope
- No summaryjinja2.nodes.Scope
- An artificial scope.jinja2.nodes.With
- Specific node for with statements. In older versions of Jinja the with statement was implemented on the base of the Scope
node instead.jinja2.nodes.Template
- Node that represents a template. This must be the outermost node that is passed to the compiler.jinja2.parser.Parser
- This is the central parsing class Jinja uses. It's passed to extensions and can be used to parse expressions or statements.jinja2.runtime.BlockReference
- One block on a template reference.jinja2.runtime.Context
- No summaryjinja2.runtime.LoopContext
- A wrapper iterable for dynamic for loops, with information about the loop and iteration.jinja2.runtime.AsyncLoopContext
- Undocumentedjinja2.runtime.Macro
- Wraps a macro function.jinja2.runtime.TemplateReference
- The self
in templates.jinja2.runtime.Undefined
- The default undefined type. This undefined type can be printed and iterated over, but every other access will raise an UndefinedError
:jinja2.runtime.ChainableUndefined
- An undefined that is chainable, where both __getattr__ and __getitem__ return itself rather than raising an UndefinedError
.jinja2.runtime.DebugUndefined
- An undefined that returns the debug info when printed.jinja2.runtime.StrictUndefined
- An undefined that barks on print and iteration as well as boolean tests and all kinds of comparisons. In other words: you can do nothing with it except checking if it's defined using the defined
test.jinja2.utils.Cycler
- Cycle through values by yield them one at a time, then restarting once the end is reached. Available as cycler in templates.jinja2.utils.Joiner
- A joining helper for templates.jinja2.utils.LRUCache
- A simple LRU Cache implementation.jinja2.utils.Namespace
- A namespace object that can hold arbitrary attributes. It may be initialized from a dictionary or with keyword arguments.jinja2.visitor.NodeVisitor
- Walks the abstract syntax tree and call visitor functions for every node found. The visitor functions may return values which will be forwarded by the visit
method.jinja2.compiler.CodeGenerator
- No class docstring; 0/1 property, 0/25 instance variable, 0/12 class variable, 35/91 methods, 1/1 static method, 0/1 class documentedjinja2.meta.TrackingCodeGenerator
- We abuse the code generator for introspection.jinja2.nativetypes.NativeCodeGenerator
- A code generator which renders Python types by not adding str() around output nodes.jinja2.compiler.DependencyFinderVisitor
- A visitor that collects filter and test calls.jinja2.compiler.UndeclaredNameVisitor
- A visitor that checks if a name is accessed without being declared. This is different from the frame visitor as it will not stop at closure frames.jinja2.idtracking.FrameSymbolVisitor
- A visitor for Frame.inspect
.jinja2.idtracking.RootVisitor
- Undocumentedjinja2.visitor.NodeTransformer
- Walks the abstract syntax tree and allows modifications of nodes.jinja2.optimizer.Optimizer
- UndocumentedLookupError
jinja2.exceptions.TemplateNotFound
- Raised if a template does not exist.jinja2.exceptions.TemplatesNotFound
- Like TemplateNotFound
but raised if multiple templates are selected. This is a subclass of TemplateNotFound
exception, so just catching the base exception will catch both.markupsafe.EscapeFormatter
jinja2.sandbox.SandboxedEscapeFormatter
- Undocumentedmarkupsafe.Markup
jinja2.utils.Markup
- UndocumentedRuntimeError
jinja2.compiler.VisitorExit
- Exception used by the UndeclaredNameVisitor
to signal a stop.string.Formatter
jinja2.sandbox.SandboxedFormatter
- Undocumentedjinja2.sandbox.SandboxedEscapeFormatter
- Undocumentedtuple
jinja2.lexer.OptionalLStrip
- A special tuple for marking a point in the state that can have lstrip applied.type
jinja2.nodes.NodeType
- A metaclass for nodes that handles the field and attribute inheritance. fields and attributes from the parent class are automatically forwarded to the child.types.ModuleType
jinja2.loaders._TemplateModule
- Like a normal module but with support for weak referencestyping.NamedTuple
jinja2.compiler.CodeGenerator._FinalizeInfo
- Undocumentedjinja2.filters._GroupTuple
- Undocumentedjinja2.lexer._Rule
- Undocumentedjinja2.lexer.Token
- No class docstring; 0/3 class variable, 2/3 methods documentedtyping_extensions.Protocol
jinja2.bccache._MemcachedClient
- Undocumentedjinja2.ext._TranslationsBasic
- Undocumentedjinja2.ext._TranslationsContext
- Undocumentedjinja2.filters.HasHTML
- Undocumentedjinja2.runtime.LoopRenderFunc
- Undocumentedjinja2.visitor.VisitCallable
- Undocumented