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.6.tar.gz
(18.1 kB
view details)
Built Distribution
gli4py-0.0.6-py3-none-any.whl
(19.2 kB
view details)
File details
Details for the file gli4py-0.0.6.tar.gz
.
File metadata
- Download URL: gli4py-0.0.6.tar.gz
- Upload date:
- Size: 18.1 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 | 2f89175c264db95ec63e7152822955d6ca850e79c08cd3fbdfa990a889247f0e |
|
MD5 | 893c545c7dbb4237f57bb7a018f80fd5 |
|
BLAKE2b-256 | b0220fda15f23a6d711f3a7b0816c1043078b72015cd8890b3eaaab533e8cff2 |
File details
Details for the file gli4py-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: gli4py-0.0.6-py3-none-any.whl
- Upload date:
- Size: 19.2 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 | a3d652a8be116a6ba0109af5b931ac163755c46f6bf0b99026c91752d0fa9685 |
|
MD5 | 251cff1e4b506e0fff6f741e9920ec32 |
|
BLAKE2b-256 | 2c102b61dddf599122ca14cedef7a3a91f187cfda33146959327c187104156c5 |