trainml 0.5.15__py3-none-any.whl → 0.5.16__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.
trainml/__init__.py CHANGED
@@ -13,5 +13,5 @@ logging.basicConfig(
13
13
  logger = logging.getLogger(__name__)
14
14
 
15
15
 
16
- __version__ = "0.5.15"
16
+ __version__ = "0.5.16"
17
17
  __all__ = "TrainML"
@@ -2,6 +2,7 @@ import json
2
2
  import logging
3
3
  import asyncio
4
4
  import math
5
+ from enum import Enum
5
6
 
6
7
  from trainml.exceptions import (
7
8
  ApiError,
@@ -9,6 +10,14 @@ from trainml.exceptions import (
9
10
  TrainMLException,
10
11
  )
11
12
 
13
+ class SERVICE_CERT_ALGORITHMS(str, Enum):
14
+ RSA_2048 = 'rsa2048'
15
+ RSA_4096 = 'rsa4096'
16
+ ED25519 = 'ed25519'
17
+ P256 = 'p256'
18
+ P384 ='p384'
19
+ P521='p521'
20
+
12
21
 
13
22
  class Services(object):
14
23
  def __init__(self, trainml):
@@ -178,11 +187,12 @@ class Service:
178
187
 
179
188
  raise TrainMLException(f"Timeout waiting for {status}")
180
189
 
181
- async def generate_certificate(self, **kwargs):
190
+ async def generate_certificate(self, algorithm=SERVICE_CERT_ALGORITHMS.ED25519.value, **kwargs):
182
191
  resp = await self.trainml._query(
183
192
  f"/provider/{self._provider_uuid}/region/{self._region_uuid}/service/{self._id}/certificate",
184
193
  "POST",
185
- kwargs
194
+ kwargs,
195
+ dict(algorithm=algorithm)
186
196
  )
187
197
  self.__init__(self.trainml, **resp)
188
198
  return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trainml
3
- Version: 0.5.15
3
+ Version: 0.5.16
4
4
  Summary: trainML client SDK and command line utilities
5
5
  Home-page: https://github.com/trainML/trainml-cli
6
6
  Author: trainML
@@ -78,7 +78,7 @@ tests/unit/projects/test_project_members_unit.py,sha256=C5N6jzT7zM3eL3_bXEddddBH
78
78
  tests/unit/projects/test_project_secrets_unit.py,sha256=StVlY-ZR3CKxXAt9NL8hTkXUEdgGESH0m6foEPXKE-4,3276
79
79
  tests/unit/projects/test_project_services_unit.py,sha256=ZK5nz78RAmmaCrAwYBd34t87dh6etU-7snLB_xukZHM,3331
80
80
  tests/unit/projects/test_projects_unit.py,sha256=8rJ40bJ7YszEsoL6D02Muey-sgRjqFmMoR-R3IiP_Ig,3810
81
- trainml/__init__.py,sha256=yxX-2bQsXFk3KgMV8b7day_Wz6qy6Ag4kOHvcMCv15k,433
81
+ trainml/__init__.py,sha256=5RqjjlFqQb0tJN9ZO6I5XfCCpFj5SC32ic8y55SYHOM,433
82
82
  trainml/__main__.py,sha256=JgErYkiskih8Y6oRwowALtR-rwQhAAdqOYWjQraRIPI,59
83
83
  trainml/auth.py,sha256=clbx5S5prJ3u62aEESdBXIHF_HmreQ-L1ShxcyWQNDs,26565
84
84
  trainml/checkpoints.py,sha256=Hg3_Si7ohzsv4_8JIjoj9pMRpHNZRWKC5R2gtgmp01s,8790
@@ -124,7 +124,7 @@ trainml/cloudbender/devices.py,sha256=QORNmKdLJoqGZmeWXRnivC1JmNBIw-ebvf4bsoem3r
124
124
  trainml/cloudbender/nodes.py,sha256=U2sTIL2fuBVsNFPsJrvB2JbBcuLULF1-AwJ4dp5ChmM,5924
125
125
  trainml/cloudbender/providers.py,sha256=22ymUl1KLC8UlyoWMsIrOKhUDOwnhklhHQ3EZ_V6eWA,3738
126
126
  trainml/cloudbender/regions.py,sha256=nfSY9fIWp_AaRE_1Y0qwXX6WVSyPKxpji-zUfM3BNUo,5157
127
- trainml/cloudbender/services.py,sha256=bJtp9ljq8g10r-04phV_XXS8mS8YR3KMbJ4XtHa2SOI,5773
127
+ trainml/cloudbender/services.py,sha256=j--8V_JtzhOrWDFXcuyQCZoSdxYKaNtpxTV9qTsva5E,6051
128
128
  trainml/projects/__init__.py,sha256=6NKCcHtQMeGB1IyU-djANphfnDX6MEkrXUM5Fyq9fWg,75
129
129
  trainml/projects/credentials.py,sha256=6WqHy_-SZZwqE4rULLF8gSyeRVmfsUxqZBuCjBXyxKw,2255
130
130
  trainml/projects/data_connectors.py,sha256=WZATdUq4vE3x47Ny5HDwPD7lIUx0syjaSE9BmFWNuEg,2216
@@ -133,9 +133,9 @@ trainml/projects/members.py,sha256=7fptZ2leIQEUiRtvd3z15RTOJyPafzc5wwQLNxICElQ,2
133
133
  trainml/projects/projects.py,sha256=5_6HUg9ZYq8v69QPgC4Yfd_DM0OlZd8tnxh2ahjOgm0,2890
134
134
  trainml/projects/secrets.py,sha256=TIvBd3rAvd4lF3pm5qR98UslHjldzlnzn_n9yvpmLgg,2160
135
135
  trainml/projects/services.py,sha256=rI-uFmojqOTNLbqBeX6gaSwMkI6LKzRuJthQCH0A2h4,2771
136
- trainml-0.5.15.dist-info/LICENSE,sha256=s0lpBxhSSUEpMavwde-Vb6K_K7xDCTTvSpNznVqVGR0,1069
137
- trainml-0.5.15.dist-info/METADATA,sha256=kFbUgFw2pcOjJgySdhnKmVrkVpkFMI6mtVrN7t26yXA,7346
138
- trainml-0.5.15.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
139
- trainml-0.5.15.dist-info/entry_points.txt,sha256=OzBDm2wXby1bSGF02jTVxzRFZLejnbFiLHXhKdW3Bds,63
140
- trainml-0.5.15.dist-info/top_level.txt,sha256=Y1kLFRWKUW7RG8BX7cvejHF_yW8wBOaRYF1JQHENY4w,23
141
- trainml-0.5.15.dist-info/RECORD,,
136
+ trainml-0.5.16.dist-info/LICENSE,sha256=s0lpBxhSSUEpMavwde-Vb6K_K7xDCTTvSpNznVqVGR0,1069
137
+ trainml-0.5.16.dist-info/METADATA,sha256=GDO0AdwQL4W28hICeO73fSvtQLu062dl-qyx3CrMSpY,7346
138
+ trainml-0.5.16.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
139
+ trainml-0.5.16.dist-info/entry_points.txt,sha256=OzBDm2wXby1bSGF02jTVxzRFZLejnbFiLHXhKdW3Bds,63
140
+ trainml-0.5.16.dist-info/top_level.txt,sha256=Y1kLFRWKUW7RG8BX7cvejHF_yW8wBOaRYF1JQHENY4w,23
141
+ trainml-0.5.16.dist-info/RECORD,,