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 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gli4py-0.0.8.tar.gz
(18.2 kB
view details)
Built Distribution
gli4py-0.0.8-py3-none-any.whl
(19.3 kB
view details)
File details
Details for the file gli4py-0.0.8.tar.gz
.
File metadata
- Download URL: gli4py-0.0.8.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2164659ff646d7178b7fc278455de6fec4bb8aa33d984dd21d3bfb3eba5da531 |
|
MD5 | 7e151e81f1bcfdcc8058cc6dc6226f2e |
|
BLAKE2b-256 | f7622f1e7eb853ead9df838bd4f2060dfde5f9ffd7c09cac61f66939f420415f |
File details
Details for the file gli4py-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: gli4py-0.0.8-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69deca145f2ded12d37b4d23d52333d5efe484205fcc4c61dca1603f5e4c68ca |
|
MD5 | 6de29f003acd973b3eb9f1b7d97fa979 |
|
BLAKE2b-256 | be7748b7063c668a356f61c643e2a7efdc62c054701b218ed4782b94ec0d0b8f |