datacrunch 1.14.0__tar.gz → 1.16.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 (76) hide show
  1. {datacrunch-1.14.0 → datacrunch-1.16.0}/PKG-INFO +46 -72
  2. {datacrunch-1.14.0 → datacrunch-1.16.0}/README.md +30 -41
  3. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/InferenceClient/inference_client.py +200 -65
  4. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/__init__.py +2 -0
  5. datacrunch-1.16.0/datacrunch/_version.py +6 -0
  6. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/authentication/authentication.py +7 -14
  7. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/balance/balance.py +1 -3
  8. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/constants.py +19 -17
  9. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/containers/containers.py +151 -123
  10. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/datacrunch.py +18 -18
  11. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/helpers.py +7 -2
  12. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/http_client/http_client.py +14 -14
  13. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/images/images.py +9 -3
  14. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/instance_types/instance_types.py +42 -35
  15. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/instances/instances.py +74 -53
  16. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/locations/locations.py +1 -2
  17. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/ssh_keys/ssh_keys.py +3 -4
  18. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/startup_scripts/startup_scripts.py +10 -8
  19. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/volume_types/volume_types.py +10 -8
  20. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/volumes/volumes.py +60 -73
  21. datacrunch-1.16.0/pyproject.toml +56 -0
  22. datacrunch-1.14.0/LICENSE +0 -21
  23. datacrunch-1.14.0/datacrunch/__version__.py +0 -1
  24. datacrunch-1.14.0/datacrunch.egg-info/PKG-INFO +0 -208
  25. datacrunch-1.14.0/datacrunch.egg-info/SOURCES.txt +0 -72
  26. datacrunch-1.14.0/datacrunch.egg-info/dependency_links.txt +0 -1
  27. datacrunch-1.14.0/datacrunch.egg-info/requires.txt +0 -10
  28. datacrunch-1.14.0/datacrunch.egg-info/top_level.txt +0 -2
  29. datacrunch-1.14.0/setup.cfg +0 -4
  30. datacrunch-1.14.0/setup.py +0 -44
  31. datacrunch-1.14.0/tests/__init__.py +0 -0
  32. datacrunch-1.14.0/tests/integration_tests/__init__.py +0 -0
  33. datacrunch-1.14.0/tests/integration_tests/conftest.py +0 -20
  34. datacrunch-1.14.0/tests/integration_tests/test_instances.py +0 -36
  35. datacrunch-1.14.0/tests/integration_tests/test_locations.py +0 -65
  36. datacrunch-1.14.0/tests/integration_tests/test_volumes.py +0 -94
  37. datacrunch-1.14.0/tests/unit_tests/__init__.py +0 -0
  38. datacrunch-1.14.0/tests/unit_tests/authentication/__init__.py +0 -0
  39. datacrunch-1.14.0/tests/unit_tests/authentication/test_authentication.py +0 -202
  40. datacrunch-1.14.0/tests/unit_tests/balance/__init__.py +0 -0
  41. datacrunch-1.14.0/tests/unit_tests/balance/test_balance.py +0 -25
  42. datacrunch-1.14.0/tests/unit_tests/conftest.py +0 -21
  43. datacrunch-1.14.0/tests/unit_tests/containers/__init__.py +0 -1
  44. datacrunch-1.14.0/tests/unit_tests/containers/test_containers.py +0 -959
  45. datacrunch-1.14.0/tests/unit_tests/http_client/__init__.py +0 -0
  46. datacrunch-1.14.0/tests/unit_tests/http_client/test_http_client.py +0 -193
  47. datacrunch-1.14.0/tests/unit_tests/images/__init__.py +0 -0
  48. datacrunch-1.14.0/tests/unit_tests/images/test_images.py +0 -41
  49. datacrunch-1.14.0/tests/unit_tests/instance_types/__init__.py +0 -0
  50. datacrunch-1.14.0/tests/unit_tests/instance_types/test_instance_types.py +0 -87
  51. datacrunch-1.14.0/tests/unit_tests/instances/__init__.py +0 -0
  52. datacrunch-1.14.0/tests/unit_tests/instances/test_instances.py +0 -483
  53. datacrunch-1.14.0/tests/unit_tests/ssh_keys/__init__.py +0 -0
  54. datacrunch-1.14.0/tests/unit_tests/ssh_keys/test_ssh_keys.py +0 -198
  55. datacrunch-1.14.0/tests/unit_tests/startup_scripts/__init__.py +0 -0
  56. datacrunch-1.14.0/tests/unit_tests/startup_scripts/test_startup_scripts.py +0 -196
  57. datacrunch-1.14.0/tests/unit_tests/test_datacrunch.py +0 -65
  58. datacrunch-1.14.0/tests/unit_tests/test_exceptions.py +0 -33
  59. datacrunch-1.14.0/tests/unit_tests/volume_types/__init__.py +0 -0
  60. datacrunch-1.14.0/tests/unit_tests/volume_types/test_volume_types.py +0 -50
  61. datacrunch-1.14.0/tests/unit_tests/volumes/__init__.py +0 -0
  62. datacrunch-1.14.0/tests/unit_tests/volumes/test_volumes.py +0 -641
  63. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/InferenceClient/__init__.py +0 -0
  64. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/authentication/__init__.py +0 -0
  65. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/balance/__init__.py +0 -0
  66. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/containers/__init__.py +0 -0
  67. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/exceptions.py +0 -0
  68. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/http_client/__init__.py +0 -0
  69. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/images/__init__.py +0 -0
  70. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/instance_types/__init__.py +0 -0
  71. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/instances/__init__.py +0 -0
  72. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/locations/__init__.py +0 -0
  73. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/ssh_keys/__init__.py +0 -0
  74. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/startup_scripts/__init__.py +0 -0
  75. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/volume_types/__init__.py +0 -0
  76. {datacrunch-1.14.0 → datacrunch-1.16.0}/datacrunch/volumes/__init__.py +0 -0
