Add ttp dependency and refactor OxiAPI and NodeConfig classes

- Added `ttp` as a dependency in `pyproject.toml` and `uv.lock`.
- Updated `NodeConfig` to store model names in lowercase.
- Refactored `OxiAPI` to always create a new session and added a `close` method.
- Removed unnecessary logging in `Node` class.
- Introduced interfaces for device registration with a new `BaseDevice` class and a `register_parser` function.
- Created initial structure for device models, including a `Mikrotik` parser.
This commit is contained in:
IluaAir
2026-02-14 21:31:02 +03:00
parent 8e85086d98
commit b60182ef3c
9 changed files with 57 additions and 19 deletions

15
uv.lock generated
View File

@@ -67,10 +67,14 @@ version = "0.1.0"
source = { editable = "." }
dependencies = [
{ name = "requests" },
{ name = "ttp" },
]
[package.metadata]
requires-dist = [{ name = "requests", specifier = ">=2.32.5" }]
requires-dist = [
{ name = "requests", specifier = ">=2.32.5" },
{ name = "ttp", specifier = ">=0.10.0" },
]
[[package]]
name = "requests"
@@ -87,6 +91,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738, upload-time = "2025-08-18T20:46:00.542Z" },
]
[[package]]
name = "ttp"
version = "0.10.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/83/e6/9169d35574be82df2a0cdd2546f4f83d0d30964cf0043fc9784df855b024/ttp-0.10.0.tar.gz", hash = "sha256:40f1ca61ee1431f5b1ab5326fb55f852a04749e9574792d45455b62c5e7ac97b", size = 64665, upload-time = "2025-11-02T08:47:50.329Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/b3/c3/60abb45bd8eb973997f133eb76949523478d35dfc551a0dbd8906b6a8075/ttp-0.10.0-py3-none-any.whl", hash = "sha256:9985e0ca414e85d41493a6291a924624b9a08c48c78d2d01477cc60ba2a347c1", size = 84287, upload-time = "2025-11-02T08:47:48.656Z" },
]
[[package]]
name = "urllib3"
version = "2.6.3"