A python 3 API wrapper for GL-inet routers for consumption by Home Assistant
Project description
gli_py
A aysnc python 3 API wrapper for GL-inet routers. [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 provide a 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 installed
python3 -V
orpython -V
- Uses poetry for venv control
pip3 install poetry
poetry config virtualenvs.in-project true
create the venvs in the project folderpoetry install
poetry shell
- To run tests, ensure there is a file called
router_pwd
in the root directory with the router password in. - Then run
pytest -s
to see responses, assumes the router is at192.168.0.1
- Set token with
poetry config pypi-token.pypi TOKEN
- publish with
poetry publish
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
gli_py-0.0.18.tar.gz
(16.9 kB
view details)
Built Distribution
gli_py-0.0.18-py3-none-any.whl
(17.8 kB
view details)
File details
Details for the file gli_py-0.0.18.tar.gz
.
File metadata
- Download URL: gli_py-0.0.18.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.8.10 Linux/5.15.90.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc50d22b1c8120f632519d990c7fa46014ca2a3ac04d8f6fb5903e7a56df0960 |
|
MD5 | 2b6112add6df0371992bff0dc83c901c |
|
BLAKE2b-256 | 45f77f0a1c87e3b86483b9a7c4e677ed7e298aa962d96f46fbf7c51e407e789e |
File details
Details for the file gli_py-0.0.18-py3-none-any.whl
.
File metadata
- Download URL: gli_py-0.0.18-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.8.10 Linux/5.15.90.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51e90f626bbbe5a52c7cc68a4dad3cb9d7bd7b947d331c18140ae0e46b6e5a85 |
|
MD5 | cff0160957dadbc4fb21f6b90a693e55 |
|
BLAKE2b-256 | b8458843d7d5a589f1e935b0be69f296e4e109494d044c49f5996e5bfaba45e4 |