walacor-python-sdk 0.1.1__tar.gz → 0.1.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.
Files changed (63) hide show
  1. walacor_python_sdk-0.1.3/PKG-INFO +195 -0
  2. walacor_python_sdk-0.1.3/README.md +163 -0
  3. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/pyproject.toml +16 -0
  4. walacor_python_sdk-0.1.3/src/walacor_python_sdk.egg-info/PKG-INFO +195 -0
  5. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_python_sdk.egg-info/SOURCES.txt +1 -1
  6. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_python_sdk.egg-info/requires.txt +5 -0
  7. walacor_python_sdk-0.1.3/src/walacor_sdk/__init__.py +26 -0
  8. walacor_python_sdk-0.1.3/src/walacor_sdk/data_requests/__init__.py +49 -0
  9. walacor_python_sdk-0.1.3/src/walacor_sdk/file_request/__init__.py +43 -0
  10. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/file_request/file_request_service.py +67 -11
  11. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/file_request/models/file_request_request.py +10 -2
  12. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/file_request/models/models.py +14 -0
  13. walacor_python_sdk-0.1.3/src/walacor_sdk/schema/__init__.py +49 -0
  14. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/tests/test_file_request.py +24 -15
  15. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/tests/test_schema.py +144 -128
  16. walacor_python_sdk-0.1.1/PKG-INFO +0 -112
  17. walacor_python_sdk-0.1.1/README.md +0 -84
  18. walacor_python_sdk-0.1.1/src/walacor_python_sdk.egg-info/PKG-INFO +0 -112
  19. walacor_python_sdk-0.1.1/src/walacor_sdk/authentication/models/response.py +0 -5
  20. walacor_python_sdk-0.1.1/src/walacor_sdk/schema/__init__.py +0 -0
  21. walacor_python_sdk-0.1.1/src/walacor_sdk/schema/models/__init__.py +0 -0
  22. walacor_python_sdk-0.1.1/tests/__init__.py +0 -0
  23. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/.github/workflows/ci.yaml +0 -0
  24. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/.github/workflows/release.yaml +0 -0
  25. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/.gitignore +0 -0
  26. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/.pre-commit-config.yaml +0 -0
  27. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/CONTRIBUTING.md +0 -0
  28. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/LICENSE +0 -0
  29. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/setup.cfg +0 -0
  30. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_python_sdk.egg-info/dependency_links.txt +0 -0
  31. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_python_sdk.egg-info/top_level.txt +0 -0
  32. {walacor_python_sdk-0.1.1/src/walacor_sdk → walacor_python_sdk-0.1.3/src/walacor_sdk/authentication}/__init__.py +0 -0
  33. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/authentication/auth_service.py +0 -0
  34. {walacor_python_sdk-0.1.1/src/walacor_sdk/authentication → walacor_python_sdk-0.1.3/src/walacor_sdk/authentication/models}/__init__.py +0 -0
  35. {walacor_python_sdk-0.1.1/src/walacor_sdk/authentication/models → walacor_python_sdk-0.1.3/src/walacor_sdk/base}/__init__.py +0 -0
  36. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/base/base_service.py +0 -0
  37. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/base/facade.py +0 -0
  38. {walacor_python_sdk-0.1.1/src/walacor_sdk/base → walacor_python_sdk-0.1.3/src/walacor_sdk/base/model}/__init__.py +0 -0
  39. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/base/model/base_response_model.py +0 -0
  40. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/base/w_client.py +0 -0
  41. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/base/walacor_service.py +0 -0
  42. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/data_requests/data_requests_service.py +0 -0
  43. {walacor_python_sdk-0.1.1/src/walacor_sdk/base/model → walacor_python_sdk-0.1.3/src/walacor_sdk/data_requests/models}/__init__.py +0 -0
  44. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/data_requests/models/data_request_response.py +0 -0
  45. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/data_requests/models/data_requests_request.py +0 -0
  46. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/data_requests/models/models.py +0 -0
  47. {walacor_python_sdk-0.1.1/src/walacor_sdk/data_requests → walacor_python_sdk-0.1.3/src/walacor_sdk/file_request/models}/__init__.py +0 -0
  48. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/file_request/models/file_request_response.py +0 -0
  49. /walacor_python_sdk-0.1.1/src/walacor_sdk/data_requests/models/__init__.py → /walacor_python_sdk-0.1.3/src/walacor_sdk/py.typed +0 -0
  50. {walacor_python_sdk-0.1.1/src/walacor_sdk/file_request → walacor_python_sdk-0.1.3/src/walacor_sdk/schema/models}/__init__.py +0 -0
  51. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/schema/models/models.py +0 -0
  52. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/schema/models/schema_request.py +0 -0
  53. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/schema/models/schema_response.py +0 -0
  54. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/schema/schema_service.py +0 -0
  55. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/utils/__init__ +0 -0
  56. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/utils/enums.py +0 -0
  57. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/utils/exceptions.py +0 -0
  58. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/utils/global_exception_handler.py +0 -0
  59. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/src/walacor_sdk/utils/logger.py +0 -0
  60. {walacor_python_sdk-0.1.1/src/walacor_sdk/file_request/models → walacor_python_sdk-0.1.3/tests}/__init__.py +0 -0
  61. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/tests/test_client.py +0 -0
  62. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/tests/test_data_requests.py +0 -0
  63. {walacor_python_sdk-0.1.1 → walacor_python_sdk-0.1.3}/tests/test_facade.py +0 -0
