# phpman > pydoc > genshi

Help on package genshi:

## NAME
    genshi

## DESCRIPTION
    This package provides various means for generating and processing web markup
    (XML or HTML).

    The design is centered around the concept of streams of markup events (similar
    in concept to SAX parsing events) which can be processed in a uniform manner
    independently of where or how they are produced.

## PACKAGE CONTENTS
    _speedups
    builder
    compat
    core
    filters (package)
    input
    output
    path
    template (package)
    tests (package)
    util

## FUNCTIONS
### escape
        Create a Markup instance from a string and escape special characters
        it may contain (<, >, & and ").

        >>> escape('"1 < 2"')
        <Markup u'&#34;1 &lt; 2&#34;'>

        If the `quotes` parameter is set to `False`, the " character is left
        as is. Escaping quotes is generally only required for strings that are
        to be used in attribute values.

        >>> escape('"1 < 2"', quotes=False)
        <Markup u'"1 &lt; 2"'>

        :param text: the text to escape
        :param quotes: if ``True``, double quote characters are escaped in
                       addition to the other special characters
        :return: the escaped `Markup` string
        :rtype: `Markup`

## DATA
    __docformat__ = 'restructuredtext en'

## VERSION
    0.7.6

## FILE
    /usr/lib/python3/dist-packages/genshi/__init__.py


