mheath / omada-python-client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Omada Python Client

A Python client for Omada 5.x+.

After seeing that the Omada client from ghaberek is longer being maintained, I decided to build this client for the primary goal to provide an Omada integration in Home Assistant.

I'm open to accepting contributions. If there's an API that you need that is not implemented, please create an issue.

This client has both blocking and async APIs.

Example using Blocking API

import requests

from omada import Omada

session = requests.Session()
session.verify = false

omada = Omada("YourOmadaIPAddress", session = session)
omada.login("username", "passsword")

for client in omada.get_clients():
    print client

omada.logout()

Running tests

To run tests, you must first create a test.cfg file. Then run pytest (if you don't have pytest installed, run python3 -m pip install -U pytest).

Sample test.cfg:

[omada]
host=192.168.1.2
username=admin
password=YOUR_PASSWORD

About

License:Apache License 2.0


Languages

Language:Python 100.0%