FritzConnection API#
fritzconnection is structured into subpackages:
fritzconnection --|-- cli
|-- core --|-- devices
| |-- exceptions
| |-- fritzconnection
| |-- fritzhttp
| |-- fritzmonitor
| |-- logger
| |-- processor
| |-- soaper
| |-- utils
|
|-- lib
|-- tests
The package cli implements the entry-points for command line usage, the tests are in the tests package and the library modules are in lib. The implementation of fritzconnection itself is structured in the core package.
Public API#
The public interface is provided by the FritzConnection class, the fritzmonitor- and the exceptions-module.
There are shortcuts to import FritzConnection and FritzMonitor:
from fritzconnection import FritzConnection
from fritzconnection import FritzMonitor
fritzconnection#
fritzmonitor#
exceptions#
Exceptions can get imported by:
from fritzconnection.core.exceptions import FritzServiceError
# or:
from fritzconnection.core.exceptions import *
The latter style is often discouraged because of possible namespace-pollution, less clarity about the origin of imported objects and potential name clashings. By using a * import fritzconnection will just import exceptions starting with Fritz in their names.
Exception Hierarchy:
FritzConnectionException
|
|--> ActionError --> FritzActionError
|--> ServiceError --> FritzServiceError
|
|--> FritzAuthorizationError
|
|--> FritzResourceError
|
|--> FritzArgumentError
| |
| |--> FritzArgumentValueError
| |
| |--> FritzArgumentStringToShortError
| |--> FritzArgumentStringToLongError
| |--> FritzArgumentCharacterError
|
|--> FritzInternalError
| |
| |--> FritzActionFailedError
| |--> FritzOutOfMemoryError
|
|--> FritzSecurityError
|
|-->|--> FritzLookUpError
| |
KeyError -------+-->|
|
|
|-->|--> FritzArrayIndexError
|
IndexError -------->|
Legathy Exceptions:
Internal API#
The following core-modules don’t provide a public interface (at least it makes no sense) and are used internally.