'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.'

def __init__(self, config, secret, session_max_age=600, secure_cookie=False, session=None, session_save_method=None, report_errors=True, debug=False, logging_level=logging.INFO, prefix='authomatic', logger=None):

    self.config = config
    self.secret = secret
    self.session_max_age = session_max_age
    self.secure_cookie = secure_cookie
    self.session = session
    self.session_save_method = session_save_method
    self.report_errors = report_errors
    self.debug = debug
    self.logging_level = logging_level
    self.prefix = prefix
    self._logger = (logger or logging.getLogger(str(id(self))))
    if (logger is None):
        self._logger.setLevel(logging_level)
