pypetkitapi 1.7.0__tar.gz → 1.7.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypetkitapi
3
- Version: 1.7.0
3
+ Version: 1.7.3
4
4
  Summary: Python client for PetKit API
5
5
  Home-page: https://github.com/Jezza34000/pypetkit
6
6
  License: MIT
@@ -12,9 +12,10 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
- Requires-Dist: aiohttp (>=3.11.11,<4.0.0)
15
+ Requires-Dist: aiofiles (>=24.1.0,<25.0.0)
16
+ Requires-Dist: aiohttp (>=3.10.10,<4.0.0)
16
17
  Requires-Dist: pycryptodome (>=3.19.1,<4.0.0)
17
- Requires-Dist: pydantic (==2.10.4)
18
+ Requires-Dist: pydantic (>=1.10.19,<2.0.0)
18
19
  Description-Content-Type: text/markdown
19
20
 
20
21
  # Petkit API Client
@@ -83,11 +84,13 @@ async def main():
83
84
 
84
85
  await client.get_devices_data()
85
86
 
86
- # Read the account data
87
- print(client.account_data)
87
+ # Lists all devices and pet from account
88
88
 
89
- # Read the devices data
90
- print(client.petkit_entities)
89
+ for key, value in client.petkit_entities.items():
90
+ print(f"{key}: {type(value).__name__} - {value.name}")
91
+
92
+ # Read devices or pet information
93
+ print(client.petkit_entities[123456789])
91
94
 
92
95
  # Send command to the devices
93
96
  ### 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
- # Read the account data
68
- print(client.account_data)
67
+ # Lists all devices and pet from account
69
68
 
70
- # Read the devices data
71
- print(client.petkit_entities)
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, model_validator
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
- @model_validator(mode="before")
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.0"
190
+ version = "1.7.3"
191
191
  description = "Python client for PetKit API"
192
192
  authors = ["Jezza34000 <info@mail.com>"]
193
193
  readme = "README.md"
@@ -196,9 +196,10 @@ license = "MIT"
196
196
 
197
197
  [tool.poetry.dependencies]
198
198
  python = ">=3.11"
199
- aiohttp = "^3.11.11"
199
+ aiohttp = "^3.10.10"
200
+ aiofiles = "^24.1.0"
200
201
  pycryptodome = "^3.19.1"
201
- pydantic = "==2.10.4"
202
+ pydantic = "^1.10.19"
202
203
 
203
204
  [tool.poetry.dev-dependencies]
204
205
  pre-commit = "^4.0.1"
@@ -207,7 +208,7 @@ ruff = "^0.8.1"
207
208
  types-aiofiles = "^24.1.0.20240626"
208
209
 
209
210
  [tool.bumpver]
210
- current_version = "1.7.0"
211
+ current_version = "1.7.3"
211
212
  version_pattern = "MAJOR.MINOR.PATCH"
212
213
  commit_message = "bump version {old_version} -> {new_version}"
213
214
  tag_message = "{new_version}"
File without changes