datacrunch 1.8.4__py3-none-any.whl → 1.9.0__py3-none-any.whl

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.
datacrunch/__version__.py CHANGED
@@ -1 +1 @@
1
- VERSION = '1.8.4'
1
+ VERSION = '1.9.0'
@@ -19,6 +19,7 @@ class EnvVarType(str, Enum):
19
19
  class VolumeMountType(str, Enum):
20
20
  SCRATCH = "scratch"
21
21
  SECRET = "secret"
22
+ MEMORY = "memory"
22
23
 
23
24
 
24
25
  class ContainerRegistryType(str, Enum):
@@ -82,16 +83,18 @@ class EnvVar:
82
83
  type: EnvVarType
83
84
 
84
85
 
85
- @dataclass_json
86
+ @dataclass_json(undefined=Undefined.EXCLUDE)
86
87
  @dataclass
87
88
  class VolumeMount:
88
89
  """Volume mount configuration for containers.
89
90
 
90
91
  :param type: Type of volume mount
91
92
  :param mount_path: Path where the volume should be mounted in the container
93
+ :param size_in_mb: Size of the volume in megabytes, only used for memory volume mounts
92
94
  """
93
95
  type: VolumeMountType
94
96
  mount_path: str
97
+ size_in_mb: Optional[int] = None
95
98
 
96
99
 
97
100
  @dataclass_json
datacrunch/datacrunch.py CHANGED
@@ -28,6 +28,11 @@ class DataCrunchClient:
28
28
  :type base_url: str, optional
29
29
  """
30
30
 
31
+ # Validate that client_id and client_secret are not empty
32
+ if not client_id or not client_secret:
33
+ raise ValueError(
34
+ "client_id and client_secret must be provided")
35
+
31
36
  # Constants
32
37
  self.constants: Constants = Constants(base_url, VERSION)
33
38
  """Constants"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datacrunch
3
- Version: 1.8.4
3
+ Version: 1.9.0
4
4
  Summary: Official Python SDK for DataCrunch Public API
5
5
  Home-page: https://github.com/DataCrunch-io
6
6
  Author: DataCrunch Oy
@@ -95,7 +95,7 @@ DataCrunch's Public API documentation [is available here](https://api.datacrunch
95
95
 
96
96
  # Create a new instance
97
97
  instance = datacrunch.instances.create(instance_type='1V100.6V',
98
- image='fastai',
98
+ image='ubuntu-24.04-cuda-12.8-open-docker',
99
99
  ssh_key_ids=ssh_keys,
100
100
  hostname='example',
101
101
  description='example instance')
@@ -1,7 +1,7 @@
1
1
  datacrunch/__init__.py,sha256=OG-5Avmuq3NXyBs_66GMwyzscUi0c-T6vWW5sRIfnZg,51
2
- datacrunch/__version__.py,sha256=4aShRnfq_Rqgd3V8ZISSenGrk6YuI8eKu_QYuYfdtkc,18
2
+ datacrunch/__version__.py,sha256=58-Fb713uAJBiX5-gvhAAIVJjkiaNpMyZZ3a3h8lBjM,18
3
3
  datacrunch/constants.py,sha256=uBtS1kTe6ip5oWzA4SKAVftdapkKwUU45GdLYOuBzAA,2354
4
- datacrunch/datacrunch.py,sha256=lRDasgf_PG_RUFLxSSJZQ4zdV8N-TNlJ1moAwUXYqqI,3141
4
+ datacrunch/datacrunch.py,sha256=rEdnz8ZsBZRY6WPhSjokmVZ2KNlDHOaZ5Nx2kjD5Tuo,3349
5
5
  datacrunch/exceptions.py,sha256=uOP_YU2HEUi_mcMxQ9WYrIjqWUuUrwdube-RdL1C4Ps,781
6
6
  datacrunch/helpers.py,sha256=Eq5htNxpJUCJG9D6QxbnWwch3ppmi2lfi-rFCGXf3fs,634
7
7
  datacrunch/authentication/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -9,7 +9,7 @@ datacrunch/authentication/authentication.py,sha256=CThTxA99jseh7TKIdUR1M9RErIJoX
9
9
  datacrunch/balance/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  datacrunch/balance/balance.py,sha256=rkqqXC3MLVxk6ym9Hlp9tsLbLWJculIn8q3BYbsme28,1240
11
11
  datacrunch/containers/__init__.py,sha256=T9ROCN-a3rQfboTk3mol4OUhi6FMo5wUqahJZOBg0uw,675
12
- datacrunch/containers/containers.py,sha256=lFTxgTMRAnlYxTFUFbnY1uTiDgNhQVHOgqosm2I1iP4,24147
12
+ datacrunch/containers/containers.py,sha256=ejWGmfNc2jpiSFzxpzO-w-tsJ383zmL5g8FL6RJ-fuU,24326
13
13
  datacrunch/http_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  datacrunch/http_client/http_client.py,sha256=tmpVd3p7-NAIaTM4E13inFZWUetdVEFZnRE38p5eVk0,8285
