anyscale 0.24.87__py3-none-any.whl → 0.24.88__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.
- anyscale/__init__.py +10 -0
- anyscale/_private/anyscale_client/anyscale_client.py +10 -0
- anyscale/_private/anyscale_client/common.py +9 -0
- anyscale/_private/anyscale_client/fake_anyscale_client.py +28 -0
- anyscale/_private/docgen/__main__.py +12 -0
- anyscale/_private/docgen/generator.py +1 -0
- anyscale/client/README.md +4 -1
- anyscale/client/openapi_client/__init__.py +3 -1
- anyscale/client/openapi_client/api/default_api.py +191 -5
- anyscale/client/openapi_client/models/__init__.py +3 -1
- anyscale/client/openapi_client/models/admin_create_user.py +255 -0
- anyscale/client/openapi_client/models/admin_created_user.py +281 -0
- anyscale/client/openapi_client/models/{paging_context.py → admincreateduser_list_response.py} +38 -63
- anyscale/client/openapi_client/models/aggregated_usage_query.py +1 -29
- anyscale/commands/command_examples.py +6 -0
- anyscale/commands/user_commands.py +49 -0
- anyscale/scripts.py +2 -0
- anyscale/user/__init__.py +35 -0
- anyscale/user/_private/user_sdk.py +32 -0
- anyscale/user/commands.py +42 -0
- anyscale/user/models.py +191 -0
- anyscale/version.py +1 -1
- {anyscale-0.24.87.dist-info → anyscale-0.24.88.dist-info}/METADATA +1 -1
- {anyscale-0.24.87.dist-info → anyscale-0.24.88.dist-info}/RECORD +29 -22
- {anyscale-0.24.87.dist-info → anyscale-0.24.88.dist-info}/LICENSE +0 -0
- {anyscale-0.24.87.dist-info → anyscale-0.24.88.dist-info}/NOTICE +0 -0
- {anyscale-0.24.87.dist-info → anyscale-0.24.88.dist-info}/WHEEL +0 -0
- {anyscale-0.24.87.dist-info → anyscale-0.24.88.dist-info}/entry_points.txt +0 -0
- {anyscale-0.24.87.dist-info → anyscale-0.24.88.dist-info}/top_level.txt +0 -0
|
@@ -35,7 +35,6 @@ class AggregatedUsageQuery(object):
|
|
|
35
35
|
openapi_types = {
|
|
36
36
|
'start_date': 'date',
|
|
37
37
|
'end_date': 'date',
|
|
38
|
-
'paging': 'PagingContext',
|
|
39
38
|
'name_contains': 'str',
|
|
40
39
|
'group_by_date': 'bool',
|
|
41
40
|
'asc': 'bool'
|
|
@@ -44,13 +43,12 @@ class AggregatedUsageQuery(object):
|
|
|
44
43
|
attribute_map = {
|
|
45
44
|
'start_date': 'start_date',
|
|
46
45
|
'end_date': 'end_date',
|
|
47
|
-
'paging': 'paging',
|
|
48
46
|
'name_contains': 'name_contains',
|
|
49
47
|
'group_by_date': 'group_by_date',
|
|
50
48
|
'asc': 'asc'
|
|
51
49
|
}
|
|
52
50
|
|
|
53
|
-
def __init__(self, start_date=None, end_date=None,
|
|
51
|
+
def __init__(self, start_date=None, end_date=None, name_contains=None, group_by_date=False, asc=False, local_vars_configuration=None): # noqa: E501
|
|
54
52
|
"""AggregatedUsageQuery - a model defined in OpenAPI""" # noqa: E501
|
|
55
53
|
if local_vars_configuration is None:
|
|
56
54
|
local_vars_configuration = Configuration()
|
|
@@ -58,7 +56,6 @@ class AggregatedUsageQuery(object):
|
|
|
58
56
|
|
|
59
57
|
self._start_date = None
|
|
60
58
|
self._end_date = None
|
|
61
|
-
self._paging = None
|
|
62
59
|
self._name_contains = None
|
|
63
60
|
self._group_by_date = None
|
|
64
61
|
self._asc = None
|
|
@@ -66,8 +63,6 @@ class AggregatedUsageQuery(object):
|
|
|
66
63
|
|
|
67
64
|
self.start_date = start_date
|
|
68
65
|
self.end_date = end_date
|
|
69
|
-
if paging is not None:
|
|
70
|
-
self.paging = paging
|
|
71
66
|
if name_contains is not None:
|
|
72
67
|
self.name_contains = name_contains
|
|
73
68
|
if group_by_date is not None:
|
|
@@ -125,29 +120,6 @@ class AggregatedUsageQuery(object):
|
|
|
125
120
|
|
|
126
121
|
self._end_date = end_date
|
|
127
122
|
|
|
128
|
-
@property
|
|
129
|
-
def paging(self):
|
|
130
|
-
"""Gets the paging of this AggregatedUsageQuery. # noqa: E501
|
|
131
|
-
|
|
132
|
-
Pagination information. # noqa: E501
|
|
133
|
-
|
|
134
|
-
:return: The paging of this AggregatedUsageQuery. # noqa: E501
|
|
135
|
-
:rtype: PagingContext
|
|
136
|
-
"""
|
|
137
|
-
return self._paging
|
|
138
|
-
|
|
139
|
-
@paging.setter
|
|
140
|
-
def paging(self, paging):
|
|
141
|
-
"""Sets the paging of this AggregatedUsageQuery.
|
|
142
|
-
|
|
143
|
-
Pagination information. # noqa: E501
|
|
144
|
-
|
|
145
|
-
:param paging: The paging of this AggregatedUsageQuery. # noqa: E501
|
|
146
|
-
:type: PagingContext
|
|
147
|
-
"""
|
|
148
|
-
|
|
149
|
-
self._paging = paging
|
|
150
|
-
|
|
151
123
|
@property
|
|
152
124
|
def name_contains(self):
|
|
153
125
|
"""Gets the name_contains of this AggregatedUsageQuery. # noqa: E501
|
|
@@ -493,3 +493,9 @@ Download complete! File saved to 'aggregated_instance_usage_2024-10-01_2024-10-0
|
|
|
493
493
|
0:00:01 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.4 kB / 79.4 kB Downloading aggregated instance usage CSV
|
|
494
494
|
(anyscale +2.2s) Downloaded CSV to aggregated_instance_usage_2024-10-01_2024-10-03.zip
|
|
495
495
|
"""
|
|
496
|
+
|
|
497
|
+
USER_BATCH_CREATE_EXAMPLE = """\
|
|
498
|
+
$ anyscale user batch-create --users-file users.yaml
|
|
499
|
+
(anyscale +0.5s) Creating users...
|
|
500
|
+
(anyscale +0.8s) 2 users created.
|
|
501
|
+
"""
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import click
|
|
2
|
+
|
|
3
|
+
import anyscale
|
|
4
|
+
from anyscale.cli_logger import BlockLogger
|
|
5
|
+
from anyscale.commands import command_examples
|
|
6
|
+
from anyscale.commands.util import AnyscaleCommand
|
|
7
|
+
from anyscale.user.models import AdminCreateUser, AdminCreateUsers
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
log = BlockLogger() # CLI Logger
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@click.group("user", help="Manage users.")
|
|
14
|
+
def user_cli() -> None:
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@user_cli.command(
|
|
19
|
+
name="batch-create",
|
|
20
|
+
cls=AnyscaleCommand,
|
|
21
|
+
example=command_examples.USER_BATCH_CREATE_EXAMPLE,
|
|
22
|
+
)
|
|
23
|
+
@click.option(
|
|
24
|
+
"--users-file",
|
|
25
|
+
"-f",
|
|
26
|
+
required=True,
|
|
27
|
+
type=str,
|
|
28
|
+
help="Path to a YAML file that contains the information for user accounts to be created.",
|
|
29
|
+
)
|
|
30
|
+
def admin_batch_create(users_file: str,) -> None:
|
|
31
|
+
"""
|
|
32
|
+
Batch create users without email verification as an admin.
|
|
33
|
+
"""
|
|
34
|
+
log.info("Creating users...")
|
|
35
|
+
|
|
36
|
+
create_users = AdminCreateUsers.from_yaml(users_file)
|
|
37
|
+
|
|
38
|
+
try:
|
|
39
|
+
created_users = anyscale.user.admin_batch_create(
|
|
40
|
+
admin_create_users=[
|
|
41
|
+
AdminCreateUser(**create_user)
|
|
42
|
+
for create_user in create_users.create_users
|
|
43
|
+
]
|
|
44
|
+
)
|
|
45
|
+
except ValueError as e:
|
|
46
|
+
log.error(f"Error creating users: {e}")
|
|
47
|
+
return
|
|
48
|
+
|
|
49
|
+
log.info(f"{len(created_users)} users created.")
|
anyscale/scripts.py
CHANGED
|
@@ -35,6 +35,7 @@ from anyscale.commands.schedule_commands import schedule_cli
|
|
|
35
35
|
from anyscale.commands.service_account_commands import service_account_cli
|
|
36
36
|
from anyscale.commands.service_commands import service_cli
|
|
37
37
|
from anyscale.commands.session_commands_hidden import session_cli
|
|
38
|
+
from anyscale.commands.user_commands import user_cli
|
|
38
39
|
from anyscale.commands.workspace_commands import workspace_cli
|
|
39
40
|
from anyscale.commands.workspace_commands_v2 import workspace_cli as workspace_cli_v2
|
|
40
41
|
import anyscale.conf
|
|
@@ -142,6 +143,7 @@ cli.add_command(machine_pool_cli)
|
|
|
142
143
|
cli.add_command(service_account_cli)
|
|
143
144
|
cli.add_command(resource_quota_cli)
|
|
144
145
|
cli.add_command(aggregated_instance_usage_cli)
|
|
146
|
+
cli.add_command(user_cli)
|
|
145
147
|
|
|
146
148
|
ALIASES = {
|
|
147
149
|
"h": anyscale_help,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from anyscale._private.anyscale_client import AnyscaleClientInterface
|
|
4
|
+
from anyscale._private.sdk import sdk_docs
|
|
5
|
+
from anyscale._private.sdk.base_sdk import Timer
|
|
6
|
+
from anyscale.cli_logger import BlockLogger
|
|
7
|
+
from anyscale.user._private.user_sdk import PrivateUserSDK
|
|
8
|
+
from anyscale.user.commands import (
|
|
9
|
+
_ADMIN_BATCH_CREATE_ARG_DOCSTRINGS,
|
|
10
|
+
_ADMIN_BATCH_CREATE_EXAMPLE,
|
|
11
|
+
admin_batch_create,
|
|
12
|
+
)
|
|
13
|
+
from anyscale.user.models import AdminCreatedUser, AdminCreateUser
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class UserSDK:
|
|
17
|
+
def __init__(
|
|
18
|
+
self,
|
|
19
|
+
*,
|
|
20
|
+
client: Optional[AnyscaleClientInterface] = None,
|
|
21
|
+
logger: Optional[BlockLogger] = None,
|
|
22
|
+
timer: Optional[Timer] = None,
|
|
23
|
+
):
|
|
24
|
+
self._private_sdk = PrivateUserSDK(client=client, logger=logger, timer=timer)
|
|
25
|
+
|
|
26
|
+
@sdk_docs(
|
|
27
|
+
doc_py_example=_ADMIN_BATCH_CREATE_EXAMPLE,
|
|
28
|
+
arg_docstrings=_ADMIN_BATCH_CREATE_ARG_DOCSTRINGS,
|
|
29
|
+
)
|
|
30
|
+
def admin_batch_create( # noqa: F811
|
|
31
|
+
self, admin_create_users: List[AdminCreateUser],
|
|
32
|
+
) -> List[AdminCreatedUser]:
|
|
33
|
+
"""Batch create users without email verification as an admin.
|
|
34
|
+
"""
|
|
35
|
+
return self._private_sdk.admin_batch_create(admin_create_users)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
|
|
3
|
+
from anyscale._private.sdk.base_sdk import BaseSDK
|
|
4
|
+
from anyscale.client.openapi_client.models import (
|
|
5
|
+
AdminCreateUser as AdminCreateUserModel,
|
|
6
|
+
)
|
|
7
|
+
from anyscale.user.models import AdminCreatedUser, AdminCreateUser
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PrivateUserSDK(BaseSDK):
|
|
11
|
+
def admin_batch_create(
|
|
12
|
+
self, admin_create_users: List[AdminCreateUser]
|
|
13
|
+
) -> List[AdminCreatedUser]:
|
|
14
|
+
created_users = self.client.admin_batch_create_users(
|
|
15
|
+
[
|
|
16
|
+
AdminCreateUserModel(**admin_create_user.to_dict())
|
|
17
|
+
for admin_create_user in admin_create_users
|
|
18
|
+
]
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
return [
|
|
22
|
+
AdminCreatedUser(
|
|
23
|
+
user_id=created_user.user_id,
|
|
24
|
+
name=created_user.name,
|
|
25
|
+
email=created_user.email,
|
|
26
|
+
created_at=created_user.created_at,
|
|
27
|
+
is_sso_user=created_user.is_sso_user,
|
|
28
|
+
lastname=created_user.lastname,
|
|
29
|
+
title=created_user.title,
|
|
30
|
+
)
|
|
31
|
+
for created_user in created_users
|
|
32
|
+
]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
|
|
3
|
+
from anyscale._private.sdk import sdk_command
|
|
4
|
+
from anyscale.user._private.user_sdk import PrivateUserSDK
|
|
5
|
+
from anyscale.user.models import AdminCreatedUser, AdminCreateUser
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
_USER_SDK_SINGLETON_KEY = "user_sdk"
|
|
9
|
+
|
|
10
|
+
_ADMIN_BATCH_CREATE_EXAMPLE = """
|
|
11
|
+
import anyscale
|
|
12
|
+
from anyscale.user.models import AdminCreateUser
|
|
13
|
+
|
|
14
|
+
anyscale.user.admin_batch_create(
|
|
15
|
+
[AdminCreateUser(
|
|
16
|
+
name="name",
|
|
17
|
+
email="test@anyscale.com",
|
|
18
|
+
password="",
|
|
19
|
+
is_sso_user=False,
|
|
20
|
+
lastname="lastname",
|
|
21
|
+
title="title",
|
|
22
|
+
),],
|
|
23
|
+
)
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
_ADMIN_BATCH_CREATE_ARG_DOCSTRINGS = {
|
|
27
|
+
"admin_create_users": "Users to be created by an admin.",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@sdk_command(
|
|
32
|
+
_USER_SDK_SINGLETON_KEY,
|
|
33
|
+
PrivateUserSDK,
|
|
34
|
+
doc_py_example=_ADMIN_BATCH_CREATE_EXAMPLE,
|
|
35
|
+
arg_docstrings=_ADMIN_BATCH_CREATE_ARG_DOCSTRINGS,
|
|
36
|
+
)
|
|
37
|
+
def admin_batch_create(
|
|
38
|
+
admin_create_users: List[AdminCreateUser], *, _sdk: PrivateUserSDK
|
|
39
|
+
) -> List[AdminCreatedUser]:
|
|
40
|
+
"""Batch create users without email verification as an admin.
|
|
41
|
+
"""
|
|
42
|
+
return _sdk.admin_batch_create(admin_create_users)
|
anyscale/user/models.py
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from datetime import datetime
|
|
3
|
+
from typing import Any, Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from anyscale._private.models import ModelBase
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass(frozen=True)
|
|
9
|
+
class AdminCreateUser(ModelBase):
|
|
10
|
+
"""User to be created by an admin.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
__doc_py_example__ = """\
|
|
14
|
+
import anyscale
|
|
15
|
+
from anyscale.user.models import AdminCreateUser
|
|
16
|
+
|
|
17
|
+
admin_create_user = AdminCreateUser(
|
|
18
|
+
# Name of the user to be created.
|
|
19
|
+
name="name",
|
|
20
|
+
# Email of the user to be created.
|
|
21
|
+
email="test@anyscale.com",
|
|
22
|
+
# Password for the user account being created.
|
|
23
|
+
password="",
|
|
24
|
+
# Whether the user is an SSO user.
|
|
25
|
+
is_sso_user=False,
|
|
26
|
+
# Optional last name of the user to be created.
|
|
27
|
+
lastname="lastname",
|
|
28
|
+
# Optional title of the user to be created.
|
|
29
|
+
title="title",
|
|
30
|
+
)
|
|
31
|
+
"""
|
|
32
|
+
name: str = field(metadata={"docstring": "Name of the user to be created."})
|
|
33
|
+
|
|
34
|
+
def _validate_name(self, name: str):
|
|
35
|
+
if not isinstance(name, str):
|
|
36
|
+
raise TypeError("name must be a string.")
|
|
37
|
+
|
|
38
|
+
email: str = field(metadata={"docstring": "Email of the user to be created."})
|
|
39
|
+
|
|
40
|
+
def _validate_email(self, email: str):
|
|
41
|
+
if not isinstance(email, str):
|
|
42
|
+
raise TypeError("email must be a string.")
|
|
43
|
+
|
|
44
|
+
password: Optional[str] = field(
|
|
45
|
+
metadata={"docstring": "Password for the user account being created."}
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
def _validate_password(self, password: Optional[str]):
|
|
49
|
+
if password is not None and not isinstance(password, str):
|
|
50
|
+
raise TypeError("password must be a string.")
|
|
51
|
+
|
|
52
|
+
is_sso_user: bool = field(
|
|
53
|
+
metadata={"docstring": "Whether the user is an SSO user."},
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
def _validate_is_sso_user(self, is_sso_user: bool):
|
|
57
|
+
if not isinstance(is_sso_user, bool):
|
|
58
|
+
raise TypeError("is_sso_user must be a boolean.")
|
|
59
|
+
|
|
60
|
+
lastname: Optional[str] = field(
|
|
61
|
+
default=None,
|
|
62
|
+
metadata={"docstring": "Optional last name of the user to be created."},
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
def _validate_lastname(self, lastname: Optional[str]):
|
|
66
|
+
if lastname is not None and not isinstance(lastname, str):
|
|
67
|
+
raise TypeError("lastname must be a string.")
|
|
68
|
+
|
|
69
|
+
title: Optional[str] = field(
|
|
70
|
+
default=None,
|
|
71
|
+
metadata={"docstring": "Optional title of the user to be created."},
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
def _validate_title(self, title: Optional[str]):
|
|
75
|
+
if title is not None and not isinstance(title, str):
|
|
76
|
+
raise TypeError("title must be a string.")
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
@dataclass(frozen=True)
|
|
80
|
+
class AdminCreateUsers(ModelBase):
|
|
81
|
+
"""Users to be created by an admin.
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
__doc_py_example__ = """\
|
|
85
|
+
import anyscale
|
|
86
|
+
from anyscale.user.models import AdminCreateUser
|
|
87
|
+
|
|
88
|
+
admin_create_user = AdminCreateUser(
|
|
89
|
+
# Name of the user to be created.
|
|
90
|
+
name="name",
|
|
91
|
+
# Email of the user to be created.
|
|
92
|
+
email="test@anyscale.com",
|
|
93
|
+
# Password for the user account being created.
|
|
94
|
+
password="",
|
|
95
|
+
# Whether the user is an SSO user.
|
|
96
|
+
is_sso_user=False,
|
|
97
|
+
# Optional last name of the user to be created.
|
|
98
|
+
lastname="lastname",
|
|
99
|
+
# Optional title of the user to be created.
|
|
100
|
+
title="title",
|
|
101
|
+
)
|
|
102
|
+
admin_create_users = AdminCreateUsers(
|
|
103
|
+
# Users to be created by an admin.
|
|
104
|
+
create_users=[admin_create_user]
|
|
105
|
+
)
|
|
106
|
+
"""
|
|
107
|
+
create_users: List[Dict[str, Any]] = field(
|
|
108
|
+
metadata={"docstring": "Users to be created by an admin."}
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
def _validate_create_users(self, create_users: List[Dict[str, Any]]):
|
|
112
|
+
if not isinstance(create_users, list):
|
|
113
|
+
raise TypeError("create_users must be a list.")
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
@dataclass(frozen=True)
|
|
117
|
+
class AdminCreatedUser(ModelBase):
|
|
118
|
+
"""User account created by an admin.
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
__doc_py_example__ = """\
|
|
122
|
+
import anyscale
|
|
123
|
+
from anyscale.user.models import AdminCreatedUser
|
|
124
|
+
|
|
125
|
+
admin_create_user = AdminCreateUser(
|
|
126
|
+
# Name of the user to be created.
|
|
127
|
+
name="name",
|
|
128
|
+
# Email of the user to be created.
|
|
129
|
+
email="test@anyscale.com",
|
|
130
|
+
# Password for the user account being created.
|
|
131
|
+
password="",
|
|
132
|
+
# Whether the user is an SSO user.
|
|
133
|
+
is_sso_user=False,
|
|
134
|
+
# Optional last name of the user to be created.
|
|
135
|
+
lastname="lastname",
|
|
136
|
+
# Optional title of the user to be created.
|
|
137
|
+
title="title",
|
|
138
|
+
)
|
|
139
|
+
admin_created_users: List[AdminCreatedUser] = anyscale.user.admin_batch_create([admin_create_user])
|
|
140
|
+
"""
|
|
141
|
+
user_id: str = field(metadata={"docstring": "Name of the user to be created."})
|
|
142
|
+
|
|
143
|
+
def _validate_user_id(self, user_id: str):
|
|
144
|
+
if not isinstance(user_id, str):
|
|
145
|
+
raise TypeError("user_id must be a string.")
|
|
146
|
+
|
|
147
|
+
name: str = field(metadata={"docstring": "Name of the user to be created."})
|
|
148
|
+
|
|
149
|
+
def _validate_name(self, name: str):
|
|
150
|
+
if not isinstance(name, str):
|
|
151
|
+
raise TypeError("name must be a string.")
|
|
152
|
+
|
|
153
|
+
email: str = field(metadata={"docstring": "Email of the user to be created."})
|
|
154
|
+
|
|
155
|
+
def _validate_email(self, email: str):
|
|
156
|
+
if not isinstance(email, str):
|
|
157
|
+
raise TypeError("email must be a string.")
|
|
158
|
+
|
|
159
|
+
created_at: datetime = field(
|
|
160
|
+
metadata={"docstring": "The timestamp of when the user is created."}
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
def _validate_created_at(self, created_at: datetime):
|
|
164
|
+
if not isinstance(created_at, datetime):
|
|
165
|
+
raise TypeError("created_at must be a datetime.")
|
|
166
|
+
|
|
167
|
+
is_sso_user: bool = field(
|
|
168
|
+
metadata={"docstring": "Whether the user is an SSO user."},
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
def _validate_is_sso_user(self, is_sso_user: bool):
|
|
172
|
+
if not isinstance(is_sso_user, bool):
|
|
173
|
+
raise TypeError("is_sso_user must be a boolean.")
|
|
174
|
+
|
|
175
|
+
lastname: Optional[str] = field(
|
|
176
|
+
default=None,
|
|
177
|
+
metadata={"docstring": "Optional last name of the user to be created."},
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
def _validate_lastname(self, lastname: Optional[str]):
|
|
181
|
+
if lastname is not None and not isinstance(lastname, str):
|
|
182
|
+
raise TypeError("lastname must be a string.")
|
|
183
|
+
|
|
184
|
+
title: Optional[str] = field(
|
|
185
|
+
default=None,
|
|
186
|
+
metadata={"docstring": "Optional title of the user to be created."},
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
def _validate_title(self, title: Optional[str]):
|
|
190
|
+
if title is not None and not isinstance(title, str):
|
|
191
|
+
raise TypeError("title must be a string.")
|
anyscale/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.24.
|
|
1
|
+
__version__ = "0.24.88"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
anyscale/__init__.py,sha256=
|
|
1
|
+
anyscale/__init__.py,sha256=QOx9-GAbHX1Utmnqx_Luy-3OqOqLL79Lz3wi9y9hX7c,6462
|
|
2
2
|
anyscale/anyscale-cloud-setup-gcp-oa.yaml,sha256=R8oCBlHF5ItLVZA8m35Dli9fdWXbadLHiNkWhRdUz9U,2722
|
|
3
3
|
anyscale/anyscale-cloud-setup-gcp.yaml,sha256=-sNJ45nLW6W1qIu0Kc-d2IkYTTjEVYI65lAxZB4KcO8,3922
|
|
4
4
|
anyscale/anyscale-cloud-setup-oa.yaml,sha256=MMfjT2UCNQS43I3mGOMoSq1cq1dufxtnXU9Zy260TK8,3192
|
|
@@ -23,21 +23,21 @@ anyscale/integrations.py,sha256=bv8m5rck0Cfxpi59klyYGJhPknpXtnHCSvF1Uu8vTHU,1339
|
|
|
23
23
|
anyscale/links.py,sha256=xFXN5TjL61p5T23dn66nNalkV47LNkPJxQqOPhGXfww,193
|
|
24
24
|
anyscale/memorydb_supported_zones.json,sha256=l5Iup9wFDZcHLfZqH640axxe4UiKteuraZRohi3MwRk,1098
|
|
25
25
|
anyscale/project.py,sha256=ekXbh-nPLkDTfDPST8ZIvYNCWh7MjDvD11_1kMSPyDk,17988
|
|
26
|
-
anyscale/scripts.py,sha256=
|
|
26
|
+
anyscale/scripts.py,sha256=fDXi9r9MmaG3zz6JWvtJ8TJI4pbAVimb1O8tbGercPY,5329
|
|
27
27
|
anyscale/snapshot.py,sha256=UGJT5C1s_4xmQxjWODK5DFpGxHRBX5jOCdSCqXESH8E,1685
|
|
28
28
|
anyscale/tables.py,sha256=TV4F2uLnwehvbkAfaP7iuLlT2wLIo6ORH2LVdRGXW5g,2840
|
|
29
29
|
anyscale/util.py,sha256=0_buzuDSgZ1aRz2d-MWm5l1SrchLdb4jl0JS3-1Vygc,39886
|
|
30
|
-
anyscale/version.py,sha256=
|
|
30
|
+
anyscale/version.py,sha256=rwgJzwwo2g4fh4QmTqKnV6xfQAEC7g2p8xB1KifE6co,24
|
|
31
31
|
anyscale/workspace_utils.py,sha256=gYFUayxX1YerC7XmXnyr9i-pi0JBaSnBvLHlRd6R4Sk,1198
|
|
32
32
|
anyscale/_private/anyscale_client/README.md,sha256=gk8obk7kqg6VWoUHcqDMwJULh35tYKEZFC0UF_dixGA,718
|
|
33
33
|
anyscale/_private/anyscale_client/__init__.py,sha256=807Blx3RHQeS8BmKZcsOQQ4dYoKlCnpm6Bdsif2CrHg,337
|
|
34
|
-
anyscale/_private/anyscale_client/anyscale_client.py,sha256=
|
|
35
|
-
anyscale/_private/anyscale_client/common.py,sha256=
|
|
36
|
-
anyscale/_private/anyscale_client/fake_anyscale_client.py,sha256=
|
|
34
|
+
anyscale/_private/anyscale_client/anyscale_client.py,sha256=3Xg_G2eVplCbgHM0U6zLPbZ8KqcczuLbEH7ULONGrfM,74332
|
|
35
|
+
anyscale/_private/anyscale_client/common.py,sha256=vWPwS4v252dCwoFyycgi9h5rILN-vUvhkdF2Bl5UZjI,20354
|
|
36
|
+
anyscale/_private/anyscale_client/fake_anyscale_client.py,sha256=tBtXtHPOslpGUW7vI698Nf4ybfQrXw6mDcVsTInJEkA,43509
|
|
37
37
|
anyscale/_private/docgen/README.md,sha256=hmP1gvlUjHwL1xElf33Nc-itC-Jaf6UBu80FYcQeQJ4,536
|
|
38
|
-
anyscale/_private/docgen/__main__.py,sha256=
|
|
38
|
+
anyscale/_private/docgen/__main__.py,sha256=KmNw8a9FY9nPs5wo6a6G6oLTS0S2woySgU3Gym_FQ_4,23685
|
|
39
39
|
anyscale/_private/docgen/api.md,sha256=ltigCyWTJVXIgRgIniN3Th_l7ZuNhO3AYhijjGNGOJs,33004
|
|
40
|
-
anyscale/_private/docgen/generator.py,sha256=
|
|
40
|
+
anyscale/_private/docgen/generator.py,sha256=Nx25BhCGIcELnBnU7xZqMxiKx9gC0qOCQGdudiZEhAs,21651
|
|
41
41
|
anyscale/_private/docgen/generator_legacy.py,sha256=pss_6ONF55XhARrKGcREDmg0J5plWact6USgb5Tr5mM,3002
|
|
42
42
|
anyscale/_private/docgen/models.md,sha256=p2yTWxktF8nCLFzypcZgMUz9EiQBkRxqEwXOLNyp4_c,277778
|
|
43
43
|
anyscale/_private/models/__init__.py,sha256=ZrkdHhJZNeCYiogsHc_po8m7vaVdxEjkNGixNeYdlgs,125
|
|
@@ -98,7 +98,7 @@ anyscale/background/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
98
98
|
anyscale/background/job_runner.py,sha256=LTuv9JOahyv6C9i7DLQAONgQF6--FfYZEmJrKy-sUG8,2687
|
|
99
99
|
anyscale/client/.gitignore,sha256=JZyvYEtT2DCSK9V5Joi6lQofhMik4PXiJRCWsg7SvqI,807
|
|
100
100
|
anyscale/client/.openapi-generator-ignore,sha256=pu2PTide7pJtJ-DFLzDy0cTYQJRlrB-8RRH3zGLeUds,1040
|
|
101
|
-
anyscale/client/README.md,sha256=
|
|
101
|
+
anyscale/client/README.md,sha256=JNUzFMtRepK9xC5sgfxo9L-zERXBmnYIZO9IJsKJHJ8,130128
|
|
102
102
|
anyscale/client/git_push.sh,sha256=EDCZOTTiLxbtPHmiU63qC99rGH67B7dhdPZdNUKivF0,1827
|
|
103
103
|
anyscale/client/requirements.txt,sha256=dkVKYUStC5h_g_87SH7pRdhXCj7ySozAJMGAFEzGgFc,126
|
|
104
104
|
anyscale/client/setup.cfg,sha256=l7bdKSIedeBhhoDtupsBwx1xPrlBf2yYeTH7a8kMga4,28
|
|
@@ -106,18 +106,21 @@ anyscale/client/setup.py,sha256=tSxqw1kAL1B9adnrnOarjnQfSbwGmnTr_kg8ZXhlm5A,1109
|
|
|
106
106
|
anyscale/client/test-requirements.txt,sha256=sTjmDTj5W9fh1ZAeo8UT2EBdeGDBNttj_PHiPBXg1D4,111
|
|
107
107
|
anyscale/client/tox.ini,sha256=M6L3UmvAdvU65LsoAF-Oi7oRjwZlCJZn8I7ofdXn5Ok,156
|
|
108
108
|
anyscale/client/.openapi-generator/VERSION,sha256=J0RzX-4u4jfin1kviKtmncjUePyjHm2kyvmkobOrt_E,5
|
|
109
|
-
anyscale/client/openapi_client/__init__.py,sha256=
|
|
109
|
+
anyscale/client/openapi_client/__init__.py,sha256=pFlR9Et1Xb-Yxk_rgjix4j2_ij-4QnL-YRfztf81z-Q,54654
|
|
110
110
|
anyscale/client/openapi_client/api_client.py,sha256=d8Un6j2Ny2vlS2qBXPVFj6_ql0k36DFahpWt_28TfCk,25563
|
|
111
111
|
anyscale/client/openapi_client/configuration.py,sha256=Dd5XrlHwv-wxnf0C35PG_-HBQoY3Yaz6hKrmkZz-m0E,12363
|
|
112
112
|
anyscale/client/openapi_client/exceptions.py,sha256=3egwsXQG2j_vARbqgBxUO1xSltAhpfiHTYVP7VXTvU0,3792
|
|
113
113
|
anyscale/client/openapi_client/rest.py,sha256=Ehj37v7GHW6SXV067Hze5HE42ayKaGi6a6ZlkR7u3Lg,12501
|
|
114
114
|
anyscale/client/openapi_client/api/__init__.py,sha256=i8u7BI2xX1GrXTL3hN0pKpYIlnT-D_uDxH2ElOfYG1I,141
|
|
115
|
-
anyscale/client/openapi_client/api/default_api.py,sha256=
|
|
116
|
-
anyscale/client/openapi_client/models/__init__.py,sha256=
|
|
115
|
+
anyscale/client/openapi_client/api/default_api.py,sha256=cqXy1GNdeLohhSwhBzCQOQz171O_zwbYjdVF14kujXs,2098297
|
|
116
|
+
anyscale/client/openapi_client/models/__init__.py,sha256=Zha3uMOl9Ut6cV0C9cCX4ZSxi1x4ZDPLDMNkB9nwN9U,54164
|
|
117
117
|
anyscale/client/openapi_client/models/access_config.py,sha256=b2mA0qtuTA5PFbp6C61Jc_T2zUMaojM1v32IhZo0MfY,3648
|
|
118
|
+
anyscale/client/openapi_client/models/admin_create_user.py,sha256=9DPr8D0lKgoEZ3Z2kGsAd8L7ocFCiP6woOGLVs8SRb8,7251
|
|
119
|
+
anyscale/client/openapi_client/models/admin_created_user.py,sha256=uZffwCvMxIdPbpCRvFwpkfeG5D3LEQ50ebbwa_cj6bQ,8098
|
|
120
|
+
anyscale/client/openapi_client/models/admincreateduser_list_response.py,sha256=hjcjoagKHOFOyRZ0z47-AG_KucaFivgv4Nmtrj2gamQ,4437
|
|
118
121
|
anyscale/client/openapi_client/models/aggregated_instance_usage_csv.py,sha256=2Do0y-Rwg9wIK3N-fmKClN9OZmU-GXiOczeVfAqz2l0,23911
|
|
119
122
|
anyscale/client/openapi_client/models/aggregated_usage.py,sha256=ZXtYmzQcLyg2S8uuzliZhz3PdRKEvfmw1NaH6Ow2SKY,4291
|
|
120
|
-
anyscale/client/openapi_client/models/aggregated_usage_query.py,sha256=
|
|
123
|
+
anyscale/client/openapi_client/models/aggregated_usage_query.py,sha256=KU8sGskjrHzcJf_slbMsc8hNTnoolWKMqYqcpD8UMqE,7289
|
|
121
124
|
anyscale/client/openapi_client/models/aggregatedinstanceusagecsv_list_response.py,sha256=6KcwRRQeUbiY-IhZH0JxQTo9QexEXVn0IS69XZ4Y0J8,4587
|
|
122
125
|
anyscale/client/openapi_client/models/aggregatedusage_response.py,sha256=6YuSwu6a_i2lbOB7RS8gI13s0JpRIiFqKmdm8dHWaIA,3583
|
|
123
126
|
anyscale/client/openapi_client/models/aica_endpoint.py,sha256=hPAE8xOyd7C10OAM9KWW0po5EoaelVmfgMXA60wNlUg,17738
|
|
@@ -550,7 +553,6 @@ anyscale/client/openapi_client/models/organizationprojectcollaborator_list_respo
|
|
|
550
553
|
anyscale/client/openapi_client/models/organizationpublicidentifier_response.py,sha256=35Hz_zc13R7QKUDQQ-5yZGCNTkdQ6O-mYNFKwcmS3P0,3726
|
|
551
554
|
anyscale/client/openapi_client/models/organizationusagealert_list_response.py,sha256=AojOBFsB3Edd8H1ZusnfBGhX5oGc162k_q4XZFEigHY,4527
|
|
552
555
|
anyscale/client/openapi_client/models/page_query.py,sha256=dw5HgH5gVYi2OcLW3Kg0Zt5mf0GWq-Qv-RW83FANLeM,4585
|
|
553
|
-
anyscale/client/openapi_client/models/paging_context.py,sha256=LVDHPyL9PJgbXdUzCkXNgSzwpL1RW-kJ_sukPwaWIhA,4653
|
|
554
556
|
anyscale/client/openapi_client/models/pause_schedule.py,sha256=ru7_OzH7oDw5y2h1o5QNfKW8TXbkF1h-NDwccbUDRd0,3661
|
|
555
557
|
anyscale/client/openapi_client/models/permission_level.py,sha256=fGnBgKrcZkGLYl7RpQQm0_gaGzkTehnJjOnIX8G4jAw,2868
|
|
556
558
|
anyscale/client/openapi_client/models/platform_fine_tuning_job.py,sha256=HRdRRb6qPyvXvh4fXMi5B53lHMCd2EVvn99SGveLP9o,19243
|
|
@@ -771,7 +773,7 @@ anyscale/commands/cloud_commands.py,sha256=DNnoRv7wljtv25io61P49g25vfC10v6giDBQU
|
|
|
771
773
|
anyscale/commands/cloud_commands_util.py,sha256=d-6TSZ_syrGkZ3Fc1uRX6jG4dqYMebNkBNpYLojOJFg,247
|
|
772
774
|
anyscale/commands/cluster_commands.py,sha256=taNcffyFfqJ1MgOQd0cz9kzRXWFTdp-wfLPM4l_2tBc,13487
|
|
773
775
|
anyscale/commands/cluster_env_commands.py,sha256=KNWylyE8Ew1sDi7yu2Tp4RLcRu2_KJJJIzVGRyPflJo,3899
|
|
774
|
-
anyscale/commands/command_examples.py,sha256=
|
|
776
|
+
anyscale/commands/command_examples.py,sha256=XlZajjvmf3gCHaMd_vNTI0ejWWbjIQ2jTH8crOkWZSM,19462
|
|
775
777
|
anyscale/commands/compute_config_commands.py,sha256=vdyrtMcdP8eeK32p_Y6zF-qps6_SyzprhbjRZ9p18tQ,7828
|
|
776
778
|
anyscale/commands/config_commands.py,sha256=p55uM6WrhfbFoRXC9hNAV-8c5ANghw7tBUYwaQDAtjE,7195
|
|
777
779
|
anyscale/commands/exec_commands.py,sha256=cMOP1u6xQbl81h69Jug3y73XnNSwpbM6XC1X57SIp4c,465
|
|
@@ -790,6 +792,7 @@ anyscale/commands/schedule_commands.py,sha256=UPJir8mOAYCUhdL4W43n9WAUlWXpjNHyT0
|
|
|
790
792
|
anyscale/commands/service_account_commands.py,sha256=mX8qQjJHnqpSM_7acfQ7ofdCL73uJEl7oznRvPMyoVs,2358
|
|
791
793
|
anyscale/commands/service_commands.py,sha256=rh4OxPZhjK2NYMpvVagDC29MLx_pfBStnDyyMJaLJP8,23484
|
|
792
794
|
anyscale/commands/session_commands_hidden.py,sha256=gbPlg5MfhCyK0JvDG3FSxWB2oNzUBAv1IBX6AjVgApI,6177
|
|
795
|
+
anyscale/commands/user_commands.py,sha256=iCwCenDPJpUeMYH0bhldKRfytSjg1oAtDITMrcPokRA,1257
|
|
793
796
|
anyscale/commands/util.py,sha256=Lt0iLh7zBDKrO4PY-NpwIXp6o33PVJzkAV24GgCWeDs,5072
|
|
794
797
|
anyscale/commands/workspace_commands.py,sha256=nnsUQbMLn9MTZ_TwiYRou_szewkpxS0kxM5WRn0JSt4,15744
|
|
795
798
|
anyscale/commands/workspace_commands_v2.py,sha256=N4vpb54xq_4wrCwsYQrjrjNxYwYvOE3gbP0pmrfYmEE,27964
|
|
@@ -1100,6 +1103,10 @@ anyscale/shared_anyscale_utils/utils/collections.py,sha256=t_6SZNOskAn7EP0gwgJHR
|
|
|
1100
1103
|
anyscale/shared_anyscale_utils/utils/id_gen.py,sha256=aUwwG_7Wk7P0le48RHlzQNwcNoSn-41jivcZ1UhN3mo,4730
|
|
1101
1104
|
anyscale/shared_anyscale_utils/utils/protected_string.py,sha256=8-T3VC37NrWeAhc7aPjMsUd9zhjcSF1xaGo2GRNjLL4,3166
|
|
1102
1105
|
anyscale/shared_anyscale_utils/utils/ray_semver.py,sha256=OzIJuawv4Ja-_irSCLUO8e-P1wc-qMvOAJcr689_hn4,2539
|
|
1106
|
+
anyscale/user/__init__.py,sha256=yex20RD_2R33lsonAlVO9UeyBKgticD0cVx8r4X4YJw,1218
|
|
1107
|
+
anyscale/user/commands.py,sha256=V1nZJk1s44yUiVTXZqZInjb11v4M5bHC4yPmMe6zR_A,1091
|
|
1108
|
+
anyscale/user/models.py,sha256=Ifeg-3LqfNj8Wq4WSDAl8C7y1sazW40WKU3DPcPfwFI,6155
|
|
1109
|
+
anyscale/user/_private/user_sdk.py,sha256=scw1PN5VXBgjS6sgrFBGEIjc1LSV6Dy6v8IrzdAS4ag,1062
|
|
1103
1110
|
anyscale/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1104
1111
|
anyscale/utils/cli_version_check_util.py,sha256=U2KU-NRf09pcs-ZZYUm1GQxs7Btp6N4Fv6CQeNoEeTM,2223
|
|
1105
1112
|
anyscale/utils/cloud_update_utils.py,sha256=c53AQyg4OJBkNqTD-8hHvEpdTwtins1rTycifBbQbWI,34106
|
|
@@ -1136,10 +1143,10 @@ anyscale/workspace/__init__.py,sha256=fIxkn8b_HADCQl5njPAbcJxAf0sajZoc55L_wMvGAx
|
|
|
1136
1143
|
anyscale/workspace/commands.py,sha256=21FubFd2wmEwlVbk-ng-adwBm-O4ZPBgEJnoavbfvbU,14035
|
|
1137
1144
|
anyscale/workspace/models.py,sha256=Ey67KqxdslS51yK7xetbRaFjE8sURAArpf-F38r3cUU,9760
|
|
1138
1145
|
anyscale/workspace/_private/workspace_sdk.py,sha256=4LOBmMm7kd-O94ii5uP1UDbkWLComh6zI5QmE2lXRTY,26824
|
|
1139
|
-
anyscale-0.24.
|
|
1140
|
-
anyscale-0.24.
|
|
1141
|
-
anyscale-0.24.
|
|
1142
|
-
anyscale-0.24.
|
|
1143
|
-
anyscale-0.24.
|
|
1144
|
-
anyscale-0.24.
|
|
1145
|
-
anyscale-0.24.
|
|
1146
|
+
anyscale-0.24.88.dist-info/LICENSE,sha256=UOPu974Wzsna6frFv1mu4VrZgNdZT7lbcNPzo5ue3qs,3494
|
|
1147
|
+
anyscale-0.24.88.dist-info/METADATA,sha256=nZAN_I-bOhBbtZ6682H7V5INkui5mDJNo-ob03vOhSA,3228
|
|
1148
|
+
anyscale-0.24.88.dist-info/NOTICE,sha256=gHqDhSnUYlRXX-mDOL5FtE7774oiKyV_HO80qM3r9Xo,196
|
|
1149
|
+
anyscale-0.24.88.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
1150
|
+
anyscale-0.24.88.dist-info/entry_points.txt,sha256=NqO18sCZn6zG6J0S38itjcN00s7aE3C3v3k5lMAfCLk,51
|
|
1151
|
+
anyscale-0.24.88.dist-info/top_level.txt,sha256=g3NVNS8Oh0NZwbFFgeX696C5MZZkS5dqV2NqcsbDRJE,9
|
|
1152
|
+
anyscale-0.24.88.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|