datamaker-py 0.9.0__tar.gz → 0.10.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 (38) hide show
  1. {datamaker_py-0.9.0/src/datamaker_py.egg-info → datamaker_py-0.10.0}/PKG-INFO +36 -1
  2. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/README.md +35 -0
  3. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/pyproject.toml +1 -1
  4. datamaker_py-0.10.0/src/datamaker/generated/__init__.py +7 -0
  5. datamaker_py-0.10.0/src/datamaker/generated/schema.py +1655 -0
  6. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/main.py +8 -5
  7. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/api_keys.py +5 -4
  8. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/connections.py +5 -4
  9. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/custom_types.py +20 -14
  10. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/export_and_validation.py +3 -2
  11. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/folders_and_utils.py +13 -12
  12. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/generation.py +2 -1
  13. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/keymaps.py +3 -2
  14. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/masking_policies.py +5 -4
  15. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/plans.py +5 -4
  16. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/projects.py +6 -5
  17. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/scenario_files.py +6 -5
  18. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/sets.py +5 -4
  19. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/teams.py +11 -10
  20. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/templates.py +7 -6
  21. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/users.py +14 -8
  22. datamaker_py-0.10.0/src/datamaker/types.py +136 -0
  23. {datamaker_py-0.9.0 → datamaker_py-0.10.0/src/datamaker_py.egg-info}/PKG-INFO +36 -1
  24. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker_py.egg-info/SOURCES.txt +3 -0
  25. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/LICENSE +0 -0
  26. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/setup.cfg +0 -0
  27. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/__init__.py +0 -0
  28. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/core.py +0 -0
  29. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/error.py +0 -0
  30. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/__init__.py +0 -0
  31. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/routes/base.py +0 -0
  32. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker/template.py +0 -0
  33. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker_py.egg-info/dependency_links.txt +0 -0
  34. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker_py.egg-info/requires.txt +0 -0
  35. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/src/datamaker_py.egg-info/top_level.txt +0 -0
  36. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/tests/test_integration.py +0 -0
  37. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/tests/test_main.py +0 -0
  38. {datamaker_py-0.9.0 → datamaker_py-0.10.0}/tests/test_routes.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datamaker-py
3
- Version: 0.9.0
3
+ Version: 0.10.0
4
4
  Summary: The official Python library for the Automators DataMaker API.
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -77,3 +77,38 @@ See [`artifacts/README.md`](artifacts/README.md) for more details.
77
77
  ## Development & Contibutions
78
78
 
79
79
  See the [contributing.md](/CONTRIBUTING.md) guide for details on how to contribute to this project.
80
+
81
+ ## Types
82
+
83
+ Response types are **generated** from the API's OpenAPI document, not hand-written:
84
+
85
+ ```
86
+ spec/openapi.json -> src/datamaker/generated/schema.py -> src/datamaker/types.py
87
+ ```
88
+
89
+ Import from `datamaker.types`, which resolves each spec schema name to the class
90
+ that really matches it:
91
+
92
+ ```python
93
+ from datamaker.types import Project, Plan, Template
94
+
95
+ projects: list[Project] = dm.get_projects()
96
+ ```
97
+
98
+ They are `TypedDict`s, so nothing changes at runtime — methods still return the
99
+ plain dicts `response.json()` produces, and `project["name"]` works exactly as
100
+ before. The types are checker-only.
101
+
102
+ To regenerate after the API changes:
103
+
104
+ ```bash
105
+ python scripts/generate_schema.py
106
+ ```
107
+
108
+ CI runs `python scripts/generate_schema.py --check` and fails if the committed
109
+ types drift from the spec.
110
+
111
+ Three schemas cannot currently be generated (`SetDetail`, `PackInstallListItem`,
112
+ `SchemaGraphNavigation`): they are composed with `allOf`, which the generator
113
+ merges away rather than emitting as a named class. Methods returning those keep
114
+ `Dict`. The generator script lists them explicitly and fails if the set grows.
@@ -66,3 +66,38 @@ See [`artifacts/README.md`](artifacts/README.md) for more details.
66
66
  ## Development & Contibutions
67
67
 
68
68
  See the [contributing.md](/CONTRIBUTING.md) guide for details on how to contribute to this project.
69
+
70
+ ## Types
71
+
72
+ Response types are **generated** from the API's OpenAPI document, not hand-written:
73
+
74
+ ```
75
+ spec/openapi.json -> src/datamaker/generated/schema.py -> src/datamaker/types.py
76
+ ```
77
+
78
+ Import from `datamaker.types`, which resolves each spec schema name to the class
79
+ that really matches it:
80
+
81
+ ```python
82
+ from datamaker.types import Project, Plan, Template
83
+
84
+ projects: list[Project] = dm.get_projects()
85
+ ```
86
+
87
+ They are `TypedDict`s, so nothing changes at runtime — methods still return the
88
+ plain dicts `response.json()` produces, and `project["name"]` works exactly as
89
+ before. The types are checker-only.
90
+
91
+ To regenerate after the API changes:
92
+
93
+ ```bash
94
+ python scripts/generate_schema.py
95
+ ```
96
+
97
+ CI runs `python scripts/generate_schema.py --check` and fails if the committed
98
+ types drift from the spec.
99
+
100
+ Three schemas cannot currently be generated (`SetDetail`, `PackInstallListItem`,
101
+ `SchemaGraphNavigation`): they are composed with `allOf`, which the generator
102
+ merges away rather than emitting as a named class. Methods returning those keep
103
+ `Dict`. The generator script lists them explicitly and fails if the set grows.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "datamaker-py"
7
- version = "0.9.0"
7
+ version = "0.10.0"
8
8
  description = "The official Python library for the Automators DataMaker API."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -0,0 +1,7 @@
1
+ """Types generated from the API's OpenAPI document. Do not edit by hand.
2
+
3
+ Regenerate with `python scripts/generate_schema.py`; CI fails if this drifts
4
+ from `spec/openapi.json`.
5
+ """
6
+
7
+ from .schema import * # noqa: F401,F403