@@ -0,0 +1,195 @@
1
+ Metadata-Version: 2.4
2
+ Name: walacor_python_sdk
3
+ Version: 0.1.3
4
+ Summary: Python SDK for Walacor
5
+ Author-email: Garo Kechichian <garo.keshish@gmail.com>
6
+ License: Apache-2.0
7
+ Project-URL: Documentation, https://apidoc.walacor.com
8
+ Project-URL: Homepage, https://www.walacor.com
9
+ Keywords: data-transformations,lineage,provenance,walacor
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Requires-Python: >=3.11
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: requests>=2.32.3
21
+ Requires-Dist: pydantic>=2.10
22
+ Provides-Extra: test
23
+ Requires-Dist: pytest>=6; extra == "test"
24
+ Provides-Extra: dev
25
+ Requires-Dist: pre-commit; extra == "dev"
26
+ Requires-Dist: tox; extra == "dev"
27
+ Provides-Extra: data-science
28
+ Requires-Dist: pandas>=2.0; extra == "data-science"
29
+ Requires-Dist: pyarrow>=14; extra == "data-science"
30
+ Requires-Dist: numpy>=1.26; extra == "data-science"
31
+ Dynamic: license-file
32
+
33
+ # Walacor Python SDK
34
+
35
+ <div align="center">
36
+
37
+ <img src="https://www.walacor.com/wp-content/uploads/2022/09/Walacor_Logo_Tag.png" width="300" />
38
+
39
+ [![License Apache 2.0][badge-license]][license]
40
+ [![Walacor (1100127456347832400)](https://img.shields.io/badge/My-Discord-%235865F2.svg?label=Walacor)](https://discord.gg/BaEWpsg8Yc)
41
+ [![Walacor (1100127456347832400)](https://img.shields.io/static/v1?label=Walacor&message=LinkedIn&color=blue)](https://www.linkedin.com/company/walacor/)
42
+ [![Walacor (1100127456347832400)](https://img.shields.io/static/v1?label=Walacor&message=Website&color)](https://www.walacor.com/product/)
43
+
44
+ </div>
45
+
46
+ [badge-license]: https://img.shields.io/badge/license-Apache2-green.svg?dummy
47
+ [license]: https://github.com/walacor/objectvalidation/blob/main/LICENSE
48
+
49
+
50
+ # Walacor Python SDK
51
+
52
+ [![PyPI](https://img.shields.io/pypi/v/walacor-python-sdk.svg)](https://pypi.org/project/walacor-python-sdk/)
53
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
54
+
55
+ *A typed, lightweight wrapper around Walacor’s REST API for immutable provenance, schema management and (soon) data‑science transformations.*
56
+
57
+ ---
58
+
59
+ ## ✨ Features
60
+
61
+ * **One‑liner setup** – a single `WalacorService` object bootstraps authentication and exposes sub‑clients (`auth`, `schema`, `data`, *etc.*)
62
+ * **Pydantic models everywhere** – rich typing, runtime validation and IDE autocompletion.
63
+ * **Version‑safe schemas** – helper methods to list, inspect and create schema blueprints.
64
+ * **Composable requests** – thin wrappers over `requests` that automatically inject Bearer tokens and headers.
65
+ * **Python 3.11 + only** – enjoy `typing` generics, `|` unions, `match` statements.
66
+
67
+ ---
68
+
69
+ ## 📦 Installation
70
+
71
+ ### From PyPI (recommended)
72
+
73
+ ```bash
74
+ pip install walacor-python-sdk
75
+ ```
76
+
77
+ ### From source (editable)
78
+
79
+ ```bash
80
+ git clone https://github.com/walacor/python-sdk.git
81
+ cd python-sdk
82
+ pip install -e .[dev,test]
83
+ ```
84
+
85
+ > After installation, import via `walacor_sdk` (underscore), **not** the PyPI name with a dash.
86
+
87
+ ```python
88
+ from walacor_sdk import WalacorService
89
+ ```
90
+
91
+ ---
92
+
93
+ ## 🚀 Quick Start
94
+
95
+ ### 1 – Create a service instance
96
+
97
+ ```python
98
+ from walacor_sdk import WalacorService
99
+
100
+ wal = WalacorService(
101
+ server="http://[walacor.instance.address/api",
102
+ username="Admin",
103
+ password="Password!"
104
+ )
105
+ ```
106
+
107
+ Need to change credentials later?
108
+
109
+ ```python
110
+ wal.changeCred("new_user", "new_password")
111
+ ```
112
+
113
+ ### 2 – Work with schemas
114
+
115
+ ```python
116
+ from walacor_sdk.schema.models import (
117
+ CreateSchemaRequest, CreateSchemaDefinition,
118
+ CreateFieldRequest, CreateIndexRequest
119
+ )
120
+
121
+ schema_req = CreateSchemaRequest(
122
+ ETId=50, # system envelope for schemas
123
+ SV=1,
124
+ Schema=CreateSchemaDefinition(
125
+ ETId=654321,
126
+ TableName="books",
127
+ Family="library",
128
+ DoSummary=True,
129
+ Fields=[
130
+ CreateFieldRequest(FieldName="book_id", DataType="TEXT", Required=True),
131
+ CreateFieldRequest(FieldName="title", DataType="TEXT", Required=True)
132
+ ],
133
+ Indexes=[
134
+ CreateIndexRequest(Fields=["book_id"], IndexValue="book_id")
135
+ ]
136
+ )
137
+ )
138
+
139
+ meta = wal.schema.create_schema(schema_req)
140
+ print("Created schema envelope:", meta.EId)
141
+ ```
142
+
143
+ Other handy calls:
144
+
145
+ ```python
146
+ # list latest versions for every ETId
147
+ for s in wal.schema.get_list_with_latest_version():
148
+ print(s.ETId, s.TableName)
149
+
150
+ # detailed info for a known ETId
151
+ info = wal.schema.get_schema_details_with_ETId(654321)
152
+ print(info.Fields)
153
+ ```
154
+
155
+ ### 3 – Use enums & constants
156
+
157
+ ```python
158
+ from walacor_sdk.utils.enums import SystemEnvelopeType
159
+ print(SystemEnvelopeType.SCHEMA.value) # -> 50
160
+ ```
161
+
162
+ ---
163
+
164
+ ## ⚙️ Error handling & logging
165
+
166
+ * Network errors raise `requests.HTTPError` so you can retry or surface gracefully.
167
+ * Validation errors are logged with `logging.error` and result in `None`/`[]` returns, never raw dictionaries.
168
+ * The SDK writes to the module‑level *walacor\_sdk.utils.logger* logger; attach your own handler or redirect to file.
169
+
170
+ ---
171
+
172
+ ## 🧪 Running tests
173
+
174
+ ```bash
175
+ pip install .[test]
176
+ pytest -q
177
+ ```
178
+
179
+ ---
180
+
181
+ ## 🤝 Contributing
182
+
183
+ We love PRs! Please open an issue first for large features. All contributions must:
184
+
185
+ * Pass `pre-commit` hooks (`pre-commit run --all-files`).
186
+ * Include unit tests with `pytest`.
187
+ * Follow the existing docstring & typing style.
188
+
189
+ For full contribution details, see 👉 [CONTRIBUTING.md](CONTRIBUTING.md).
190
+
191
+ ---
192
+
193
+ ## 📄 License
194
+
195
+ Apache 2.0 © 2025 Walacor & Contributors.
@@ -0,0 +1,163 @@
1
+ # Walacor Python SDK
2
+
3
+ <div align="center">
4
+
5
+ <img src="https://www.walacor.com/wp-content/uploads/2022/09/Walacor_Logo_Tag.png" width="300" />
6
+
7
+ [![License Apache 2.0][badge-license]][license]
8
+ [![Walacor (1100127456347832400)](https://img.shields.io/badge/My-Discord-%235865F2.svg?label=Walacor)](https://discord.gg/BaEWpsg8Yc)
9
+ [![Walacor (1100127456347832400)](https://img.shields.io/static/v1?label=Walacor&message=LinkedIn&color=blue)](https://www.linkedin.com/company/walacor/)
10
+ [![Walacor (1100127456347832400)](https://img.shields.io/static/v1?label=Walacor&message=Website&color)](https://www.walacor.com/product/)
11
+
12
+ </div>
13
+
14
+ [badge-license]: https://img.shields.io/badge/license-Apache2-green.svg?dummy
15
+ [license]: https://github.com/walacor/objectvalidation/blob/main/LICENSE
16
+
17
+
18
+ # Walacor Python SDK
19
+
20
+ [![PyPI](https://img.shields.io/pypi/v/walacor-python-sdk.svg)](https://pypi.org/project/walacor-python-sdk/)
21
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
22
+
23
+ *A typed, lightweight wrapper around Walacor’s REST API for immutable provenance, schema management and (soon) data‑science transformations.*
24
+
25
+ ---
26
+
27
+ ## ✨ Features
28
+
29
+ * **One‑liner setup** – a single `WalacorService` object bootstraps authentication and exposes sub‑clients (`auth`, `schema`, `data`, *etc.*)
30
+ * **Pydantic models everywhere** – rich typing, runtime validation and IDE autocompletion.
31
+ * **Version‑safe schemas** – helper methods to list, inspect and create schema blueprints.
32
+ * **Composable requests** – thin wrappers over `requests` that automatically inject Bearer tokens and headers.
33
+ * **Python 3.11 + only** – enjoy `typing` generics, `|` unions, `match` statements.
34
+
35
+ ---
36
+
37
+ ## 📦 Installation
38
+
39
+ ### From PyPI (recommended)
40
+
41
+ ```bash
42
+ pip install walacor-python-sdk
43
+ ```
44
+
45
+ ### From source (editable)
46
+
47
+ ```bash
48
+ git clone https://github.com/walacor/python-sdk.git
49
+ cd python-sdk
50
+ pip install -e .[dev,test]
51
+ ```
52
+
53
+ > After installation, import via `walacor_sdk` (underscore), **not** the PyPI name with a dash.
54
+
55
+ ```python
56
+ from walacor_sdk import WalacorService
57
+ ```
58
+
59
+ ---
60
+
61
+ ## 🚀 Quick Start
62
+
63
+ ### 1 – Create a service instance
64
+
65
+ ```python
66
+ from walacor_sdk import WalacorService
67
+
68
+ wal = WalacorService(
69
+ server="http://[walacor.instance.address/api",
70
+ username="Admin",
71
+ password="Password!"
72
+ )
73
+ ```
74
+
75
+ Need to change credentials later?
76
+
77
+ ```python
78
+ wal.changeCred("new_user", "new_password")
79
+ ```
80
+
81
+ ### 2 – Work with schemas
82
+
83
+ ```python
84
+ from walacor_sdk.schema.models import (
85
+ CreateSchemaRequest, CreateSchemaDefinition,
86
+ CreateFieldRequest, CreateIndexRequest
87
+ )
88
+
89
+ schema_req = CreateSchemaRequest(
90
+ ETId=50, # system envelope for schemas
91
+ SV=1,
92
+ Schema=CreateSchemaDefinition(
93
+ ETId=654321,
94
+ TableName="books",
95
+ Family="library",
96
+ DoSummary=True,
97
+ Fields=[
98
+ CreateFieldRequest(FieldName="book_id", DataType="TEXT", Required=True),
99
+ CreateFieldRequest(FieldName="title", DataType="TEXT", Required=True)
100
+ ],
101
+ Indexes=[
102
+ CreateIndexRequest(Fields=["book_id"], IndexValue="book_id")
103
+ ]
104
+ )
105
+ )
106
+
107
+ meta = wal.schema.create_schema(schema_req)
108
+ print("Created schema envelope:", meta.EId)
109
+ ```
110
+
111
+ Other handy calls:
112
+
113
+ ```python
114
+ # list latest versions for every ETId
115
+ for s in wal.schema.get_list_with_latest_version():
116
+ print(s.ETId, s.TableName)
117
+
118
+ # detailed info for a known ETId
119
+ info = wal.schema.get_schema_details_with_ETId(654321)
120
+ print(info.Fields)
121
+ ```
122
+
123
+ ### 3 – Use enums & constants
124
+
125
+ ```python
126
+ from walacor_sdk.utils.enums import SystemEnvelopeType
127
+ print(SystemEnvelopeType.SCHEMA.value) # -> 50
128
+ ```
129
+
130
+ ---
131
+
132
+ ## ⚙️ Error handling & logging
133
+
134
+ * Network errors raise `requests.HTTPError` so you can retry or surface gracefully.
135
+ * Validation errors are logged with `logging.error` and result in `None`/`[]` returns, never raw dictionaries.
136
+ * The SDK writes to the module‑level *walacor\_sdk.utils.logger* logger; attach your own handler or redirect to file.
137
+
138
+ ---
139
+
140
+ ## 🧪 Running tests
141
+
142
+ ```bash
143
+ pip install .[test]
144
+ pytest -q
145
+ ```
146
+
147
+ ---
148
+
149
+ ## 🤝 Contributing
150
+
151
+ We love PRs! Please open an issue first for large features. All contributions must:
152
+
153
+ * Pass `pre-commit` hooks (`pre-commit run --all-files`).
154
+ * Include unit tests with `pytest`.
155
+ * Follow the existing docstring & typing style.
156
+
157
+ For full contribution details, see 👉 [CONTRIBUTING.md](CONTRIBUTING.md).
158
+
159
+ ---
160
+
161
+ ## 📄 License
162
+
163
+ Apache 2.0 © 2025 Walacor & Contributors.
@@ -46,12 +46,28 @@ dev = [
46
46
  "pre-commit",
47
47
  "tox"
48
48
  ]
49
+
50
+ data-science = [
51
+ "pandas>=2.0",
52
+ "pyarrow>=14",
53
+ "numpy>=1.26"
54
+ ]
55
+
49
56
  [tool.setuptools_scm]
50
57
 
51
58
  [project.urls]
52
59
  Documentation = "https://apidoc.walacor.com"
53
60
  Homepage = "https://www.walacor.com"
54
61
 
62
+ [tool.setuptools.package-data]
63
+ "walacor_sdk" = ["py.typed"]
64
+
65
+ [tool.setuptools]
66
+ package-dir = {"" = "src"}
67
+
68
+ [tool.setuptools.packages.find]
69
+ where = ["src"]
70
+
55
71
  [tool.ruff]
56
72
  src = [ "src" ]
57
73
 
@@ -0,0 +1,195 @@
1
+ Metadata-Version: 2.4
2
+ Name: walacor_python_sdk
3
+ Version: 0.1.3
4
+ Summary: Python SDK for Walacor
5
+ Author-email: Garo Kechichian <garo.keshish@gmail.com>
6
+ License: Apache-2.0
7
+ Project-URL: Documentation, https://apidoc.walacor.com
8
+ Project-URL: Homepage, https://www.walacor.com
9
+ Keywords: data-transformations,lineage,provenance,walacor
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Requires-Python: >=3.11
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: requests>=2.32.3
21
+ Requires-Dist: pydantic>=2.10
22
+ Provides-Extra: test
23
+ Requires-Dist: pytest>=6; extra == "test"
24
+ Provides-Extra: dev
25
+ Requires-Dist: pre-commit; extra == "dev"
26
+ Requires-Dist: tox; extra == "dev"
27
+ Provides-Extra: data-science
28
+ Requires-Dist: pandas>=2.0; extra == "data-science"
29
+ Requires-Dist: pyarrow>=14; extra == "data-science"
30
+ Requires-Dist: numpy>=1.26; extra == "data-science"
31
+ Dynamic: license-file
32
+
33
+ # Walacor Python SDK
34
+
35
+ <div align="center">
36
+
37
+ <img src="https://www.walacor.com/wp-content/uploads/2022/09/Walacor_Logo_Tag.png" width="300" />
38
+
39
+ [![License Apache 2.0][badge-license]][license]
40
+ [![Walacor (1100127456347832400)](https://img.shields.io/badge/My-Discord-%235865F2.svg?label=Walacor)](https://discord.gg/BaEWpsg8Yc)
41
+ [![Walacor (1100127456347832400)](https://img.shields.io/static/v1?label=Walacor&message=LinkedIn&color=blue)](https://www.linkedin.com/company/walacor/)
42
+ [![Walacor (1100127456347832400)](https://img.shields.io/static/v1?label=Walacor&message=Website&color)](https://www.walacor.com/product/)
43
+
44
+ </div>
45
+
46
+ [badge-license]: https://img.shields.io/badge/license-Apache2-green.svg?dummy
47
+ [license]: https://github.com/walacor/objectvalidation/blob/main/LICENSE
48
+
49
+
50
+ # Walacor Python SDK
51
+
52
+ [![PyPI](https://img.shields.io/pypi/v/walacor-python-sdk.svg)](https://pypi.org/project/walacor-python-sdk/)
53
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
54
+
55
+ *A typed, lightweight wrapper around Walacor’s REST API for immutable provenance, schema management and (soon) data‑science transformations.*
56
+
57
+ ---
58
+
59
+ ## ✨ Features
60
+
61
+ * **One‑liner setup** – a single `WalacorService` object bootstraps authentication and exposes sub‑clients (`auth`, `schema`, `data`, *etc.*)
62
+ * **Pydantic models everywhere** – rich typing, runtime validation and IDE autocompletion.
63
+ * **Version‑safe schemas** – helper methods to list, inspect and create schema blueprints.
64
+ * **Composable requests** – thin wrappers over `requests` that automatically inject Bearer tokens and headers.
65
+ * **Python 3.11 + only** – enjoy `typing` generics, `|` unions, `match` statements.
66
+
67
+ ---
68
+
69
+ ## 📦 Installation
70
+
71
+ ### From PyPI (recommended)
72
+
73
+ ```bash
74
+ pip install walacor-python-sdk
75
+ ```
76
+
77
+ ### From source (editable)
78
+
79
+ ```bash
80
+ git clone https://github.com/walacor/python-sdk.git
81
+ cd python-sdk
82
+ pip install -e .[dev,test]
83
+ ```
84
+
85
+ > After installation, import via `walacor_sdk` (underscore), **not** the PyPI name with a dash.
86
+
87
+ ```python
88
+ from walacor_sdk import WalacorService
89
+ ```
90
+
91
+ ---
92
+
93
+ ## 🚀 Quick Start
94
+
95
+ ### 1 – Create a service instance
96
+
97
+ ```python
98
+ from walacor_sdk import WalacorService
99
+
100
+ wal = WalacorService(
101
+ server="http://[walacor.instance.address/api",
102
+ username="Admin",
103
+ password="Password!"
104
+ )
105
+ ```
106
+
107
+ Need to change credentials later?
108
+
109
+ ```python
110
+ wal.changeCred("new_user", "new_password")
111
+ ```
112
+
113
+ ### 2 – Work with schemas
114
+
115
+ ```python
116
+ from walacor_sdk.schema.models import (
117
+ CreateSchemaRequest, CreateSchemaDefinition,
118
+ CreateFieldRequest, CreateIndexRequest
119
+ )
120
+
121
+ schema_req = CreateSchemaRequest(
122
+ ETId=50, # system envelope for schemas
123
+ SV=1,
124
+ Schema=CreateSchemaDefinition(
125
+ ETId=654321,
126
+ TableName="books",
127
+ Family="library",
128
+ DoSummary=True,
129
+ Fields=[
130
+ CreateFieldRequest(FieldName="book_id", DataType="TEXT", Required=True),
131
+ CreateFieldRequest(FieldName="title", DataType="TEXT", Required=True)
132
+ ],
133
+ Indexes=[
134
+ CreateIndexRequest(Fields=["book_id"], IndexValue="book_id")
135
+ ]
136
+ )
137
+ )
138
+
139
+ meta = wal.schema.create_schema(schema_req)
140
+ print("Created schema envelope:", meta.EId)
141
+ ```
142
+
143
+ Other handy calls:
144
+
145
+ ```python
146
+ # list latest versions for every ETId
147
+ for s in wal.schema.get_list_with_latest_version():
148
+ print(s.ETId, s.TableName)
149
+
150
+ # detailed info for a known ETId
151
+ info = wal.schema.get_schema_details_with_ETId(654321)
152
+ print(info.Fields)
153
+ ```
154
+
155
+ ### 3 – Use enums & constants
156
+
157
+ ```python
158
+ from walacor_sdk.utils.enums import SystemEnvelopeType
159
+ print(SystemEnvelopeType.SCHEMA.value) # -> 50
160
+ ```
161
+
162
+ ---
163
+
164
+ ## ⚙️ Error handling & logging
165
+
166
+ * Network errors raise `requests.HTTPError` so you can retry or surface gracefully.
167
+ * Validation errors are logged with `logging.error` and result in `None`/`[]` returns, never raw dictionaries.
168
+ * The SDK writes to the module‑level *walacor\_sdk.utils.logger* logger; attach your own handler or redirect to file.
169
+
170
+ ---
171
+
172
+ ## 🧪 Running tests
173
+
174
+ ```bash
175
+ pip install .[test]
176
+ pytest -q
177
+ ```
178
+
179
+ ---
180
+
181
+ ## 🤝 Contributing
182
+
183
+ We love PRs! Please open an issue first for large features. All contributions must:
184
+
185
+ * Pass `pre-commit` hooks (`pre-commit run --all-files`).
186
+ * Include unit tests with `pytest`.
187
+ * Follow the existing docstring & typing style.
188
+
189
+ For full contribution details, see 👉 [CONTRIBUTING.md](CONTRIBUTING.md).
190
+
191
+ ---
192
+
193
+ ## 📄 License
194
+
195
+ Apache 2.0 © 2025 Walacor & Contributors.
@@ -12,10 +12,10 @@ src/walacor_python_sdk.egg-info/dependency_links.txt
12
12
  src/walacor_python_sdk.egg-info/requires.txt
13
13
  src/walacor_python_sdk.egg-info/top_level.txt
14
14
  src/walacor_sdk/__init__.py
15
+ src/walacor_sdk/py.typed
15
16
  src/walacor_sdk/authentication/__init__.py
16
17
  src/walacor_sdk/authentication/auth_service.py
17
18
  src/walacor_sdk/authentication/models/__init__.py
18
- src/walacor_sdk/authentication/models/response.py
19
19
  src/walacor_sdk/base/__init__.py
20
20
  src/walacor_sdk/base/base_service.py
21
21
  src/walacor_sdk/base/facade.py
@@ -1,6 +1,11 @@
1
1
  requests>=2.32.3
2
2
  pydantic>=2.10
3
3
 
4
+ [data-science]
5
+ pandas>=2.0
6
+ pyarrow>=14
7
+ numpy>=1.26
8
+
4
9
  [dev]
5
10
  pre-commit
6
11
  tox
@@ -0,0 +1,26 @@
1
+ import types
2
+
3
+ from importlib import import_module
4
+ from typing import TYPE_CHECKING
5
+
6
+ from .base.walacor_service import WalacorService
7
+
8
+ __all__: list[str] = [
9
+ "WalacorService",
10
+ "authentication",
11
+ "schema",
12
+ "file_request",
13
+ "data_requests",
14
+ ]
15
+
16
+
17
+ def __getattr__(name: str) -> types.ModuleType:
18
+ if name in __all__[2:]:
19
+ mod = import_module(f"{__name__}.{name}")
20
+ globals()[name] = mod
21
+ return mod
22
+ raise AttributeError(name)
23
+
24
+
25
+ if TYPE_CHECKING: # pragma: no cover
26
+ from . import authentication, data_requests, file_request, schema
@@ -0,0 +1,49 @@
1
+ import types
2
+
3
+ from importlib import import_module
4
+ from typing import TYPE_CHECKING
5
+
6
+ from .data_requests_service import DataRequestsService
7
+ from .models.data_request_response import (
8
+ GetAllRecordsResponse,
9
+ GetComplexQMLQueryResponse,
10
+ GetComplexQueryResponse,
11
+ GetSingleRecordResponse,
12
+ QueryApiAggregateResponse,
13
+ QueryApiResponse,
14
+ SingleDataRequestResponse,
15
+ )
16
+ from .models.models import (
17
+ ComplexQMLQueryRecords,
18
+ ComplexQueryRecords,
19
+ QueryApiAggregate,
20
+ SubmissionResult,
21
+ )
22
+
23
+ __all__: list[str] = [
24
+ "DataRequestsService",
25
+ "SingleDataRequestResponse",
26
+ "GetAllRecordsResponse",
27
+ "GetSingleRecordResponse",
28
+ "GetComplexQueryResponse",
29
+ "QueryApiResponse",
30
+ "QueryApiAggregateResponse",
31
+ "GetComplexQMLQueryResponse",
32
+ "SubmissionResult",
33
+ "ComplexQueryRecords",
34
+ "QueryApiAggregate",
35
+ "ComplexQMLQueryRecords",
36
+ "models",
37
+ ]
38
+
39
+
40
+ def __getattr__(name: str) -> types.ModuleType:
41
+ if name == "models":
42
+ mod = import_module(f"{__name__}.models")
43
+ globals()[name] = mod
44
+ return mod
45
+ raise AttributeError(name)
46
+
47
+
48
+ if TYPE_CHECKING: # pragma: no cover
49
+ from . import models