valentina-python-client 1.5.2__tar.gz → 1.6.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.
Files changed (47) hide show
  1. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/PKG-INFO +1 -1
  2. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/pyproject.toml +1 -1
  3. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/__init__.py +1 -1
  4. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/endpoints.py +1 -0
  5. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/books.py +1 -1
  6. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/chapters.py +1 -1
  7. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/characters.py +1 -1
  8. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/companies.py +29 -0
  9. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/LICENSE +0 -0
  10. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/README.md +0 -0
  11. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/client.py +0 -0
  12. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/config.py +0 -0
  13. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/constants.py +0 -0
  14. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/exceptions.py +0 -0
  15. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/__init__.py +0 -0
  16. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/campaigns.py +0 -0
  17. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/character_autogen.py +0 -0
  18. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/character_blueprint.py +0 -0
  19. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/character_trait.py +0 -0
  20. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/companies.py +0 -0
  21. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/developers.py +0 -0
  22. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/diceroll.py +0 -0
  23. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/dictionary.py +0 -0
  24. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/global_admin.py +0 -0
  25. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/pagination.py +0 -0
  26. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/shared.py +0 -0
  27. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/system.py +0 -0
  28. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/models/users.py +0 -0
  29. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/py.typed +0 -0
  30. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/registry.py +0 -0
  31. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/__init__.py +0 -0
  32. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/base.py +0 -0
  33. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/campaign_book_chapters.py +0 -0
  34. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/campaign_books.py +0 -0
  35. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/campaigns.py +0 -0
  36. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/character_autogen.py +0 -0
  37. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/character_blueprint.py +0 -0
  38. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/character_traits.py +0 -0
  39. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/characters.py +0 -0
  40. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/developers.py +0 -0
  41. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/dicerolls.py +0 -0
  42. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/dictionary.py +0 -0
  43. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/global_admin.py +0 -0
  44. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/options.py +0 -0
  45. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/system.py +0 -0
  46. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/services/users.py +0 -0
  47. {valentina_python_client-1.5.2 → valentina_python_client-1.6.1}/src/vclient/validate_constants.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: valentina-python-client
3
- Version: 1.5.2
3
+ Version: 1.6.1
4
4
  Summary: Async Python client library for the Valentina Noir API
5
5
  Author: Nate Landau
6
6
  Author-email: Nate Landau <github@natenate.org>
@@ -10,7 +10,7 @@
10
10
  name = "valentina-python-client"
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.13"
13
- version = "1.5.2"
13
+ version = "1.6.1"
14
14
 
15
15
  [project.urls]
16
16
  Homepage = "https://docs.valentina-noir.com/python-api-client/"
@@ -71,4 +71,4 @@ __all__ = (
71
71
  "users_service",
72
72
  )
73
73
 
74
- __version__ = "1.5.2"
74
+ __version__ = "1.6.1"
@@ -32,6 +32,7 @@ class Endpoints:
32
32
  COMPANIES = f"{_BASE}/companies"
33
33
  COMPANY = f"{COMPANIES}/{{company_id}}"
34
34
  COMPANY_ACCESS = f"{COMPANY}/access"
35
+ COMPANY_STATISTICS = f"{COMPANY}/statistics"
35
36
 
36
37
  # User endpoints
37
38
  USERS = f"{COMPANY}/users"
@@ -11,7 +11,7 @@ class CampaignBook(BaseModel):
11
11
  Represents a book within a campaign, containing notes and assets.
12
12
  """
13
13
 
14
- id: str | None = Field(default=None, description="MongoDB document ObjectID.")
14
+ id: str = Field(..., description="MongoDB document ObjectID.")
15
15
  date_created: datetime = Field(..., description="Timestamp when the book was created.")
16
16
  date_modified: datetime = Field(..., description="Timestamp when the book was last modified.")
17
17
  name: str = Field(..., description="Book name (3-50 characters).")
@@ -11,7 +11,7 @@ class CampaignChapter(BaseModel):
11
11
  Represents a chapter within a campaign book, containing notes and assets.
12
12
  """
13
13
 
14
- id: str | None = Field(default=None, description="MongoDB document ObjectID.")
14
+ id: str = Field(..., description="MongoDB document ObjectID.")
15
15
  date_created: datetime = Field(..., description="Timestamp when the chapter was created.")
16
16
  date_modified: datetime = Field(
17
17
  ..., description="Timestamp when the chapter was last modified."
@@ -135,7 +135,7 @@ class Character(BaseModel):
135
135
  Characters are player or non-player entities within a campaign.
136
136
  """
137
137
 
138
- id: str | None = Field(default=None, description="MongoDB document ObjectID.")
138
+ id: str = Field(..., description="MongoDB document ObjectID.")
139
139
  date_created: datetime | None = Field(
140
140
  default=None, description="Timestamp when the character was created."
141
141
  )
@@ -11,6 +11,7 @@ from vclient.models import (
11
11
  CompanyUpdate,
12
12
  NewCompanyResponse,
13
13
  PaginatedResponse,
14
+ RollStatistics,
14
15
  _GrantAccess,
15
16
  )
16
17
  from vclient.services.base import BaseService
@@ -213,3 +214,31 @@ class CompaniesService(BaseService):
213
214
  json=body.model_dump(mode="json"),
214
215
  )
215
216
  return CompanyPermissions.model_validate(response.json())
217
+
218
+ async def get_statistics(
219
+ self,
220
+ company_id: str,
221
+ *,
222
+ num_top_traits: int = 5,
223
+ ) -> RollStatistics:
224
+ """Retrieve aggregated dice roll statistics for a specific company.
225
+
226
+ Includes success rates, critical frequencies, most-used traits, etc.
227
+ across all users and campaigns in the company.
228
+
229
+ Args:
230
+ company_id: The ID of the company to get statistics for.
231
+ num_top_traits: Number of top traits to include (default 5).
232
+
233
+ Returns:
234
+ RollStatistics object with aggregated statistics.
235
+
236
+ Raises:
237
+ NotFoundError: If the company does not exist.
238
+ AuthorizationError: If you don't have access to the company.
239
+ """
240
+ response = await self._get(
241
+ Endpoints.COMPANY_STATISTICS.format(company_id=company_id),
242
+ params={"num_top_traits": num_top_traits},
243
+ )
244
+ return RollStatistics.model_validate(response.json())