15
15
  datacrunch/images/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -28,7 +28,7 @@ datacrunch/volume_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
28
28
  datacrunch/volume_types/volume_types.py,sha256=CNJ8kfd_nxmF99x-UAJeku-uN4Gdh-yg15Aa8WGLgWU,1828
29
29
  datacrunch/volumes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  datacrunch/volumes/volumes.py,sha256=aAH4UIVG-7NehjHu-a_4MGSdZ1jmeApV-kKh-X6TB-s,11908
31
- datacrunch-1.8.4.dist-info/licenses/LICENSE,sha256=LkdhbR2MArjDfV8M0dySL5mG_kfzxF2ntMgbJvWGyUQ,1069
31
+ datacrunch-1.9.0.dist-info/licenses/LICENSE,sha256=LkdhbR2MArjDfV8M0dySL5mG_kfzxF2ntMgbJvWGyUQ,1069
32
32
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  tests/integration_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  tests/integration_tests/conftest.py,sha256=PWf6K1G3NoddebmDIy_Pk02dHQrEKfrNxpWwqE8Eqrk,546
@@ -52,7 +52,7 @@ tests/unit_tests/images/test_images.py,sha256=Tbsu5U1bUoD66ATibUWmipDmHYvhScI2XR
52
52
  tests/unit_tests/instance_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  tests/unit_tests/instance_types/test_instance_types.py,sha256=DHpzSDG91Y8BOT5OVq5sKoO-akKRBK-X04c6_35HtGQ,3310
54
54
  tests/unit_tests/instances/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
- tests/unit_tests/instances/test_instances.py,sha256=UYClrgJV76IX32Y-ATUgorCoKjjqIsa9MQ04If6RXM4,16892
55
+ tests/unit_tests/instances/test_instances.py,sha256=Gc4Krp0CbqbjA6dIMv5ekw1e4tSlzWF9wZOLZgFp2jU,16920
56
56
  tests/unit_tests/ssh_keys/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
57
  tests/unit_tests/ssh_keys/test_ssh_keys.py,sha256=PsFSfgIhD2Jfg4w3BPu7LH7g40EnyDUIuE-xxOq7YlI,5741
58
58
  tests/unit_tests/startup_scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -61,7 +61,7 @@ tests/unit_tests/volume_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
61
61
  tests/unit_tests/volume_types/test_volume_types.py,sha256=vGuC3dWjhQLD8bTYgw_we3dZ6vlUKRmKZbb9yCfhe0w,1386
62
62
  tests/unit_tests/volumes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
63
  tests/unit_tests/volumes/test_volumes.py,sha256=p53eSIHddWKL7U9oLLTnxo849LrJSoi6A5lpWF6ydHs,20672
64
- datacrunch-1.8.4.dist-info/METADATA,sha256=D-L-XpHYSNi_UUCqi7pOQrsImHwt9qfZVD7L8LGppqI,5872
65
- datacrunch-1.8.4.dist-info/WHEEL,sha256=DK49LOLCYiurdXXOXwGJm6U4DkHkg4lcxjhqwRa0CP4,91
66
- datacrunch-1.8.4.dist-info/top_level.txt,sha256=FvH4EZJkbUxNm-aKx0RjmWwnduAMpfRT13Fo123i7yE,17
67
- datacrunch-1.8.4.dist-info/RECORD,,
64
+ datacrunch-1.9.0.dist-info/METADATA,sha256=0-DQwCKjoHf40JExe5XMTRG9SM53BBxytglIFDyZUe4,5900
65
+ datacrunch-1.9.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
66
+ datacrunch-1.9.0.dist-info/top_level.txt,sha256=FvH4EZJkbUxNm-aKx0RjmWwnduAMpfRT13Fo123i7yE,17
67
+ datacrunch-1.9.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.0.2)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -13,7 +13,7 @@ SSH_KEY_ID = '12345dc1-a5d2-4972-ae4e-d429115d055b'
13
13
  OS_VOLUME_ID = '46fc0247-8f65-4d8a-ad73-852a8b3dc1d3'
14
14
 
15
15
  INSTANCE_TYPE = "1V100.6V"
16
- INSTANCE_IMAGE = "fastai"
16
+ INSTANCE_IMAGE = "ubuntu-24.04-cuda-12.8-open-docker"
17
17
  INSTANCE_HOSTNAME = "I'll be your host for today"
18
18
  INSTANCE_DESCRIPTION = "hope you enjoy your GPU"
19
19
  INSTANCE_STATUS = 'running'