pynetgear


Namepynetgear JSON
Version 0.10.10 PyPI version JSON
download
home_pagehttp://github.com/MatMaul/pynetgear
SummaryAccess Netgear routers using their SOAP API
upload_time2023-09-12 20:13:52
maintainer
docs_urlNone
authorPaulus Schoutsen
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            pyNetgear
==============

[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/starkillerOG)
[![pipeline status](https://gitlab.com/matmaul/pynetgear/badges/master/pipeline.svg)](https://gitlab.com/matmaul/pynetgear/pipelines)

pyNetgear provides an easy to use Python API to control your Netgear router. It uses the SOAP-api on modern Netgear routers to communicate. It is built by reverse engineering the requests made by the [NETGEAR Genie app](https://play.google.com/store/apps/details?id=com.dragonflow).

pyNetgear works with Python 2 and 3.

If you are connected to the network of the Netgear router, a host is optional.
If you are connected via a wired connection to the Netgear router, a password is optional.
The username defaults to admin.
The port defaults to 5000.
The ssl defaults to false.
You can specify url and it will take precedence on host/port/ssl parameters.
This allows the use of HTTPS, `https://orbilogin.com` for example.

It currently supports the following operations:

**login**<br>
Logs in to the router. Will return True or False to indicate success.

**get_attached_devices**<br>
Returns a list of named tuples describing the device signal, ip, name, mac, type, link_rate and allow_or_block.

**get_attached_devices_2**<br>
Returns a list of named tuples describing the device signal, ip, name, mac, type, link_rate, allow_or_block, device_type, device_model, ssid and conn_ap_mac.

This call is slower and probably heavier on the router load.

**get_traffic_meter**<br>
Return a dict containing the traffic meter information from the router (if enabled in the webinterface).

**allow_block_device**<br>
Allows user to block/unblock devices from accessing router by specifying mac_addr and new device_status (Block/Allow)
**Note:** In order to use this function, Remote Management _must_ be enabled in the router's admin settings.

Installation
------------

You can install PyNetgear from PyPi using `pip3 install pynetgear` (use `pip` if you're still using Python 2).

Usage
-----
To test run from the console:
`$ python -m pynetgear [<pass>] [<host>] [<user>] [<port>] [<ssl>]`

To use within your Python scripts:
```python
from pynetgear import Netgear

netgear = Netgear(password=mypassword)

for i in netgear.get_attached_devices():
    print i
```

Supported routers
-----------------
It has been tested with the Netgear R6300 router and the Netgear WNDR4500 router. According to the NETGEAR Genie app description, the following routers should work:

 * Netgear Orbi
 * Netgear R7800
 * Netgear R7500v2 (Port 80)
 * Netgear R7000
 * Netgear R6900
 * Netgear R6300
 * Netgear R6250
 * Netgear R6200
 * Netgear R6100
 * Netgear N300 - Model: C3000 (Port 80)
 * Netgear Centria (WNDR4700, WND4720)
 * Netgear WNDR4500
 * Netgear WNDR4300
 * Netgear WNDR4000
 * Netgear WNDR3800
 * Netgear WNDR3700v3
 * Netgear WNDR3700v2
 * Netgear WNDR3400v2
 * Netgear WNR3500Lv2
 * Netgear WNR2200
 * Netgear WNR2000v3
 * Netgear WNR2000v4 (Port 80)
 * Netgear WNR1500
 * Netgear WNR1000v2
 * Netgear WNR1000v3
 * Netgear WNDRMAC
 * Netgear WNR612v2

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/MatMaul/pynetgear",
    "name": "pynetgear",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Paulus Schoutsen",
    "author_email": "Paulus@PaulusSchoutsen.nl",
    "download_url": "https://files.pythonhosted.org/packages/0d/1b/925d4bf0b8e45e9898722a3fdc6e62b6d73a17dca9689f8a0f74884fcca2/pynetgear-0.10.10.tar.gz",
    "platform": null,
    "description": "pyNetgear\r\n==============\r\n\r\n[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/starkillerOG)\r\n[![pipeline status](https://gitlab.com/matmaul/pynetgear/badges/master/pipeline.svg)](https://gitlab.com/matmaul/pynetgear/pipelines)\r\n\r\npyNetgear provides an easy to use Python API to control your Netgear router. It uses the SOAP-api on modern Netgear routers to communicate. It is built by reverse engineering the requests made by the [NETGEAR Genie app](https://play.google.com/store/apps/details?id=com.dragonflow).\r\n\r\npyNetgear works with Python 2 and 3.\r\n\r\nIf you are connected to the network of the Netgear router, a host is optional.\r\nIf you are connected via a wired connection to the Netgear router, a password is optional.\r\nThe username defaults to admin.\r\nThe port defaults to 5000.\r\nThe ssl defaults to false.\r\nYou can specify url and it will take precedence on host/port/ssl parameters.\r\nThis allows the use of HTTPS, `https://orbilogin.com` for example.\r\n\r\nIt currently supports the following operations:\r\n\r\n**login**<br>\r\nLogs in to the router. Will return True or False to indicate success.\r\n\r\n**get_attached_devices**<br>\r\nReturns a list of named tuples describing the device signal, ip, name, mac, type, link_rate and allow_or_block.\r\n\r\n**get_attached_devices_2**<br>\r\nReturns a list of named tuples describing the device signal, ip, name, mac, type, link_rate, allow_or_block, device_type, device_model, ssid and conn_ap_mac.\r\n\r\nThis call is slower and probably heavier on the router load.\r\n\r\n**get_traffic_meter**<br>\r\nReturn a dict containing the traffic meter information from the router (if enabled in the webinterface).\r\n\r\n**allow_block_device**<br>\r\nAllows user to block/unblock devices from accessing router by specifying mac_addr and new device_status (Block/Allow)\r\n**Note:** In order to use this function, Remote Management _must_ be enabled in the router's admin settings.\r\n\r\nInstallation\r\n------------\r\n\r\nYou can install PyNetgear from PyPi using `pip3 install pynetgear` (use `pip` if you're still using Python 2).\r\n\r\nUsage\r\n-----\r\nTo test run from the console:\r\n`$ python -m pynetgear [<pass>] [<host>] [<user>] [<port>] [<ssl>]`\r\n\r\nTo use within your Python scripts:\r\n```python\r\nfrom pynetgear import Netgear\r\n\r\nnetgear = Netgear(password=mypassword)\r\n\r\nfor i in netgear.get_attached_devices():\r\n    print i\r\n```\r\n\r\nSupported routers\r\n-----------------\r\nIt has been tested with the Netgear R6300 router and the Netgear WNDR4500 router. According to the NETGEAR Genie app description, the following routers should work:\r\n\r\n * Netgear Orbi\r\n * Netgear R7800\r\n * Netgear R7500v2 (Port 80)\r\n * Netgear R7000\r\n * Netgear R6900\r\n * Netgear R6300\r\n * Netgear R6250\r\n * Netgear R6200\r\n * Netgear R6100\r\n * Netgear N300 - Model: C3000 (Port 80)\r\n * Netgear Centria (WNDR4700, WND4720)\r\n * Netgear WNDR4500\r\n * Netgear WNDR4300\r\n * Netgear WNDR4000\r\n * Netgear WNDR3800\r\n * Netgear WNDR3700v3\r\n * Netgear WNDR3700v2\r\n * Netgear WNDR3400v2\r\n * Netgear WNR3500Lv2\r\n * Netgear WNR2200\r\n * Netgear WNR2000v3\r\n * Netgear WNR2000v4 (Port 80)\r\n * Netgear WNR1500\r\n * Netgear WNR1000v2\r\n * Netgear WNR1000v3\r\n * Netgear WNDRMAC\r\n * Netgear WNR612v2\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Access Netgear routers using their SOAP API",
    "version": "0.10.10",
    "project_urls": {
        "Download": "http://github.com/MatMaul/pynetgear/tarball/0.10.10",
        "Homepage": "http://github.com/MatMaul/pynetgear"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec50182a0c0172c246e19702bfa53b1d53db01a27ff132730292ce1b2d5ff13e",
                "md5": "9ca099cf1594db7b73f931616739f4e6",
                "sha256": "3d8361ed74f7ed6ee4a2fd95e56b0d3b71e045a73b32c8996d7ecf71bbc1a2f8"
            },
            "downloads": -1,
            "filename": "pynetgear-0.10.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9ca099cf1594db7b73f931616739f4e6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 17950,
            "upload_time": "2023-09-12T20:13:49",
            "upload_time_iso_8601": "2023-09-12T20:13:49.160957Z",
            "url": "https://files.pythonhosted.org/packages/ec/50/182a0c0172c246e19702bfa53b1d53db01a27ff132730292ce1b2d5ff13e/pynetgear-0.10.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d1b925d4bf0b8e45e9898722a3fdc6e62b6d73a17dca9689f8a0f74884fcca2",
                "md5": "480e33fbb54998f4798d230683bf2ced",
                "sha256": "35f8d3bfa4e876466c7a9e99a6cd621d974e681efc0e85211be9dc216c1e3b84"
            },
            "downloads": -1,
            "filename": "pynetgear-0.10.10.tar.gz",
            "has_sig": false,
            "md5_digest": "480e33fbb54998f4798d230683bf2ced",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18735,
            "upload_time": "2023-09-12T20:13:52",
            "upload_time_iso_8601": "2023-09-12T20:13:52.054161Z",
            "url": "https://files.pythonhosted.org/packages/0d/1b/925d4bf0b8e45e9898722a3fdc6e62b6d73a17dca9689f8a0f74884fcca2/pynetgear-0.10.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-12 20:13:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MatMaul",
    "github_project": "pynetgear",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pynetgear"
}
        
Elapsed time: 1.60020s