valentina-python-client 1.0.2__tar.gz → 1.1.0__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 (46) hide show
  1. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/PKG-INFO +1 -1
  2. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/pyproject.toml +1 -1
  3. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/character_blueprint.py +96 -56
  4. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/dicerolls.py +1 -1
  5. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/LICENSE +0 -0
  6. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/README.md +0 -0
  7. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/__init__.py +0 -0
  8. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/client.py +0 -0
  9. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/config.py +0 -0
  10. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/constants.py +0 -0
  11. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/endpoints.py +0 -0
  12. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/exceptions.py +0 -0
  13. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/__init__.py +0 -0
  14. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/books.py +0 -0
  15. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/campaigns.py +0 -0
  16. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/chapters.py +0 -0
  17. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/character_autogen.py +0 -0
  18. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/character_blueprint.py +0 -0
  19. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/character_trait.py +0 -0
  20. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/characters.py +0 -0
  21. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/companies.py +0 -0
  22. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/developers.py +0 -0
  23. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/diceroll.py +0 -0
  24. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/dictionary.py +0 -0
  25. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/global_admin.py +0 -0
  26. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/pagination.py +0 -0
  27. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/shared.py +0 -0
  28. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/system.py +0 -0
  29. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/models/users.py +0 -0
  30. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/py.typed +0 -0
  31. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/registry.py +0 -0
  32. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/__init__.py +0 -0
  33. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/base.py +0 -0
  34. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/campaign_book_chapters.py +0 -0
  35. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/campaign_books.py +0 -0
  36. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/campaigns.py +0 -0
  37. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/character_autogen.py +0 -0
  38. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/character_traits.py +0 -0
  39. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/characters.py +0 -0
  40. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/companies.py +0 -0
  41. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/developers.py +0 -0
  42. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/dictionary.py +0 -0
  43. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/global_admin.py +0 -0
  44. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/options.py +0 -0
  45. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/system.py +0 -0
  46. {valentina_python_client-1.0.2 → valentina_python_client-1.1.0}/src/vclient/services/users.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: valentina-python-client
3
- Version: 1.0.2
3
+ Version: 1.1.0
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.0.2"
13
+ version = "1.1.0"
14
14
 
15
15
  [project.urls]
16
16
  Homepage = "https://docs.valentina-noir.com/python-api-client/"
@@ -3,7 +3,13 @@
3
3
  from collections.abc import AsyncIterator
4
4
  from typing import TYPE_CHECKING
5
5
 
6
- from vclient.constants import DEFAULT_PAGE_LIMIT, BlueprintTraitOrderBy, CharacterClass, GameVersion
6
+ from vclient.constants import (
7
+ DEFAULT_PAGE_LIMIT,
8
+ BlueprintTraitOrderBy,
9
+ CharacterClass,
10
+ GameVersion,
11
+ HunterEdgeType,
12
+ )
7
13
  from vclient.endpoints import Endpoints
8
14
  from vclient.models import (
9
15
  CharacterConcept,
@@ -63,7 +69,7 @@ class CharacterBlueprintService(BaseService):
63
69
  SheetSection,
64
70
  limit=limit,
65
71
  offset=offset,
66
- params={"character_class": character_class} if character_class else None,
72
+ params=self._build_params(character_class=character_class),
67
73
  )
68
74
 
69
75
  async def list_all_sections(
@@ -83,7 +89,7 @@ class CharacterBlueprintService(BaseService):
83
89
  """Iterate through all character blueprint sections."""
84
90
  async for section in self._iter_all_pages(
85
91
  self._format_endpoint(Endpoints.BLUEPRINT_SECTIONS, game_version=game_version),
86
- params={"character_class": character_class} if character_class else None,
92
+ params=self._build_params(character_class=character_class),
87
93
  ):
88
94
  yield SheetSection.model_validate(section)
89
95
 
@@ -118,7 +124,7 @@ class CharacterBlueprintService(BaseService):
118
124
  TraitCategory,
119
125
  limit=limit,
120
126
  offset=offset,
121
- params={"character_class": character_class} if character_class else None,
127
+ params=self._build_params(character_class=character_class),
122
128
  )
123
129
 
124
130
  async def list_all_categories(
@@ -150,7 +156,7 @@ class CharacterBlueprintService(BaseService):
150
156
  self._format_endpoint(
151
157
  Endpoints.BLUEPRINT_CATEGORIES, game_version=game_version, section_id=section_id
152
158
  ),
153
- params={"character_class": character_class} if character_class else None,
159
+ params=self._build_params(character_class=character_class),
154
160
  ):
155
161
  yield TraitCategory.model_validate(category)
156
162
 
