A python 3 API wrapper for GL-inet routers for consumption by Home Assistant
Project description
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
pytest -sto 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gli4py-0.0.16.tar.gz.
File metadata
- Download URL: gli4py-0.0.16.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a23f539a0fddb27eaf1bf8c2b04ef28ac89e3d15952947ffd764e804e11525ff
|
|
| MD5 |
7226229383c1cba8e06e150e9d0119ca
|
|
| BLAKE2b-256 |
36f9de26129050c55d27ab5b1aaaf32e7210cee52a545ac1a198fc38f371102b
|
Provenance
The following attestation bundles were made for gli4py-0.0.16.tar.gz:
Publisher:
python-publish.yml on HarvsG/gli4py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gli4py-0.0.16.tar.gz -
Subject digest:
a23f539a0fddb27eaf1bf8c2b04ef28ac89e3d15952947ffd764e804e11525ff - Sigstore transparency entry: 1065715862
- Sigstore integration time:
-
Permalink:
HarvsG/gli4py@e95af7afcad82f876aca4e716b73a3497a337a0f -
Branch / Tag:
refs/tags/v0.0.16 - Owner: https://github.com/HarvsG
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e95af7afcad82f876aca4e716b73a3497a337a0f -
Trigger Event:
release
-
Statement type:
File details
Details for the file gli4py-0.0.16-py3-none-any.whl.
File metadata
- Download URL: gli4py-0.0.16-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b67f83c94d7998e904876a4a9aa31e86ae18a48c7f8c5894a36434d200e27be4
|
|
| MD5 |
31074181384c1ce2540edbdbc2a12324
|
|
| BLAKE2b-256 |
74eb61baff882d7b29c7044675f51112583c0920620889cf0ad0fb9acd98007e
|
Provenance
The following attestation bundles were made for gli4py-0.0.16-py3-none-any.whl:
Publisher:
python-publish.yml on HarvsG/gli4py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gli4py-0.0.16-py3-none-any.whl -
Subject digest:
b67f83c94d7998e904876a4a9aa31e86ae18a48c7f8c5894a36434d200e27be4 - Sigstore transparency entry: 1065715867
- Sigstore integration time:
-
Permalink:
HarvsG/gli4py@e95af7afcad82f876aca4e716b73a3497a337a0f -
Branch / Tag:
refs/tags/v0.0.16 - Owner: https://github.com/HarvsG
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e95af7afcad82f876aca4e716b73a3497a337a0f -
Trigger Event:
release
-
Statement type: