valentina-python-client 1.0.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 (46) hide show
  1. valentina_python_client-1.0.1/LICENSE +9 -0
  2. valentina_python_client-1.0.1/PKG-INFO +50 -0
  3. valentina_python_client-1.0.1/README.md +25 -0
  4. valentina_python_client-1.0.1/pyproject.toml +203 -0
  5. valentina_python_client-1.0.1/src/vclient/__init__.py +52 -0
  6. valentina_python_client-1.0.1/src/vclient/client.py +504 -0
  7. valentina_python_client-1.0.1/src/vclient/config.py +42 -0
  8. valentina_python_client-1.0.1/src/vclient/constants.py +60 -0
  9. valentina_python_client-1.0.1/src/vclient/endpoints.py +152 -0
  10. valentina_python_client-1.0.1/src/vclient/exceptions.py +248 -0
  11. valentina_python_client-1.0.1/src/vclient/models/__init__.py +205 -0
  12. valentina_python_client-1.0.1/src/vclient/models/books.py +64 -0
  13. valentina_python_client-1.0.1/src/vclient/models/campaigns.py +63 -0
  14. valentina_python_client-1.0.1/src/vclient/models/chapters.py +51 -0
  15. valentina_python_client-1.0.1/src/vclient/models/character_autogen.py +38 -0
  16. valentina_python_client-1.0.1/src/vclient/models/character_blueprint.py +132 -0
  17. valentina_python_client-1.0.1/src/vclient/models/character_trait.py +81 -0
  18. valentina_python_client-1.0.1/src/vclient/models/characters.py +368 -0
  19. valentina_python_client-1.0.1/src/vclient/models/companies.py +111 -0
  20. valentina_python_client-1.0.1/src/vclient/models/developers.py +65 -0
  21. valentina_python_client-1.0.1/src/vclient/models/diceroll.py +73 -0
  22. valentina_python_client-1.0.1/src/vclient/models/dictionary.py +42 -0
  23. valentina_python_client-1.0.1/src/vclient/models/global_admin.py +79 -0
  24. valentina_python_client-1.0.1/src/vclient/models/pagination.py +62 -0
  25. valentina_python_client-1.0.1/src/vclient/models/shared.py +207 -0
  26. valentina_python_client-1.0.1/src/vclient/models/system.py +15 -0
  27. valentina_python_client-1.0.1/src/vclient/models/users.py +168 -0
  28. valentina_python_client-1.0.1/src/vclient/py.typed +0 -0
  29. valentina_python_client-1.0.1/src/vclient/registry.py +417 -0
  30. valentina_python_client-1.0.1/src/vclient/services/__init__.py +37 -0
  31. valentina_python_client-1.0.1/src/vclient/services/base.py +644 -0
  32. valentina_python_client-1.0.1/src/vclient/services/campaign_book_chapters.py +453 -0
  33. valentina_python_client-1.0.1/src/vclient/services/campaign_books.py +545 -0
  34. valentina_python_client-1.0.1/src/vclient/services/campaigns.py +553 -0
  35. valentina_python_client-1.0.1/src/vclient/services/character_autogen.py +116 -0
  36. valentina_python_client-1.0.1/src/vclient/services/character_blueprint.py +634 -0
  37. valentina_python_client-1.0.1/src/vclient/services/character_traits.py +261 -0
  38. valentina_python_client-1.0.1/src/vclient/services/characters.py +1386 -0
  39. valentina_python_client-1.0.1/src/vclient/services/companies.py +217 -0
  40. valentina_python_client-1.0.1/src/vclient/services/developers.py +85 -0
  41. valentina_python_client-1.0.1/src/vclient/services/dicerolls.py +150 -0
  42. valentina_python_client-1.0.1/src/vclient/services/dictionary.py +125 -0
  43. valentina_python_client-1.0.1/src/vclient/services/global_admin.py +219 -0
  44. valentina_python_client-1.0.1/src/vclient/services/options.py +41 -0
  45. valentina_python_client-1.0.1/src/vclient/services/system.py +36 -0
  46. valentina_python_client-1.0.1/src/vclient/services/users.py +917 -0
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 natelandau
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.3
2
+ Name: valentina-python-client
3
+ Version: 1.0.1
4
+ Summary: Async Python client library for the Valentina Noir API
5
+ Author: Nate Landau
6
+ Author-email: Nate Landau <github@natenate.org>
7
+ License: MIT License
8
+
9
+ Copyright (c) 2026 natelandau
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Requires-Dist: anyio>=4.12.1
19
+ Requires-Dist: httpx>=0.28.1
20
+ Requires-Dist: pydantic[email]>=2.12.5
21
+ Requires-Python: >=3.13
22
+ Project-URL: Homepage, https://docs.valentina-noir.com/python-api-client/
23
+ Project-URL: Repository, https://github.com/natelandau/valentina-python-client
24
+ Description-Content-Type: text/markdown
25
+
26
+ # Valentina Python Client
27
+
28
+ Async Python client library for accessing the Valentina Noir API.
29
+
30
+ ## Features
31
+
32
+ - **Async-first design** - Built on httpx for efficient async HTTP operations
33
+ - **Type-safe** - Full type hints with Pydantic models for request/response validation
34
+ - **Convenient factory pattern** - Create a client once, access services from anywhere
35
+ - **Automatic pagination** - Stream through large datasets with `iter_all()` or fetch everything with `list_all()`
36
+ - **Robust error handling** - Specific exception types for different error conditions
37
+ - **Idempotency support** - Optional automatic idempotency keys for safe retries
38
+ - **Rate limit handling** - Built-in support for automatic rate limit retries
39
+
40
+ This client is a supported and up-to-date reference implementation for the Valentina Noir API. The full documentation for is available at https://docs.valentina-noir.com/python-api-client/.
41
+
42
+ ## Documentation
43
+
44
+ For complete documentation including configuration options, all available services, response models, and error handling, see the **[Full Documentation](https://docs.valentina-noir.com/python-api-client/)**.
45
+
46
+ ## Resources
47
+
48
+ - [Full Client Documentation](https://docs.valentina-noir.com/python-api-client/)
49
+ - [API Concepts](https://docs.valentina-noir.com/concepts/)
50
+ - [API Reference](https://api.valentina-noir.com/docs)
@@ -0,0 +1,25 @@
1
+ # Valentina Python Client
2
+
3
+ Async Python client library for accessing the Valentina Noir API.
4
+
5
+ ## Features
6
+
7
+ - **Async-first design** - Built on httpx for efficient async HTTP operations
8
+ - **Type-safe** - Full type hints with Pydantic models for request/response validation
9
+ - **Convenient factory pattern** - Create a client once, access services from anywhere
10
+ - **Automatic pagination** - Stream through large datasets with `iter_all()` or fetch everything with `list_all()`
11
+ - **Robust error handling** - Specific exception types for different error conditions
12
+ - **Idempotency support** - Optional automatic idempotency keys for safe retries
13
+ - **Rate limit handling** - Built-in support for automatic rate limit retries
14
+
15
+ This client is a supported and up-to-date reference implementation for the Valentina Noir API. The full documentation for is available at https://docs.valentina-noir.com/python-api-client/.
16
+
17
+ ## Documentation
18
+
19
+ For complete documentation including configuration options, all available services, response models, and error handling, see the **[Full Documentation](https://docs.valentina-noir.com/python-api-client/)**.
20
+
21
+ ## Resources
22
+
23
+ - [Full Client Documentation](https://docs.valentina-noir.com/python-api-client/)
24
+ - [API Concepts](https://docs.valentina-noir.com/concepts/)
25
+ - [API Reference](https://api.valentina-noir.com/docs)
@@ -0,0 +1,203 @@
1
+ [project]
2
+ authors = [{ name = "Nate Landau", email = "github@natenate.org" }]
3
+ classifiers = [
4
+ "Programming Language :: Python :: 3.13",
5
+ "Programming Language :: Python :: 3.14",
6
+ ]
7
+ dependencies = ["anyio>=4.12.1", "httpx>=0.28.1", "pydantic[email]>=2.12.5"]
8
+ description = "Async Python client library for the Valentina Noir API"
9
+ license = { file = "LICENSE" }
10
+ name = "valentina-python-client"
11
+ readme = "README.md"
12
+ requires-python = ">=3.13"
13
+ version = "1.0.1"
14
+
15
+ [project.urls]
16
+ Homepage = "https://docs.valentina-noir.com/python-api-client/"
17
+ Repository = "https://github.com/natelandau/valentina-python-client"
18
+
19
+ [build-system]
20
+ build-backend = "uv_build"
21
+ requires = ["uv_build>=0.9.26,<0.10.0"]
22
+
23
+ [tool.uv.build-backend]
24
+ module-name = "vclient"
25
+
26
+ [dependency-groups]
27
+ dev = [
28
+ "commitizen>=4.13.7",
29
+ "coverage>=7.13.4",
30
+ "duty>=1.9.0",
31
+ "prek>=0.3.2",
32
+ "pytest-anyio>=0.0.0",
33
+ "pytest-clarity>=1.0.1",
34
+ "pytest-cov>=7.0.0",
35
+ "pytest-devtools>=1.0.0",
36
+ "pytest-mock>=3.15.1",
37
+ "pytest-repeat>=0.9.4",
38
+ "pytest-sugar>=1.1.1",
39
+ "pytest-xdist>=3.8.0",
40
+ "pytest>=9.0.2",
41
+ "respx>=0.22.0",
42
+ "ruff>=0.15.1",
43
+ "shellcheck-py>=0.11.0.1",
44
+ "ty>=0.0.17",
45
+ "typos>=1.43.4",
46
+ "vulture>=2.14",
47
+ "yamllint>=1.38.0",
48
+ ]
49
+
50
+ [tool.commitizen]
51
+ bump_message = "bump(release): v$current_version → v$new_version"
52
+ changelog_merge_prerelease = true
53
+ tag_format = "v$version"
54
+ update_changelog_on_bump = true
55
+ version = "1.0.1"
56
+ version_provider = "uv"
57
+
58
+ [tool.coverage.report] # https://coverage.readthedocs.io/en/latest/config.html#report
59
+ exclude_lines = [
60
+ 'def __repr__',
61
+ 'except [\w\s\._]+ as .*:',
62
+ 'if TYPE_CHECKING',
63
+ 'pragma: no cover',
64
+ 'raise Abort',
65
+ 'raise Exit',
66
+ ]
67
+ fail_under = 0
68
+ precision = 1
69
+ show_missing = true
70
+ skip_covered = true
71
+ skip_empty = true
72
+
73
+ [tool.coverage.run]
74
+ branch = true
75
+ command_line = "--module pytest"
76
+ data_file = ".cache/coverage"
77
+ omit = ["tests/*"]
78
+ source = ["src"]
79
+
80
+ [tool.coverage.xml]
81
+ output = ".cache/coverage.xml"
82
+
83
+ [tool.mypy] # https://mypy.readthedocs.io/en/latest/config_file.html
84
+ cache_dir = ".cache/mypy"
85
+ disallow_any_unimported = false
86
+ disallow_subclassing_any = false
87
+ disallow_untyped_decorators = false
88
+ disallow_untyped_defs = true
89
+ exclude = ['duties.py', 'tests/']
90
+ follow_imports = "normal"
91
+ ignore_missing_imports = true
92
+ junit_xml = ".cache/mypy.xml"
93
+ no_implicit_optional = true
94
+ pretty = false
95
+ show_column_numbers = true
96
+ show_error_codes = true
97
+ show_error_context = true
98
+ strict_optional = false
99
+ warn_redundant_casts = true
100
+ warn_unreachable = true
101
+ warn_unused_ignores = true
102
+
103
+ [tool.pytest.ini_options]
104
+
105
+ addopts = "--color=yes --doctest-modules --strict-config --strict-markers -n auto --dist loadfile"
106
+ cache_dir = ".cache/pytest"
107
+ filterwarnings = ['error', 'ignore:.*Pydantic.*:UserWarning', 'ignore::DeprecationWarning:']
108
+ markers = ["serial"]
109
+ testpaths = ["tests"]
110
+ xfail_strict = true
111
+
112
+ [tool.ruff] # https://github.com/charliermarsh/ruff
113
+
114
+ exclude = [".cache", ".dev", ".git", ".venv", ".worktrees", "_build", "_site", "build", "dist"]
115
+ fix = true
116
+ line-length = 100
117
+ output-format = "grouped"
118
+ src = ["src", "tests"]
119
+ target-version = "py313"
120
+ [tool.ruff.lint]
121
+ ignore = [
122
+ "ANN002", # Missing type annotation for `*args`
123
+ "ANN003", # Missing type annotation for `**kwargs`
124
+ "ANN204", # missing return type annotation for special method `__init__`
125
+ "ANN401", # Dynamically typed expressions (typing.Any) are disallowed,
126
+ "B006", # mutable-argument-default
127
+ "B008", # function-call-in-default-argument
128
+ "COM812", # Trailing comma missing"
129
+ "CPY001", # Missing copyright notice at top of file
130
+ "D107", # undocumented-public-init
131
+ "E501", # line-too-long
132
+ "PLC0415", # Imports should be at top of file
133
+ # "FBT001", # Boolean-typed positional argument in function definition
134
+ # "FBT002", # Boolean-typed positional argument in function definition
135
+ "E711", # Comparison to `None` should be `cond is None`
136
+ "E712", # use of `== False` instead of `is False`
137
+ "FIX002", # Line contains TODO, consider resolving the issue
138
+ "S311", # suspicious-non-cryptographic-random-usage
139
+ "TD001", # invalid-todo-tag
140
+ "TD002", # Missing author in TODO
141
+ "TD003", # Missing issue link on the line following this TODO
142
+ ]
143
+ per-file-ignores = { "src/vclient/services/*.py" = [
144
+ "PLR0913", # Too many arguments
145
+ ], "tests/**/*.py" = [
146
+ "A002",
147
+ "A003",
148
+ "ANN001", # Missing type annotation for function argument `cls`
149
+ "ANN002", # Missing type annotation for `*args`
150
+ "ANN003", # Missing type annotation for `**kwargs`
151
+ "ANN201", # Missing return type annotation
152
+ "ARG001", # Unused function argument
153
+ "ARG002", # Unused method argument
154
+ "ARG005", # Unused lambda argument
155
+ "D102",
156
+ "ERA001", # Commented out code
157
+ "F403",
158
+ "F405", # May be undefined from type imports
159
+ "FBT001", # Boolean-typed positional argument in function definition
160
+ "PGH003", # Use specific rule codes when ignoring type issues
161
+ "PLC0415", # Imports should be at top of file
162
+ "PLR0913",
163
+ "PLR2004",
164
+ "PT011", # set the `match` parameter or use a more specific exception
165
+ "S101",
166
+ "SLF001", # Calling private method
167
+ "W292", # No blank line at end of file - included b/c cursor struggles to add a trailing newline and burns through requests trying to fix this linting error.
168
+ ] }
169
+ select = ["ALL"]
170
+ unfixable = [
171
+ "ERA001", # Commented out code
172
+ "F401", # unused-import
173
+ "F841", # unused-variable
174
+ ]
175
+
176
+ [tool.ruff.lint.mccabe]
177
+ # Unlike Flake8, default to a complexity level of 10.
178
+ max-complexity = 10
179
+
180
+ [tool.ruff.lint.isort]
181
+ combine-as-imports = true
182
+
183
+ [tool.ruff.lint.pydocstyle]
184
+ convention = "google"
185
+
186
+ [tool.ruff.lint.pylint]
187
+ max-args = 6
188
+
189
+ [tool.ruff.format]
190
+ indent-style = "space"
191
+ line-ending = "auto"
192
+ quote-style = "double"
193
+ skip-magic-trailing-comma = false
194
+
195
+ [tool.vulture]
196
+ exclude = ["duties.py", "scripts/", "tests/", "tmp/"]
197
+ ignore_decorators = []
198
+ ignore_names = []
199
+ make_whitelist = false
200
+ min_confidence = 100
201
+ paths = ["src/"]
202
+ sort_by_size = true
203
+ verbose = false
@@ -0,0 +1,52 @@
1
+ """API client for the vclient service.
2
+
3
+ Primary exports:
4
+ VClient: The main API client class
5
+
6
+ Factory functions (primary access pattern):
7
+ books_service, campaigns_service, chapters_service, etc.
8
+
9
+ For exceptions, use: from vclient.exceptions import APIError, NotFoundError, ...
10
+ For models, use: from vclient.models import Character, Campaign, ...
11
+ For service classes, use: from vclient.services import CharactersService, ...
12
+ """
13
+
14
+ from vclient.client import VClient
15
+ from vclient.registry import (
16
+ books_service,
17
+ campaigns_service,
18
+ chapters_service,
19
+ character_autogen_service,
20
+ character_blueprint_service,
21
+ character_traits_service,
22
+ characters_service,
23
+ companies_service,
24
+ developer_service,
25
+ dicerolls_service,
26
+ dictionary_service,
27
+ global_admin_service,
28
+ options_service,
29
+ system_service,
30
+ users_service,
31
+ )
32
+
33
+ __all__ = (
34
+ # Core
35
+ "VClient",
36
+ # Factory functions
37
+ "books_service",
38
+ "campaigns_service",
39
+ "chapters_service",
40
+ "character_autogen_service",
41
+ "character_blueprint_service",
42
+ "character_traits_service",
43
+ "characters_service",
44
+ "companies_service",
45
+ "developer_service",
46
+ "dicerolls_service",
47
+ "dictionary_service",
48
+ "global_admin_service",
49
+ "options_service",
50
+ "system_service",
51
+ "users_service",
52
+ )