@@ -184,12 +190,6 @@ class CharacterBlueprintService(BaseService):
184
190
  character_id: str | None = None,
185
191
  ) -> PaginatedResponse[Trait]:
186
192
  """Get a paginated page of character blueprint category traits."""
187
- params: dict[str, str | int] = {}
188
- if character_class is not None:
189
- params["character_class"] = character_class
190
- if character_id is not None:
191
- params["character_id"] = character_id
192
-
193
193
  return await self._get_paginated_as(
194
194
  self._format_endpoint(
195
195
  Endpoints.BLUEPRINT_CATEGORY_TRAITS,
@@ -200,7 +200,7 @@ class CharacterBlueprintService(BaseService):
200
200
  Trait,
201
201
  limit=limit,
202
202
  offset=offset,
203
- params=params or None,
203
+ params=self._build_params(character_class=character_class, character_id=character_id),
204
204
  )
205
205
 
206
206
  async def list_all_category_traits(
@@ -234,12 +234,6 @@ class CharacterBlueprintService(BaseService):
234
234
  character_id: str | None = None,
235
235
  ) -> AsyncIterator[Trait]:
236
236
  """Iterate through all character blueprint category traits."""
237
- params: dict[str, str | int] = {}
238
- if character_class is not None:
239
- params["character_class"] = character_class
240
- if character_id is not None:
241
- params["character_id"] = character_id
242
-
243
237
  async for trait in self._iter_all_pages(
244
238
  self._format_endpoint(
245
239
  Endpoints.BLUEPRINT_CATEGORY_TRAITS,
@@ -247,7 +241,7 @@ class CharacterBlueprintService(BaseService):
247
241
  section_id=section_id,
248
242
  category_id=category_id,
249
243
  ),
250
- params=params or None,
244
+ params=self._build_params(character_class=character_class, character_id=character_id),
251
245
  ):
252
246
  yield Trait.model_validate(trait)
253
247
 
@@ -265,22 +259,17 @@ class CharacterBlueprintService(BaseService):
265
259
  order_by: BlueprintTraitOrderBy | None = None,
266
260
  ) -> PaginatedResponse[Trait]:
267
261
  """Get a paginated page of all character blueprint traits."""
268
- params: dict[str, str | int] = {}
269
- if character_class is not None:
270
- params["character_class"] = character_class
271
- if parent_category_id is not None:
272
- params["parent_category_id"] = parent_category_id
273
- if order_by is not None:
274
- params["order_by"] = order_by
275
- if game_version is not None:
276
- params["game_version"] = game_version
277
-
278
262
  return await self._get_paginated_as(
279
263
  self._format_endpoint(Endpoints.BLUEPRINT_TRAITS),
280
264
  Trait,
281
265
  limit=limit,
282
266
  offset=offset,
283
- params=params or None,
267
+ params=self._build_params(
268
+ character_class=character_class,
269
+ parent_category_id=parent_category_id,
270
+ order_by=order_by,
271
+ game_version=game_version,
272
+ ),
284
273
  )
285
274
 
286
275
  async def list_all_traits(
@@ -311,19 +300,14 @@ class CharacterBlueprintService(BaseService):
311
300
  order_by: BlueprintTraitOrderBy | None = None,
312
301
  ) -> AsyncIterator[Trait]:
313
302
  """Iterate through all character blueprint traits."""
314
- params: dict[str, str | int] = {}
315
- if character_class is not None:
316
- params["character_class"] = character_class
317
- if parent_category_id is not None:
318
- params["parent_category_id"] = parent_category_id
319
- if order_by is not None:
320
- params["order_by"] = order_by
321
- if game_version is not None:
322
- params["game_version"] = game_version
323
-
324
303
  async for trait in self._iter_all_pages(
325
304
  self._format_endpoint(Endpoints.BLUEPRINT_TRAITS),
326
- params=params or None,
305
+ params=self._build_params(
306
+ character_class=character_class,
307
+ parent_category_id=parent_category_id,
308
+ order_by=order_by,
309
+ game_version=game_version,
310
+ ),
327
311
  ):
328
312
  yield Trait.model_validate(trait)
329
313
 
@@ -377,6 +361,7 @@ class CharacterBlueprintService(BaseService):
377
361
  *,
378
362
  limit: int = DEFAULT_PAGE_LIMIT,
379
363
  offset: int = 0,
364
+ game_version: GameVersion | None = None,
380
365
  ) -> PaginatedResponse[VampireClan]:
381
366
  """Get a paginated page of vampire clans."""
382
367
  return await self._get_paginated_as(
@@ -384,16 +369,22 @@ class CharacterBlueprintService(BaseService):
384
369
  VampireClan,
385
370
  limit=limit,
386
371
  offset=offset,
372
+ params=self._build_params(game_version=game_version),
387
373
  )
