def __init__(<EOL>self, config, secret, session_max_age=<NUM_LIT>, secure_cookie=False,<EOL>session=None, session_save_method=None, report_errors=True,<EOL>debug=False, logging_level=logging.INFO, prefix='<STR_LIT>',<EOL>logger=None<EOL>):
self.config = config<EOL>self.secret = secret<EOL>self.session_max_age = session_max_age<EOL>self.secure_cookie = secure_cookie<EOL>self.session = session<EOL>self.session_save_method = session_save_method<EOL>self.report_errors = report_errors<EOL>self.debug = debug<EOL>self.logging_level = logging_level<EOL>self.prefix = prefix<EOL>self._logger = logger or logging.getLogger(str(id(self)))<EOL>if logger is None:<EOL><INDENT>self._logger.setLevel(logging_level)<EOL><DEDENT>
Encapsulates all the functionality of this package.

:param dict config:
    :doc:`config`

:param str secret:
    A secret string that will be used as the key for signing
    :class:`.Session` cookie and as a salt by *CSRF* token generation.

:param session_max_age:
    Maximum allowed age of :class:`.Session` cookie nonce in seconds.

:param bool secure_cookie:
    If ``True`` the :class:`.Session` cookie will be saved wit
    ``Secure`` attribute.

:param session:
    Custom dictionary-like session implementation.

:param callable session_save_method:
    A method of the supplied session or any mechanism that saves the
    session data and cookie.

:param bool report_errors:
    If ``True`` exceptions encountered during the **login procedure**
    will be caught and reported in the :attr:`.LoginResult.error`
    attribute.
    Default is ``True``.

:param bool debug:
    If ``True`` traceback of exceptions will be written to response.
    Default is ``False``.

:param int logging_level:
    The logging level threshold for the default logger as specified in
    the standard Python
    `logging library <http://docs.python.org/2/library/logging.html>`_.
    This setting is ignored when :data:`logger` is set.
    Default is ``logging.INFO``.

:param str prefix:
    Prefix used as the :class:`.Session` cookie name.

:param logger:
    A :class:`logging.logger` instance.