[ Module Hierarchy | Class Hierarchy ]

# Class Hierarchy

- markupbase.ParserBase: Parser base class which provides some common support methods used by the SGML/HTML and XHTML parsers.
  - HTMLParser.HTMLParser: Find tags and other markup and call handler functions.
    - genshi.input.HTMLParser: Parser for HTML input based on the Python HTMLParser module.
- object: The most base type
  - genshi.template._ast24.AST
    - genshi.template._ast24.alias
    - genshi.template._ast24.arguments
    - genshi.template._ast24.boolop
    - unreachable.boolop
      - genshi.template._ast24.And
      - genshi.template._ast24.Or
    - unreachable.cmpop
      - genshi.template._ast24.Eq
      - genshi.template._ast24.Gt
      - genshi.template._ast24.GtE
      - genshi.template._ast24.In
      - genshi.template._ast24.Is
      - genshi.template._ast24.IsNot
      - genshi.template._ast24.Lt
      - genshi.template._ast24.LtE
      - genshi.template._ast24.NotEq
      - genshi.template._ast24.NotIn
    - genshi.template._ast24.cmpop
    - genshi.template._ast24.comprehension
    - genshi.template._ast24.excepthandler
    - genshi.template._ast24.expr
    - unreachable.expr
      - genshi.template._ast24.Attribute
      - genshi.template._ast24.BinOp
      - genshi.template._ast24.BoolOp
      - genshi.template._ast24.Call
      - genshi.template._ast24.Compare
      - genshi.template._ast24.Dict
      - genshi.template._ast24.GeneratorExp
      - genshi.template._ast24.IfExp
      - genshi.template._ast24.Lambda
      - genshi.template._ast24.List
      - genshi.template._ast24.ListComp
      - genshi.template._ast24.Name
      - genshi.template._ast24.Num
      - genshi.template._ast24.Repr
      - genshi.template._ast24.Str
      - genshi.template._ast24.Subscript
      - genshi.template._ast24.Tuple
      - genshi.template._ast24.UnaryOp
      - genshi.template._ast24.Yield
    - genshi.template._ast24.expr_context
    - unreachable.expr_context
      - genshi.template._ast24.AugLoad
      - genshi.template._ast24.AugStore
      - genshi.template._ast24.Del
      - genshi.template._ast24.Load
      - genshi.template._ast24.Param
      - genshi.template._ast24.Store
    - genshi.template._ast24.keyword
    - genshi.template._ast24.mod
    - unreachable.mod
      - genshi.template._ast24.Expression
      - genshi.template._ast24.Interactive
      - genshi.template._ast24.Module
      - genshi.template._ast24.Suite
    - unreachable.operator
      - genshi.template._ast24.Add
      - genshi.template._ast24.BitAnd
      - genshi.template._ast24.BitOr
      - genshi.template._ast24.BitXor
      - genshi.template._ast24.Div
      - genshi.template._ast24.FloorDiv
      - genshi.template._ast24.LShift
      - genshi.template._ast24.Mod
      - genshi.template._ast24.Mult
      - genshi.template._ast24.Pow
      - genshi.template._ast24.RShift
      - genshi.template._ast24.Sub
    - genshi.template._ast24.operator
    - genshi.template._ast24.slice
    - unreachable.slice
      - genshi.template._ast24.Ellipsis
      - genshi.template._ast24.ExtSlice
      - genshi.template._ast24.Index
      - genshi.template._ast24.Slice
    - genshi.template._ast24.stmt
    - unreachable.stmt
      - genshi.template._ast24.Assert
      - genshi.template._ast24.Assign
      - genshi.template._ast24.AugAssign
      - genshi.template._ast24.Break
      - genshi.template._ast24.ClassDef
      - genshi.template._ast24.Continue
      - genshi.template._ast24.Delete
      - genshi.template._ast24.Exec
      - genshi.template._ast24.Expr
      - genshi.template._ast24.For
      - genshi.template._ast24.FunctionDef
      - genshi.template._ast24.Global
      - genshi.template._ast24.If
      - genshi.template._ast24.Import
      - genshi.template._ast24.ImportFrom
      - genshi.template._ast24.Pass
      - genshi.template._ast24.Print
      - genshi.template._ast24.Raise
      - genshi.template._ast24.Return
      - genshi.template._ast24.TryExcept
      - genshi.template._ast24.TryFinally
      - genshi.template._ast24.While
      - genshi.template._ast24.With
    - unreachable.unaryop
      - genshi.template._ast24.Invert
      - genshi.template._ast24.Not
      - genshi.template._ast24.UAdd
      - genshi.template._ast24.USub
    - genshi.template._ast24.unaryop
  - genshi.template.astutil.ASTCodeGenerator: General purpose base class for AST transformations.
  - genshi.template.astutil.ASTTransformer: General purpose base class for AST transformations.
  - genshi.template.plugin.AbstractTemplateEnginePlugin: Implementation of the plugin API.
    - genshi.template.plugin.MarkupTemplateEnginePlugin: Implementation of the plugin API for markup templates.
    - genshi.template.plugin.TextTemplateEnginePlugin: Implementation of the plugin API for text templates.
  - exceptions.BaseException: Common base class for all exceptions
    - exceptions.Exception: Common base class for all non-exit exceptions.
      - genshi.input.ParseError: Exception raised when fatal syntax errors are found in the input being parsed.
      - genshi.path.PathSyntaxError: Exception raised when an XPath expression is syntactically incorrect.
      - exceptions.StandardError: Base class for all standard Python exceptions that do not represent interpreter exiting.
        - exceptions.ValueError: Inappropriate argument value (of correct type).
          - genshi.template.plugin.ConfigurationError: Exception raised when invalid plugin options are encountered.
      - genshi.template.base.TemplateError: Base exception class for errors related to template processing.
        - genshi.template.loader.TemplateNotFound: Exception raised when a specific template file could not be found.
        - genshi.template.base.TemplateRuntimeError: Exception raised when an the evaluation of a Python expression in a template causes an error.
          - genshi.template.eval.UndefinedError: Exception thrown when a template expression attempts to access a variable not defined in the context.
        - genshi.template.base.TemplateSyntaxError: Exception raised when an expression in a template causes a Python syntax error, or the template is not well-formed.
          - genshi.template.base.BadDirectiveError: Exception raised when an unknown directive is encountered when parsing a template.
  - genshi.template.eval.Code: Abstract base class for the Expression and Suite classes.
    - genshi.template.eval.Expression: Evaluates Python expressions used in templates.
    - genshi.template.eval.Suite: Executes Python statements used in templates.
  - genshi.template.base.Context: Container for template input data.
  - genshi.template.directives.Directive: Abstract base class for template directives.
    - genshi.template.directives.AttrsDirective: Implementation of the `py:attrs` template directive.
    - genshi.template.directives.ChooseDirective: Implementation of the `py:choose` directive for conditionally selecting one of several body elements to display.
    - genshi.template.directives.ContentDirective: Implementation of the `py:content` template directive.
    - genshi.template.directives.DefDirective: Implementation of the `py:def` template directive.
    - genshi.template.directives.ForDirective: Implementation of the `py:for` template directive for repeating an element based on an iterable in the context data.
    - genshi.template.directives.IfDirective: Implementation of the `py:if` template directive for conditionally excluding elements from being output.
    - genshi.template.directives.MatchDirective: Implementation of the `py:match` template directive.
    - genshi.template.directives.OtherwiseDirective: Implementation of the `py:otherwise` directive for nesting in a parent with the `py:choose` directive.
    - genshi.template.directives.ReplaceDirective: Implementation of the `py:replace` template directive.
    - genshi.template.directives.StripDirective: Implementation of the `py:strip` template directive.
    - genshi.template.directives.WhenDirective: Implementation of the `py:when` directive for nesting in a parent with the `py:choose` directive.
    - genshi.template.directives.WithDirective: Implementation of the `py:with` template directive, which allows shorthand access to variables and expressions.
  - genshi.template.base.DirectiveFactory: Base for classes that provide a set of template directives.
    - genshi.template.base.Template: Abstract template base class.
      - genshi.template.markup.MarkupTemplate: Implementation of the template language for XML-based templates.
      - genshi.template.text.NewTextTemplate: Implementation of a simple text-based template engine. This class will replace OldTextTemplate in a future release.
      - genshi.template.text.OldTextTemplate: Legacy implementation of the old syntax text-based templates. This class is provided in a transition phase for backwards compatibility. New code should use the NewTextTemplate class and the improved syntax it provides.
    - genshi.filters.i18n.Translator: Can extract and translate localizable strings from markup streams and templates.
  - genshi.output.DocType: Defines a number of commonly used DOCTYPE declarations as constants.
  - genshi.builder.ElementFactory: Factory for Element objects.
  - genshi.builder.Fragment: Represents a markup fragment, which is basically just a list of element or text nodes.
    - genshi.builder.Element: Simple XML output generator based on the builder pattern.
  - genshi.filters.html.HTMLFormFiller: A stream filter that can populate HTML forms from a dictionary of values.
  - genshi.input.HTMLParser: Parser for HTML input based on the Python HTMLParser module.
  - genshi.filters.html.HTMLSanitizer: A filter that removes potentially dangerous HTML tags and attributes from the stream.
  - genshi.filters.transform.InjectorTransformation: Abstract base class for transformations that inject content into a stream.
  - genshi.template.eval.LookupBase: Abstract base class for variable lookup implementations.
    - genshi.template.eval.LenientLookup: Default variable lookup mechanism for expressions.
    - genshi.template.eval.StrictLookup: Strict variable lookup mechanism for expressions.
  - genshi.core.Namespace: Utility class creating and testing elements with a namespace.
  - genshi.path.Path: Implements basic XPath support on streams.
  - genshi.core.Stream: Represents a stream of markup events.
    - genshi.filters.transform.StreamBuffer: Stream event buffer used for cut and copy transformations.
  - genshi.template.loader.TemplateLoader: Responsible for loading templates from files on the specified search path.
  - genshi.output.TextSerializer: Produces plain text from an event stream.
  - genshi.filters.transform.Transformer: Stream filter that can apply a variety of different transformations to a stream.
  - genshi.template.eval.Undefined: Represents a reference to an undefined variable.
  - genshi.input.XMLParser: Generator-based XML parser based on roughly equivalent code in Kid/ElementTree.
  - genshi.output.XMLSerializer: Produces XML text from an event stream.
    - genshi.output.XHTMLSerializer: Produces XHTML text from an event stream.
      - genshi.output.HTMLSerializer: Produces HTML text from an event stream.
  - basestring: Type basestring cannot be instantiated; it is the base for str and unicode.
    - unicode: unicode(string [, encoding[, errors]]) -> object
      - genshi.core.Markup: Marks a string as being safe for inclusion in HTML/XML output without needing to be escaped.
      - genshi.core.QName: A qualified element or attribute name.
  - dict: dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list.
    - genshi.util.LRUCache: A dictionary-like object that stores only a certain number of items, and discards its least recently used item when full.
  - tuple: tuple() -> empty tuple tuple(iterable) -> tuple initialized from iterable's items
    - genshi.core.Attrs: Immutable sequence type that stores the attributes of an element.
  - type: type(object) -> the object's type type(name, bases, dict) -> a new type
    - genshi.template.base.DirectiveFactoryMeta: Meta class for directive factories.
    - genshi.template.directives.DirectiveMeta: Meta class for template directives.