388
374
 
389
- async def list_all_vampire_clans(self) -> list[VampireClan]:
375
+ async def list_all_vampire_clans(
376
+ self, *, game_version: GameVersion | None = None
377
+ ) -> list[VampireClan]:
390
378
  """List all vampire clans."""
391
- return [clan async for clan in self.iter_all_vampire_clans()]
379
+ return [clan async for clan in self.iter_all_vampire_clans(game_version=game_version)]
392
380
 
393
- async def iter_all_vampire_clans(self) -> AsyncIterator[VampireClan]:
381
+ async def iter_all_vampire_clans(
382
+ self, *, game_version: GameVersion | None = None
383
+ ) -> AsyncIterator[VampireClan]:
394
384
  """Iterate through all vampire clans."""
395
385
  async for clan in self._iter_all_pages(
396
386
  self._format_endpoint(Endpoints.VAMPIRE_CLANS),
387
+ params=self._build_params(game_version=game_version),
397
388
  ):
398
389
  yield VampireClan.model_validate(clan)
399
390
 
@@ -412,6 +403,7 @@ class CharacterBlueprintService(BaseService):
412
403
  *,
413
404
  limit: int = DEFAULT_PAGE_LIMIT,
414
405
  offset: int = 0,
406
+ game_version: GameVersion | None = None,
415
407
  ) -> PaginatedResponse[WerewolfAuspice]:
416
408
  """Get a paginated page of werewolf auspices."""
417
409
  return await self._get_paginated_as(
@@ -419,16 +411,24 @@ class CharacterBlueprintService(BaseService):
419
411
  WerewolfAuspice,
420
412
  limit=limit,
421
413
  offset=offset,
414
+ params=self._build_params(game_version=game_version),
422
415
  )
423
416
 
424
- async def list_all_werewolf_auspices(self) -> list[WerewolfAuspice]:
417
+ async def list_all_werewolf_auspices(
418
+ self, *, game_version: GameVersion | None = None
419
+ ) -> list[WerewolfAuspice]:
425
420
  """List all werewolf auspices."""
426
- return [auspice async for auspice in self.iter_all_werewolf_auspices()]
421
+ return [
422
+ auspice async for auspice in self.iter_all_werewolf_auspices(game_version=game_version)
423
+ ]
427
424
 
428
- async def iter_all_werewolf_auspices(self) -> AsyncIterator[WerewolfAuspice]:
425
+ async def iter_all_werewolf_auspices(
426
+ self, *, game_version: GameVersion | None = None
427
+ ) -> AsyncIterator[WerewolfAuspice]:
429
428
  """Iterate through all werewolf auspices."""
430
429
  async for auspice in self._iter_all_pages(
431
430
  self._format_endpoint(Endpoints.WEREWOLF_AUSPICES),
431
+ params=self._build_params(game_version=game_version),
432
432
  ):
433
433
  yield WerewolfAuspice.model_validate(auspice)
434
434
 
@@ -449,6 +449,7 @@ class CharacterBlueprintService(BaseService):
449
449
  *,
450
450
  limit: int = DEFAULT_PAGE_LIMIT,
451
451
  offset: int = 0,
452
+ game_version: GameVersion | None = None,
452
453
  ) -> PaginatedResponse[WerewolfTribe]:
453
454
  """Get a paginated page of werewolf tribes."""
454
455
  return await self._get_paginated_as(
@@ -456,16 +457,22 @@ class CharacterBlueprintService(BaseService):
456
457
  WerewolfTribe,
457
458
  limit=limit,
458
459
  offset=offset,
460
+ params=self._build_params(game_version=game_version),
459
461
  )
460
462
 
461
- async def list_all_werewolf_tribes(self) -> list[WerewolfTribe]:
463
+ async def list_all_werewolf_tribes(
464
+ self, *, game_version: GameVersion | None = None
465
+ ) -> list[WerewolfTribe]:
462
466
  """List all werewolf tribes."""
463
- return [tribe async for tribe in self.iter_all_werewolf_tribes()]
467
+ return [tribe async for tribe in self.iter_all_werewolf_tribes(game_version=game_version)]
464
468
 
465
- async def iter_all_werewolf_tribes(self) -> AsyncIterator[WerewolfTribe]:
469
+ async def iter_all_werewolf_tribes(
470
+ self, *, game_version: GameVersion | None = None
471
+ ) -> AsyncIterator[WerewolfTribe]:
466
472
  """Iterate through all werewolf tribes."""
467
473
  async for tribe in self._iter_all_pages(
468
474
  self._format_endpoint(Endpoints.WEREWOLF_TRIBES),
475
+ params=self._build_params(game_version=game_version),
469
476
  ):
