pypetkitapi 1.7.0__tar.gz → 1.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/PKG-INFO +8 -6
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/README.md +6 -4
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pypetkitapi/containers.py +2 -2
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pyproject.toml +3 -3
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/LICENSE +0 -0
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pypetkitapi/__init__.py +0 -0
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pypetkitapi/client.py +0 -0
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pypetkitapi/command.py +0 -0
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pypetkitapi/const.py +0 -0
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pypetkitapi/exceptions.py +0 -0
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pypetkitapi/feeder_container.py +0 -0
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pypetkitapi/litter_container.py +0 -0
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pypetkitapi/medias.py +0 -0
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pypetkitapi/py.typed +0 -0
- {pypetkitapi-1.7.0 → pypetkitapi-1.7.1}/pypetkitapi/water_fountain_container.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pypetkitapi
|
3
|
-
Version: 1.7.
|
3
|
+
Version: 1.7.1
|
4
4
|
Summary: Python client for PetKit API
|
5
5
|
Home-page: https://github.com/Jezza34000/pypetkit
|
6
6
|
License: MIT
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
15
15
|
Requires-Dist: aiohttp (>=3.11.11,<4.0.0)
|
16
16
|
Requires-Dist: pycryptodome (>=3.19.1,<4.0.0)
|
17
|
-
Requires-Dist: pydantic (
|
17
|
+
Requires-Dist: pydantic (>=1.10.19,<2.0.0)
|
18
18
|
Description-Content-Type: text/markdown
|
19
19
|
|
20
20
|
# Petkit API Client
|
@@ -83,11 +83,13 @@ async def main():
|
|
83
83
|
|
84
84
|
await client.get_devices_data()
|
85
85
|
|
86
|
-
#
|
87
|
-
print(client.account_data)
|
86
|
+
# Lists all devices and pet from account
|
88
87
|
|
89
|
-
|
90
|
-
|
88
|
+
for key, value in client.petkit_entities.items():
|
89
|
+
print(f"{key}: {type(value).__name__} - {value.name}")
|
90
|
+
|
91
|
+
# Read devices or pet information
|
92
|
+
print(client.petkit_entities[123456789])
|
91
93
|
|
92
94
|
# Send command to the devices
|
93
95
|
### Example 1 : Turn on the indicator light
|
@@ -64,11 +64,13 @@ async def main():
|
|
64
64
|
|
65
65
|
await client.get_devices_data()
|
66
66
|
|
67
|
-
#
|
68
|
-
print(client.account_data)
|
67
|
+
# Lists all devices and pet from account
|
69
68
|
|
70
|
-
|
71
|
-
|
69
|
+
for key, value in client.petkit_entities.items():
|
70
|
+
print(f"{key}: {type(value).__name__} - {value.name}")
|
71
|
+
|
72
|
+
# Read devices or pet information
|
73
|
+
print(client.petkit_entities[123456789])
|
72
74
|
|
73
75
|
# Send command to the devices
|
74
76
|
### Example 1 : Turn on the indicator light
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"""Dataclasses container for petkit API."""
|
2
2
|
|
3
|
-
from pydantic import BaseModel, Field,
|
3
|
+
from pydantic import BaseModel, Field, root_validator
|
4
4
|
|
5
5
|
|
6
6
|
class RegionInfo(BaseModel):
|
@@ -81,7 +81,7 @@ class Pet(BaseModel):
|
|
81
81
|
last_duration_usage: int = 0
|
82
82
|
last_measured_weight: int = 0
|
83
83
|
|
84
|
-
@
|
84
|
+
@root_validator(pre=True)
|
85
85
|
def populate_fictive_fields(cls, values): # noqa: N805
|
86
86
|
"""Populate fictive fields based on other fields."""
|
87
87
|
values["id"] = values.get("id") or values.get("petId")
|
@@ -187,7 +187,7 @@ build-backend = "poetry.core.masonry.api"
|
|
187
187
|
|
188
188
|
[tool.poetry]
|
189
189
|
name = "pypetkitapi"
|
190
|
-
version = "1.7.
|
190
|
+
version = "1.7.1"
|
191
191
|
description = "Python client for PetKit API"
|
192
192
|
authors = ["Jezza34000 <info@mail.com>"]
|
193
193
|
readme = "README.md"
|
@@ -198,7 +198,7 @@ license = "MIT"
|
|
198
198
|
python = ">=3.11"
|
199
199
|
aiohttp = "^3.11.11"
|
200
200
|
pycryptodome = "^3.19.1"
|
201
|
-
pydantic = "
|
201
|
+
pydantic = "^1.10.19"
|
202
202
|
|
203
203
|
[tool.poetry.dev-dependencies]
|
204
204
|
pre-commit = "^4.0.1"
|
@@ -207,7 +207,7 @@ ruff = "^0.8.1"
|
|
207
207
|
types-aiofiles = "^24.1.0.20240626"
|
208
208
|
|
209
209
|
[tool.bumpver]
|
210
|
-
current_version = "1.7.
|
210
|
+
current_version = "1.7.1"
|
211
211
|
version_pattern = "MAJOR.MINOR.PATCH"
|
212
212
|
commit_message = "bump version {old_version} -> {new_version}"
|
213
213
|
tag_message = "{new_version}"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|