@@ -1,42 +1,27 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: datacrunch
3
- Version: 1.14.0
3
+ Version: 1.16.0
4
4
  Summary: Official Python SDK for DataCrunch Public API
5
- Home-page: https://github.com/DataCrunch-io
6
5
  Author: DataCrunch Oy
7
- Author-email: info@datacrunch.io
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.10
10
- Classifier: Programming Language :: Python :: 3.11
11
- Classifier: Programming Language :: Python :: 3.12
12
- Classifier: Programming Language :: Python :: 3.13
6
+ Author-email: DataCrunch Oy <info@datacrunch.io>
13
7
  Classifier: Development Status :: 5 - Production/Stable
14
8
  Classifier: Intended Audience :: Developers
15
9
  Classifier: License :: OSI Approved :: MIT License
16
- Classifier: Operating System :: OS Independent
17
10
  Classifier: Natural Language :: English
18
- Requires-Python: >=3.10
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Requires-Dist: requests>=2.25.1,<3
18
+ Requires-Dist: dataclasses-json>=0.6.7
19
+ Requires-Python: >=3.11
20
+ Project-URL: Changelog, https://datacrunch-python.readthedocs.io/en/latest/changelog.html
21
+ Project-URL: Documentation, https://datacrunch-python.readthedocs.io/
22
+ Project-URL: Homepage, https://github.com/DataCrunch-io
23
+ Project-URL: Repository, https://github.com/DataCrunch-io/datacrunch-python
19
24
  Description-Content-Type: text/markdown
20
- License-File: LICENSE
21
- Requires-Dist: requests<3,>=2.25.1
22
- Requires-Dist: dataclasses_json>=0.6.7
23
- Provides-Extra: dev
24
- Provides-Extra: test
25
- Requires-Dist: pytest<7,>=6.2.1; extra == "test"
26
- Requires-Dist: pytest-cov<3,>=2.10.1; extra == "test"
27
- Requires-Dist: pytest-responses<1,>=0.4.0; extra == "test"
28
- Requires-Dist: responses<1,>=0.12.1; extra == "test"
29
- Dynamic: author
30
- Dynamic: author-email
31
- Dynamic: classifier
32
- Dynamic: description
33
- Dynamic: description-content-type
34
- Dynamic: home-page
35
- Dynamic: license-file
36
- Dynamic: provides-extra
37
- Dynamic: requires-dist
38
- Dynamic: requires-python
39
- Dynamic: summary
40
25
 