470
477
  yield WerewolfTribe.model_validate(tribe)
471
478
 
@@ -486,6 +493,9 @@ class CharacterBlueprintService(BaseService):
486
493
  *,
487
494
  limit: int = DEFAULT_PAGE_LIMIT,
488
495
  offset: int = 0,
496
+ game_version: GameVersion | None = None,
497
+ auspice_id: str | None = None,
498
+ tribe_id: str | None = None,
489
499
  ) -> PaginatedResponse[WerewolfGift]:
490
500
  """Get a paginated page of werewolf gifts."""
491
501
  return await self._get_paginated_as(
@@ -493,16 +503,39 @@ class CharacterBlueprintService(BaseService):
493
503
  WerewolfGift,
494
504
  limit=limit,
495
505
  offset=offset,
506
+ params=self._build_params(
507
+ game_version=game_version, auspice_id=auspice_id, tribe_id=tribe_id
508
+ ),
496
509
  )
497
510
 
498
- async def list_all_werewolf_gifts(self) -> list[WerewolfGift]:
511
+ async def list_all_werewolf_gifts(
512
+ self,
513
+ *,
514
+ game_version: GameVersion | None = None,
515
+ auspice_id: str | None = None,
516
+ tribe_id: str | None = None,
517
+ ) -> list[WerewolfGift]:
499
518
  """List all werewolf gifts."""
500
- return [gift async for gift in self.iter_all_werewolf_gifts()]
519
+ return [
520
+ gift
521
+ async for gift in self.iter_all_werewolf_gifts(
522
+ game_version=game_version, auspice_id=auspice_id, tribe_id=tribe_id
523
+ )
524
+ ]
501
525
 
502
- async def iter_all_werewolf_gifts(self) -> AsyncIterator[WerewolfGift]:
526
+ async def iter_all_werewolf_gifts(
527
+ self,
528
+ *,
529
+ game_version: GameVersion | None = None,
530
+ auspice_id: str | None = None,
531
+ tribe_id: str | None = None,
532
+ ) -> AsyncIterator[WerewolfGift]:
503
533
  """Iterate through all werewolf gifts."""
504
534
  async for gift in self._iter_all_pages(
505
535
  self._format_endpoint(Endpoints.WEREWOLF_GIFTS),
536
+ params=self._build_params(
537
+ game_version=game_version, auspice_id=auspice_id, tribe_id=tribe_id
538
+ ),
506
539
  ):
507
540
  yield WerewolfGift.model_validate(gift)
508
541
 
@@ -560,6 +593,7 @@ class CharacterBlueprintService(BaseService):
560
593
  *,
561
594
  limit: int = DEFAULT_PAGE_LIMIT,
562
595
  offset: int = 0,
596
+ edge_type: HunterEdgeType | None = None,
563
597
  ) -> PaginatedResponse[HunterEdge]:
564
598
  """Get a paginated page of hunter edges."""
565
599
  return await self._get_paginated_as(
@@ -567,16 +601,22 @@ class CharacterBlueprintService(BaseService):
567
601
  HunterEdge,
568
602
  limit=limit,
569
603
  offset=offset,
604
+ params=self._build_params(edge_type=edge_type),
570
605
  )
571
606
 
572
- async def list_all_hunter_edges(self) -> list[HunterEdge]:
607
+ async def list_all_hunter_edges(
608
+ self, *, edge_type: HunterEdgeType | None = None
609
+ ) -> list[HunterEdge]:
573
610
  """List all hunter edges."""
574
- return [edge async for edge in self.iter_all_hunter_edges()]
611
+ return [edge async for edge in self.iter_all_hunter_edges(edge_type=edge_type)]
575
612
 
576
- async def iter_all_hunter_edges(self) -> AsyncIterator[HunterEdge]:
613
+ async def iter_all_hunter_edges(
614
+ self, *, edge_type: HunterEdgeType | None = None
615
+ ) -> AsyncIterator[HunterEdge]:
577
616
  """Iterate through all hunter edges."""
578
617
  async for edge in self._iter_all_pages(
579
618
  self._format_endpoint(Endpoints.HUNTER_EDGES),
619
+ params=self._build_params(edge_type=edge_type),
580
620
  ):
581
621
  yield HunterEdge.model_validate(edge)
582
622
 
@@ -126,7 +126,7 @@ class DicerollService(BaseService):
126
126
  )
127
127
  return Diceroll.model_validate(response.json())
128
128
 
129
- async def create_quickroll(
129
+ async def create_from_quickroll(
130
130
  self,
131
131
  *,
132
132
  quickroll_id: str,