django-fritzconnection


Namedjango-fritzconnection JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
SummaryWeb based FritzBox management using Python/Django.
upload_time2024-09-07 10:34:08
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseGPL-3.0-or-later
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-fritzconnection

[![tests](https://github.com/jedie/django-fritzconnection/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/jedie/django-fritzconnection/actions/workflows/tests.yml)
[![codecov](https://codecov.io/github/jedie/django-fritzconnection/branch/main/graph/badge.svg)](https://app.codecov.io/github/jedie/django-fritzconnection)
[![django-fritzconnection @ PyPi](https://img.shields.io/pypi/v/django-fritzconnection?label=django-fritzconnection%20%40%20PyPi)](https://pypi.org/project/django-fritzconnection/)
[![Python Versions](https://img.shields.io/pypi/pyversions/django-fritzconnection)](https://github.com/jedie/django-fritzconnection/blob/main/pyproject.toml)
[![License GPL-3.0-or-later](https://img.shields.io/pypi/l/django-fritzconnection)](https://github.com/jedie/django-fritzconnection/blob/main/LICENSE)

Web based FritzBox management using Python/Django and the great [fritzconnection](https://github.com/kbr/fritzconnection) library.

The basic idea is to block/unblock Internet access to a group of devices as easily as possible.

Current state: **early development stage**

Existing features:

* actions:
  * Change WAN access of a host or for all host of a group
* models:
  * HostModel - A host/device that is/was connected to your FritzBox
    * "Static" storage for all `FritzHosts().get_hosts_info()` information
    * Update in Admin via change list tools link and manage command
  * HostGroupModel - Collect host/device into groups to manage "WAN access"
    * Every group are listed on the front page
    * Allow/Disallow "WAN access" for all hosts of a group with one click
* a few "test" views:
  * Host information
    * Get information about registered hosts
    * Get raw mesh topology
  * Diagnose
    * Test FritzBox connection
    * List all FritzBox services


[![Install django-fritzconnection with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=django-fritzconnection)

> [django-fritzconnection_ynh](https://github.com/YunoHost-Apps/django-fritzconnection_ynh) allows you to install django-fritzconnection quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.

Pull requests welcome ;)


## Screenshots

[more screenshots](https://github.com/jedie/jedie.github.io/tree/master/screenshots/django-fritzconnection)

----

![Group Management](https://raw.githubusercontent.com/jedie/jedie.github.io/master/screenshots/django-fritzconnection/v0.1.0.rc1%20-%20Group%20Management.png)

----

![Host Change List](https://raw.githubusercontent.com/jedie/jedie.github.io/master/screenshots/django-fritzconnection/v0.0.2%20-%20hosts%20change%20list.png)

----

[more screenshots](https://github.com/jedie/jedie.github.io/tree/master/screenshots/django-fritzconnection)


## Quick start for developers

```
~$ git clone https://github.com/jedie/django-fritzconnection.git
~$ cd django-fritzconnection
~/django-fritzconnection$ ./manage.py
```

## FritzBox Credentials

Some of the FritzBox API requests needs a login. Currently the only way to store FritzBox Credentials is to add them into the environment.

Error message if login credentials are missing is: `Unable to perform operation. 401 Unauthorized`

Shell script work-a-round for developing, e.g.:

```
#!/bin/bash

(
    set -ex
    export FRITZ_USERNAME="<username>"
    export FRITZ_PASSWORD="<password>"

    ./devshell.py run_dev_server
)
```
See also: [Issues #5](https://github.com/jedie/django-fritzconnection/issues/5)


## Make new release

We use [cli-base-utilities](https://github.com/jedie/cli-base-utilities#generate-project-history-base-on-git-commitstags) to generate the history in this README.


To make a new release, do this:

* Increase your project version number
* Run tests to update the README
* commit the changes
* Create release


## History

See also git tags: https://github.com/jedie/manageprojects/tags

[comment]: <> (✂✂✂ auto generated history start ✂✂✂)

* [v0.4.0](https://github.com/jedie/django-fritzconnection/compare/v0.3.0...v0.4.0)
  * 2024-09-07 - Update datetime usage
  * 2024-09-07 - Bugfix: Handle missing MAC address
  * 2024-09-07 - Apply manageprojects updates
  * 2023-12-17 - Use "update-readme-history" pre-commit hook
  * 2023-12-17 - Use cli_base.cli_tools.git_history.update_readme_history()
  * 2023-12-17 - Update requirements TODO: Switch to Django 5.0
  * 2023-12-17 - Apply manageprojects migrations
  * 2023-11-28 - Update README.md
* [v0.3.0](https://github.com/jedie/django-fritzconnection/compare/v0.2.0...v0.3.0)
  * 2023-11-28 - fix CI and activate PYTHONWARNINGS only for the tests
  * 2023-11-28 - fix tox config
  * 2023-11-28 - Revert deletion of AUTHORS and LICENSE and remove obsolete snapshot file
  * 2023-11-28 - Remove different Django version from test matrix: Just use the newest release
  * 2023-11-28 - Fix tests
  * 2023-11-28 - Skip fetching host information if there is no IP address
  * 2023-11-28 - Log any fritzconnection call action
  * 2023-11-28 - generate the history in README
  * 2023-11-28 - fix code style
  * 2023-11-28 - Run django-upgrade
  * 2023-11-28 - +"flake8-bugbear"
  * 2023-11-28 - Switch from drv-shell to manage_django_project
  * 2023-06-11 - Update requirements
  * 2022-09-21 - Setup Github PyPi Cache
  * 2022-09-21 - Replace DynamicViewMenu with `bx_django_utils.admin_extra_views`
  * 2022-09-21 - Use RunServerCommand from django-tools
  * 2022-08-12 - fix CI
  * 2022-08-12 - update CI
  * 2022-05-29 - Remove Django v2.2 from text matrix
  * 2022-05-29 - "python3 devshell.py" -> "./devshell.py"
  * 2022-05-29 - Update tox setup
* [v0.2.0](https://github.com/jedie/django-fritzconnection/compare/v0.1.0...v0.2.0)
  * 2022-05-15 - Release v0.2.0
  * 2022-05-15 - Add test for host changelist + unique name filter
  * 2022-05-15 - NEW: Hosts admin action to ping all IPs from selected hosts
  * 2022-05-11 - Add host change list filter "unique name"
  * 2022-04-30 - Update requirements
* [v0.1.0](https://github.com/jedie/django-fritzconnection/compare/v0.0.3...v0.1.0)
  * 2022-04-08 - Update README.md
  * 2022-04-08 - Skip hosts without IP in group management
  * 2022-04-08 - Handle updating not existing host
  * 2022-04-08 - Set v0.1.0.rc0
  * 2022-04-08 - Bugfix adding new hosts without a group

<details><summary>Expand older history entries ...</summary>

* [v0.0.3](https://github.com/jedie/django-fritzconnection/compare/v0.0.2...v0.0.3)
  * 2022-04-08 - NEW: 'Manage host WAN access via host-groups'
  * 2022-04-08 - NEW: Group host entries
  * 2022-04-08 - Add some info about username/password
  * 2022-04-08 - Update README.md
  * 2022-04-08 - Display FRITZ_USERNAME and FRITZ_PASSWORD on connection info page
  * 2022-04-08 - set v0.0.3.rc0
  * 2022-04-07 - NEW: 'List "last connect" information about hosts' view
  * 2022-04-07 - Fix typo in URL
* [v0.0.2](https://github.com/jedie/django-fritzconnection/compare/e9ef397...v0.0.2)
  * 2022-04-04 - Render tags under name in change list
  * 2022-04-04 - Reoder admin change list
  * 2022-04-02 - Update README.md
  * 2022-04-02 - Fix python version in github actions
  * 2022-04-02 - Support Python 3.7
  * 2022-04-02 - SUpport and test with Python 3.7 (for YunoHost)
  * 2022-04-01 - NEW First usable action: "Change WAN access of a host"
  * 2022-04-01 - Store "WAN access state" for every host
  * 2022-04-01 - Display the RAW mesh topology JSON data
  * 2022-04-01 - Store host IP v4 address from FritzBox
  * 2022-04-01 - Remove django "sites"
  * 2022-03-31 - Add translations
  * 2022-03-31 - Delete wrong translation files
  * 2022-03-31 - Add "HostModel" to store all "fh.get_hosts_info()" information
  * 2022-03-31 - Bugfix settings.BASE_PATH
  * 2022-03-31 - Raise traceback on manage command errors
  * 2022-03-31 - Add a view to list all registered hosts and change internet access for one host
  * 2022-03-31 - cleanup gitignore
  * 2022-03-31 - Add FritzBox connection information in admin header
  * 2022-03-31 - Catch and log FritzConnectionException
  * 2022-03-31 - Add django admin context to diagnose views
  * 2022-03-29 - Enhance 'List all FritzBox services'
  * 2022-03-29 - Add 'List all FritzBox services' view
  * 2022-03-29 - Add 'Test FritzBox connection' view to admin index
  * 2022-03-24 - fix version
  * 2022-03-24 - Bugfix "publish" command
  * 2022-03-24 - Update README
  * 2022-03-24 - fix tests
  * 2022-03-24 - Init project
  * 2022-03-24 - Initial commit

</details>


[comment]: <> (✂✂✂ auto generated history end ✂✂✂)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-fritzconnection",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Jens Diemer <django-fritzconnection@jensdiemer.de>",
    "download_url": "https://files.pythonhosted.org/packages/24/11/11dab70946661b287e2b5922043df1f648b04ee85c4142dbee358c994a81/django_fritzconnection-0.4.0.tar.gz",
    "platform": null,
    "description": "# django-fritzconnection\n\n[![tests](https://github.com/jedie/django-fritzconnection/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/jedie/django-fritzconnection/actions/workflows/tests.yml)\n[![codecov](https://codecov.io/github/jedie/django-fritzconnection/branch/main/graph/badge.svg)](https://app.codecov.io/github/jedie/django-fritzconnection)\n[![django-fritzconnection @ PyPi](https://img.shields.io/pypi/v/django-fritzconnection?label=django-fritzconnection%20%40%20PyPi)](https://pypi.org/project/django-fritzconnection/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/django-fritzconnection)](https://github.com/jedie/django-fritzconnection/blob/main/pyproject.toml)\n[![License GPL-3.0-or-later](https://img.shields.io/pypi/l/django-fritzconnection)](https://github.com/jedie/django-fritzconnection/blob/main/LICENSE)\n\nWeb based FritzBox management using Python/Django and the great [fritzconnection](https://github.com/kbr/fritzconnection) library.\n\nThe basic idea is to block/unblock Internet access to a group of devices as easily as possible.\n\nCurrent state: **early development stage**\n\nExisting features:\n\n* actions:\n  * Change WAN access of a host or for all host of a group\n* models:\n  * HostModel - A host/device that is/was connected to your FritzBox\n    * \"Static\" storage for all `FritzHosts().get_hosts_info()` information\n    * Update in Admin via change list tools link and manage command\n  * HostGroupModel - Collect host/device into groups to manage \"WAN access\"\n    * Every group are listed on the front page\n    * Allow/Disallow \"WAN access\" for all hosts of a group with one click\n* a few \"test\" views:\n  * Host information\n    * Get information about registered hosts\n    * Get raw mesh topology\n  * Diagnose\n    * Test FritzBox connection\n    * List all FritzBox services\n\n\n[![Install django-fritzconnection with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=django-fritzconnection)\n\n> [django-fritzconnection_ynh](https://github.com/YunoHost-Apps/django-fritzconnection_ynh) allows you to install django-fritzconnection quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.\n\nPull requests welcome ;)\n\n\n## Screenshots\n\n[more screenshots](https://github.com/jedie/jedie.github.io/tree/master/screenshots/django-fritzconnection)\n\n----\n\n![Group Management](https://raw.githubusercontent.com/jedie/jedie.github.io/master/screenshots/django-fritzconnection/v0.1.0.rc1%20-%20Group%20Management.png)\n\n----\n\n![Host Change List](https://raw.githubusercontent.com/jedie/jedie.github.io/master/screenshots/django-fritzconnection/v0.0.2%20-%20hosts%20change%20list.png)\n\n----\n\n[more screenshots](https://github.com/jedie/jedie.github.io/tree/master/screenshots/django-fritzconnection)\n\n\n## Quick start for developers\n\n```\n~$ git clone https://github.com/jedie/django-fritzconnection.git\n~$ cd django-fritzconnection\n~/django-fritzconnection$ ./manage.py\n```\n\n## FritzBox Credentials\n\nSome of the FritzBox API requests needs a login. Currently the only way to store FritzBox Credentials is to add them into the environment.\n\nError message if login credentials are missing is: `Unable to perform operation. 401 Unauthorized`\n\nShell script work-a-round for developing, e.g.:\n\n```\n#!/bin/bash\n\n(\n    set -ex\n    export FRITZ_USERNAME=\"<username>\"\n    export FRITZ_PASSWORD=\"<password>\"\n\n    ./devshell.py run_dev_server\n)\n```\nSee also: [Issues #5](https://github.com/jedie/django-fritzconnection/issues/5)\n\n\n## Make new release\n\nWe use [cli-base-utilities](https://github.com/jedie/cli-base-utilities#generate-project-history-base-on-git-commitstags) to generate the history in this README.\n\n\nTo make a new release, do this:\n\n* Increase your project version number\n* Run tests to update the README\n* commit the changes\n* Create release\n\n\n## History\n\nSee also git tags: https://github.com/jedie/manageprojects/tags\n\n[comment]: <> (\u2702\u2702\u2702 auto generated history start \u2702\u2702\u2702)\n\n* [v0.4.0](https://github.com/jedie/django-fritzconnection/compare/v0.3.0...v0.4.0)\n  * 2024-09-07 - Update datetime usage\n  * 2024-09-07 - Bugfix: Handle missing MAC address\n  * 2024-09-07 - Apply manageprojects updates\n  * 2023-12-17 - Use \"update-readme-history\" pre-commit hook\n  * 2023-12-17 - Use cli_base.cli_tools.git_history.update_readme_history()\n  * 2023-12-17 - Update requirements TODO: Switch to Django 5.0\n  * 2023-12-17 - Apply manageprojects migrations\n  * 2023-11-28 - Update README.md\n* [v0.3.0](https://github.com/jedie/django-fritzconnection/compare/v0.2.0...v0.3.0)\n  * 2023-11-28 - fix CI and activate PYTHONWARNINGS only for the tests\n  * 2023-11-28 - fix tox config\n  * 2023-11-28 - Revert deletion of AUTHORS and LICENSE and remove obsolete snapshot file\n  * 2023-11-28 - Remove different Django version from test matrix: Just use the newest release\n  * 2023-11-28 - Fix tests\n  * 2023-11-28 - Skip fetching host information if there is no IP address\n  * 2023-11-28 - Log any fritzconnection call action\n  * 2023-11-28 - generate the history in README\n  * 2023-11-28 - fix code style\n  * 2023-11-28 - Run django-upgrade\n  * 2023-11-28 - +\"flake8-bugbear\"\n  * 2023-11-28 - Switch from drv-shell to manage_django_project\n  * 2023-06-11 - Update requirements\n  * 2022-09-21 - Setup Github PyPi Cache\n  * 2022-09-21 - Replace DynamicViewMenu with `bx_django_utils.admin_extra_views`\n  * 2022-09-21 - Use RunServerCommand from django-tools\n  * 2022-08-12 - fix CI\n  * 2022-08-12 - update CI\n  * 2022-05-29 - Remove Django v2.2 from text matrix\n  * 2022-05-29 - \"python3 devshell.py\" -> \"./devshell.py\"\n  * 2022-05-29 - Update tox setup\n* [v0.2.0](https://github.com/jedie/django-fritzconnection/compare/v0.1.0...v0.2.0)\n  * 2022-05-15 - Release v0.2.0\n  * 2022-05-15 - Add test for host changelist + unique name filter\n  * 2022-05-15 - NEW: Hosts admin action to ping all IPs from selected hosts\n  * 2022-05-11 - Add host change list filter \"unique name\"\n  * 2022-04-30 - Update requirements\n* [v0.1.0](https://github.com/jedie/django-fritzconnection/compare/v0.0.3...v0.1.0)\n  * 2022-04-08 - Update README.md\n  * 2022-04-08 - Skip hosts without IP in group management\n  * 2022-04-08 - Handle updating not existing host\n  * 2022-04-08 - Set v0.1.0.rc0\n  * 2022-04-08 - Bugfix adding new hosts without a group\n\n<details><summary>Expand older history entries ...</summary>\n\n* [v0.0.3](https://github.com/jedie/django-fritzconnection/compare/v0.0.2...v0.0.3)\n  * 2022-04-08 - NEW: 'Manage host WAN access via host-groups'\n  * 2022-04-08 - NEW: Group host entries\n  * 2022-04-08 - Add some info about username/password\n  * 2022-04-08 - Update README.md\n  * 2022-04-08 - Display FRITZ_USERNAME and FRITZ_PASSWORD on connection info page\n  * 2022-04-08 - set v0.0.3.rc0\n  * 2022-04-07 - NEW: 'List \"last connect\" information about hosts' view\n  * 2022-04-07 - Fix typo in URL\n* [v0.0.2](https://github.com/jedie/django-fritzconnection/compare/e9ef397...v0.0.2)\n  * 2022-04-04 - Render tags under name in change list\n  * 2022-04-04 - Reoder admin change list\n  * 2022-04-02 - Update README.md\n  * 2022-04-02 - Fix python version in github actions\n  * 2022-04-02 - Support Python 3.7\n  * 2022-04-02 - SUpport and test with Python 3.7 (for YunoHost)\n  * 2022-04-01 - NEW First usable action: \"Change WAN access of a host\"\n  * 2022-04-01 - Store \"WAN access state\" for every host\n  * 2022-04-01 - Display the RAW mesh topology JSON data\n  * 2022-04-01 - Store host IP v4 address from FritzBox\n  * 2022-04-01 - Remove django \"sites\"\n  * 2022-03-31 - Add translations\n  * 2022-03-31 - Delete wrong translation files\n  * 2022-03-31 - Add \"HostModel\" to store all \"fh.get_hosts_info()\" information\n  * 2022-03-31 - Bugfix settings.BASE_PATH\n  * 2022-03-31 - Raise traceback on manage command errors\n  * 2022-03-31 - Add a view to list all registered hosts and change internet access for one host\n  * 2022-03-31 - cleanup gitignore\n  * 2022-03-31 - Add FritzBox connection information in admin header\n  * 2022-03-31 - Catch and log FritzConnectionException\n  * 2022-03-31 - Add django admin context to diagnose views\n  * 2022-03-29 - Enhance 'List all FritzBox services'\n  * 2022-03-29 - Add 'List all FritzBox services' view\n  * 2022-03-29 - Add 'Test FritzBox connection' view to admin index\n  * 2022-03-24 - fix version\n  * 2022-03-24 - Bugfix \"publish\" command\n  * 2022-03-24 - Update README\n  * 2022-03-24 - fix tests\n  * 2022-03-24 - Init project\n  * 2022-03-24 - Initial commit\n\n</details>\n\n\n[comment]: <> (\u2702\u2702\u2702 auto generated history end \u2702\u2702\u2702)\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Web based FritzBox management using Python/Django.",
    "version": "0.4.0",
    "project_urls": {
        "Documentation": "https://github.com/jedie/django-fritzconnection",
        "Source": "https://github.com/jedie/django-fritzconnection"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9433362ed8b7fbfe34e4ba5af1a3de28b8ff502648a126332b8b7cc9fc79f812",
                "md5": "b520aa97ba614c944c6bdc7633d52207",
                "sha256": "41e0650cc10d964aa3332873f7b24ee4fe11ca7d40c3099f3e3a6a51abfbf6d8"
            },
            "downloads": -1,
            "filename": "django_fritzconnection-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b520aa97ba614c944c6bdc7633d52207",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 75939,
            "upload_time": "2024-09-07T10:34:06",
            "upload_time_iso_8601": "2024-09-07T10:34:06.821048Z",
            "url": "https://files.pythonhosted.org/packages/94/33/362ed8b7fbfe34e4ba5af1a3de28b8ff502648a126332b8b7cc9fc79f812/django_fritzconnection-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "241111dab70946661b287e2b5922043df1f648b04ee85c4142dbee358c994a81",
                "md5": "4c7ed3cf4f64abffdf0ba656aa54a1bf",
                "sha256": "9ecec18c2bc8fd362da282f3187ffc29a1f655b6af2c8fb7cde9b2b7e6d6f19a"
            },
            "downloads": -1,
            "filename": "django_fritzconnection-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4c7ed3cf4f64abffdf0ba656aa54a1bf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 94306,
            "upload_time": "2024-09-07T10:34:08",
            "upload_time_iso_8601": "2024-09-07T10:34:08.770028Z",
            "url": "https://files.pythonhosted.org/packages/24/11/11dab70946661b287e2b5922043df1f648b04ee85c4142dbee358c994a81/django_fritzconnection-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-07 10:34:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jedie",
    "github_project": "django-fritzconnection",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "django-fritzconnection"
}
        
Elapsed time: 0.30261s