This release is a pre-release and may not be stable for production use.
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
- Clone the repo
- Ensure you have python 3.11 or greater installed
python3 -Vorpython -V - Uses poetry for venv control
pip3 install poetry poetry config virtualenvs.in-project truecreate the venvs in the project folderpoetry installpoetry env activate- To run tests, ensure there is a file called
router_pwdin the root directory with the router password in. - Then run
PYTHONDEVMODE="" PYTHONASYNCIODEBUG="" pytest teststo see responses, assumes the router is at192.168.0.1 - Set token with
poetry config pypi-token.pypi TOKEN - publish with
poetry publish --build
Dev setup alongside HA & the Custom component
- Clone the repo into the vscode
/workspaces/dir - The inside the
ha-envterminal run(ha-venv) vscode ➜ /workspaces/core (branch-name) $ pip install -e /workspaces/gli4py - Ensure the custom component has
"python.analysis.extraPaths": ["/workspaces/gli4py/"]in.vscode/settings.json - deactivate the
ha-envwithdeactivate - Do steps 3 onwards above
Todo list:
- Decide on useful endpoints to expose - see https://github.com/HarvsG/ha-glinet-integration#todo
- Expose said endpoints
- Write remaining
- Package correctly
- Test that dev enviroment is re-producable
- Publish on pip
- Static typing
Release files for gli4py 0.0.18b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gli4py-0.0.18b1.tar.gz | 21.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gli4py-0.0.18b1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.2 kB
Release files / gli4py-0.0.18b1.tar.gz
| Download URL | gli4py-0.0.18b1.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ace92151e9d3745bcf178931f0232f09153ba2c8e28e18d6feb62d2d408b563a
|
|
BLAKE2b-256 checksum How to use checksums |
0587cec7c7abcc892054538d50d2942a11783224e828f94f6f4e89e6ad728f6d
|
| 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 17, 2026.
Transparency logRelease files / gli4py-0.0.18b1-py3-none-any.whl
| Download URL | gli4py-0.0.18b1-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
404c2af1d8df1b28f82b5fecf5de997f5f4b33b5788f97913cf3ad4fe0449e36
|
|
BLAKE2b-256 checksum How to use checksums |
89a93f70e299d3245a18f3cc7d915119a00263464a6d0e147e763177cf4cdf3c
|
| 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 17, 2026.
Transparency log