1
2===============
3fritzconnection
4===============
5
6
7.. image::
8    https://img.shields.io/pypi/pyversions/fritzconnection.svg
9    :alt: Python versions
10    :target: https://pypi.org/project/fritzconnection/
11
12.. image::
13    https://img.shields.io/pypi/l/fritzconnection.svg
14    :target: https://pypi.org/project/fritzconnection/
15
16
17Python-Tool to communicate with the AVM FritzBox.
18Uses the TR-064 protocol over UPnP.
19
20Installation:
21-------------
22
23    pip install fritzconnection
24
25
26Quickstart:
27-----------
28
29Using fritzconnection is as easy as: ::
30
31    from fritzconnection import FritzConnection
32
33    fc = FritzConnection(address='192.168.178.1')
34    fc.reconnect()  # get a new external ip from the provider
35    print(fc)  # print router model informations
36
37In general FritzConnection can execute every action provided by the (model-specific) API. For i.e. this can be WLAN settings, internet connection and device status informations, home automation services and much more.
38
39The central method FritzConnection provides to access the FritzOS-API is the `call_action()` method. A reconnection by means of *call_action()* would look like this: ::
40
41    fc = FritzConnection(address='192.168.178.1')
42    fc.call_action("WANIPConn1", "ForceTermination")
43
44The package comes with a library providing some modules as examples how to implement applications on top of FritzConnection.
45
46The package also allows to monitor phone calls in real time by means of the FritzMonitor class (`new in 1.4.0`): ::
47
48   from fritzconnection import FritzMonitor
49
50   fm = FritzMonitor(address='192.168.178.1')  # default ip for most routers
51   queue = fm.start()  # start monitoring: provides a queue.Queue instance
52   # do queue handling here
53   fm.stop()  # stop monitoring
54
55
56Documentation
57-------------
58
59The full documentation and release notes are at https://fritzconnection.readthedocs.org
60