Skip to main content

gli4py

A aysnc python 3 API wrapper for GL-inet routers with version 4 firmware. [WIP]

GL-inet routers are built on OpenWRT. They are highly customizeable but have an attractive user interface.

As part of their modiification of the UI they used to provide a documented locally accessible API.

I thought it would be handy to develop a python 3 wrapper for the API for easy intergation into other services such as HomeAssistant

Installation

pip3 install gli-py

Dev setup

  1. Clone the repo
  2. Ensure you have python 3.11 or greater installed python3 -V or python -V
  3. Uses poetry for venv control pip3 install poetry
  4. poetry config virtualenvs.in-project true create the venvs in the project folder
  5. poetry install
  6. poetry env activate
  7. To run tests, ensure there is a file called router_pwd in the root directory with the router password in.
  8. Then run PYTHONDEVMODE="" PYTHONASYNCIODEBUG="" pytest tests to see responses, assumes the router is at 192.168.0.1
  9. Set token with poetry config pypi-token.pypi TOKEN
  10. publish with poetry publish --build

Dev setup alongside HA & the Custom component

  1. Clone the repo into the vscode /workspaces/ dir
  2. The inside the ha-env terminal run (ha-venv) vscode ➜ /workspaces/core (branch-name) $ pip install -e /workspaces/gli4py
  3. Ensure the custom component has "python.analysis.extraPaths": ["/workspaces/gli4py/"] in .vscode/settings.json
  4. deactivate the ha-env with deactivate
  5. Do steps 3 onwards above

Todo list:

Release files for gli4py 0.0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gli4py 0.0.17
File Size Uploaded
gli4py-0.0.17.tar.gz 21.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gli4py 0.0.17
File Interpreter ABI Platform
gli4py-0.0.17-py3-none-any.whl Python 3 none any Details

Total release size: 43.0 kB

Release files / gli4py-0.0.17.tar.gz

Download URL gli4py-0.0.17.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e09c69bc4fb2372292e3e077087f5047d564a36b93cae62d103bd5953f3e65c8
BLAKE2b-256 checksum
How to use checksums
c006d248ef9a4d952e04a4d63aeb4033b808bd46774826e09647d01282e2f325
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

Release files / gli4py-0.0.17-py3-none-any.whl

Download URL gli4py-0.0.17-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
caef308b6bf12e5c038ecba95620236feae91ee7212b1003dbe5baef910aa9ff
BLAKE2b-256 checksum
How to use checksums
459c1f79af416fd32a99cc783aeafe909b029e5c73315fcf8d98670b5933cd4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page