41
26
  # DataCrunch Python SDK
42
27
 
@@ -56,10 +41,14 @@ DataCrunch's Public API documentation [is available here](https://api.datacrunch
56
41
 
57
42
  ## Getting Started - Using the SDK:
58
43
 
59
- - Install via pip:
44
+ - Install:
60
45
 
61
46
  ```bash
47
+ # via pip
62
48
  pip3 install datacrunch
49
+
50
+ # via uv
51
+ uv add datacrunch
63
52
  ```
64
53
 
65
54
  - Generate your client credentials - [instructions in the public API docs](https://api.datacrunch.io/v1/docs#description/quick-start-guide).
@@ -122,63 +111,53 @@ DataCrunch's Public API documentation [is available here](https://api.datacrunch
122
111
 
123
112
  ## Development
124
113
 
125
- ### Setting up the local development environment
126
-
127
- - Clone the repository:
128
-
129
- ```bash
130
- git clone
131
- ```
132
-
133
- - Create local virtual environment:
114
+ ### Set up the local development environment
134
115
 
135
- ```bash
136
- python3 -m venv datacrunch_env && source ./datacrunch_env/bin/activate
137
- ```
138
-
139
- or if using [fish shell](https://fishshell.com/):
140
-
141
- ```fish
142
- python3 -m venv datacrunch_env && source ./datacrunch_env/bin/activate.fish
143
- ```
116
+ Prerequisite: install [`uv`](https://docs.astral.sh/uv/).
144
117
 
145
- - Install Dependencies:
118
+ Clone the repository, create local environment and install dependencies:
146
119
 
147
120
  ```bash
148
- pip3 install -e .[test]
149
- pip3 install -U pytest
121
+ git clone git@github.com:DataCrunch-io/datacrunch-python.git
122
+ cd datacrunch-python
123
+ uv sync
150
124
  ```
151
125
 
152
- ### Running Tests
126
+ ### Run Tests
153
127
 
154
- We use pytest for testing.
155
-
156
- - To execute all tests
128
+ - Execute all tests
157
129
 
158
130
  ```bash
159
- pytest
131
+ uv run pytest
160
132
  ```
161
133
 
162
- - To execute a single test file
134
+ - Execute a single test file
163
135
 
164
136
  ```bash
165
- pytest ./tests/unit_tests/test_file.py
137
+ uv run pytest tests/unit_tests/test_file.py
166
138
  ```
167
139
 
168
140
  ### Local Manual Testing
169
141
 
170
- Create this file in the root directory of the project:
142
+ Create a file in the root directory of the project:
171
143
 
172
144
  ```python
145
+ # example.py
173
146
  from datacrunch.datacrunch import DataCrunchClient
174
147
 
175
148
  CLIENT_SECRET = 'secret'
176
149
  CLIENT_ID = 'your-id'
177
150
 
178
- # Create datcrunch client
151
+ # Create datacrunch client
179
152
  datacrunch = DataCrunchClient(CLIENT_ID, CLIENT_SECRET, base_url='http://localhost:3001/v1')
180
153
  ```
181
154
 
155
+ Run it:
156
+
157
+ ```bash
158
+ uv run python example.py
159
+ ```
160
+
182
161
  ### Generating the documentation
183
162
 
184
163
  If added a new service, create a documentation template under api/services for that service.
@@ -188,19 +167,14 @@ cd docs
188
167
  make html
189
168
  ```
190
169
 
191
- ### Style Guide
192
-
193
- Use autopep8 for auto code formatting:
170
+ ### Code style
194
171
 
195
172
  ```bash
196
- # Install
197
- pip3 install autopep8
198
-
199
- # Apply to an entire directory
200
- autopep8 directory_name --recursive --in-place --pep8-passes 2000 --verbose
173
+ # Lint
174
+ uv run ruff check
201
175
 
202
- # Or a single file
203
- autopep8 file.py --in-place
176
+ # Format code
177
+ uv run ruff format
204
178
  ```
205
179
 
206
180
  ## Contact
@@ -16,10 +16,14 @@ DataCrunch's Public API documentation [is available here](https://api.datacrunch
16
16
 
17
17
  ## Getting Started - Using the SDK:
18
18
 
19
- - Install via pip:
19
+ - Install:
20
20
 
21
21
  ```bash
22
+ # via pip
22
23
  pip3 install datacrunch
24
+
25
+ # via uv
26
+ uv add datacrunch
23
27
  ```
24
28
 
25
29
  - Generate your client credentials - [instructions in the public API docs](https://api.datacrunch.io/v1/docs#description/quick-start-guide).
@@ -82,63 +86,53 @@ DataCrunch's Public API documentation [is available here](https://api.datacrunch
82
86
 
83
87
  ## Development
84
88
 
85
- ### Setting up the local development environment
86
-
87
- - Clone the repository:
88
-
89
- ```bash
90
- git clone
91
- ```
92
-
93
- - Create local virtual environment:
94
-
95
- ```bash
96
- python3 -m venv datacrunch_env && source ./datacrunch_env/bin/activate
97
- ```
98
-
99
- or if using [fish shell](https://fishshell.com/):
89
+ ### Set up the local development environment
100
90
 
101
- ```fish
102
- python3 -m venv datacrunch_env && source ./datacrunch_env/bin/activate.fish
103
- ```
91
+ Prerequisite: install [`uv`](https://docs.astral.sh/uv/).
104
92
 
105
- - Install Dependencies:
93
+ Clone the repository, create local environment and install dependencies:
106
94
 
107
95
  ```bash
108
- pip3 install -e .[test]
109
- pip3 install -U pytest
96
+ git clone git@github.com:DataCrunch-io/datacrunch-python.git
97
+ cd datacrunch-python
98
+ uv sync
110
99
  ```
111
100
 
112
- ### Running Tests
113
-
114
- We use pytest for testing.
101
+ ### Run Tests
115
102
 
116
- - To execute all tests
103
+ - Execute all tests
117
104
 
118
105
  ```bash
119
- pytest
106
+ uv run pytest
120
107
  ```
121
108
 
122
- - To execute a single test file
109
+ - Execute a single test file
123
110
 
124
111
  ```bash
125
- pytest ./tests/unit_tests/test_file.py
112
+ uv run pytest tests/unit_tests/test_file.py
126
113
  ```
127
114
 
128
115
  ### Local Manual Testing
129
116
 
130
- Create this file in the root directory of the project:
117
+ Create a file in the root directory of the project:
131
118
 
132
119
  ```python
120
+ # example.py
133
121
  from datacrunch.datacrunch import DataCrunchClient
134
122
 
135
123
  CLIENT_SECRET = 'secret'
136
124
  CLIENT_ID = 'your-id'
137
125
 
138
- # Create datcrunch client
126
+ # Create datacrunch client
139
127
  datacrunch = DataCrunchClient(CLIENT_ID, CLIENT_SECRET, base_url='http://localhost:3001/v1')
140
128
  ```
141
129
 
130
+ Run it:
131
+
132
+ ```bash
133
+ uv run python example.py
134
+ ```
135
+
142
136
  ### Generating the documentation
143
137
 
144
138
  If added a new service, create a documentation template under api/services for that service.
@@ -148,19 +142,14 @@ cd docs
148
142
  make html
149
143
  ```
150
144
 
151
- ### Style Guide
152
-
153
- Use autopep8 for auto code formatting:
145
+ ### Code style
154
146
 
155
147
  ```bash
156
- # Install
157
- pip3 install autopep8
158
-
159
- # Apply to an entire directory
160
- autopep8 directory_name --recursive --in-place --pep8-passes 2000 --verbose
148
+ # Lint
149
+ uv run ruff check
161
150
 
162
- # Or a single file
163
- autopep8 file.py --in-place
151
+ # Format code
152
+ uv run ruff format
164
153
  ```
165
154
 
166
155
  ## Contact