schemas
AbsolutePathStr = Annotated[NonEmptyStr, AfterValidator(val_absolute_path)]
module-attribute
¶
String representing an absolute path.
ListUniqueNonEmptyString = Annotated[list[NonEmptyStr], AfterValidator(val_unique_list)]
module-attribute
¶
List of unique non-empty-string items.
ListUniqueNonNegativeInt = Annotated[list[NonNegativeInt], AfterValidator(val_unique_list)]
module-attribute
¶
List of unique non-negative-integer items.
NonEmptyStr = Annotated[str, StringConstraints(min_length=1, strip_whitespace=True)]
module-attribute
¶
A non-empty string, with no leading/trailing whitespaces.
OAuthAccountRead
¶
Bases: BaseModel
Schema for storing essential OAuthAccount information within
UserRead.oauth_accounts.
| ATTRIBUTE | DESCRIPTION |
|---|---|
id |
ID of the row in fractal-owned
TYPE:
|
account_email |
Email associated to OAuth account
TYPE:
|
oauth_name |
Name of the OAuth provider (e.g.
TYPE:
|
Source code in fractal_server/app/schemas/user.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
UserCreate
¶
Bases: BaseUserCreate
Schema for User creation.
| ATTRIBUTE | DESCRIPTION |
|---|---|
profile_id |
TYPE:
|
Source code in fractal_server/app/schemas/user.py
95 96 97 98 99 100 101 102 103 104 105 | |
UserGroupCreate
¶
Bases: BaseModel
Schema for UserGroup creation
| ATTRIBUTE | DESCRIPTION |
|---|---|
name |
Group name
TYPE:
|
Source code in fractal_server/app/schemas/user_group.py
44 45 46 47 48 49 50 51 52 53 54 55 | |
UserGroupRead
¶
Bases: BaseModel
Schema for UserGroup read
NOTE: user_ids does not correspond to a column of the UserGroup table,
but it is rather computed dynamically in relevant endpoints.
| ATTRIBUTE | DESCRIPTION |
|---|---|
id |
Group ID
TYPE:
|
name |
Group name
TYPE:
|
timestamp_created |
Creation timestamp
TYPE:
|
user_ids |
IDs of users of this group
TYPE:
|
Source code in fractal_server/app/schemas/user_group.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
UserGroupUpdate
¶
Bases: BaseModel
Schema for UserGroup update
Source code in fractal_server/app/schemas/user_group.py
58 59 60 61 62 63 64 65 | |
UserRead
¶
Bases: BaseUser[int]
Schema for User read from database.
| ATTRIBUTE | DESCRIPTION |
|---|---|
group_ids_names |
TYPE:
|
oauth_accounts |
TYPE:
|
profile_id |
TYPE:
|
Source code in fractal_server/app/schemas/user.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
UserUpdate
¶
Bases: BaseUserUpdate
Schema for User update.
| ATTRIBUTE | DESCRIPTION |
|---|---|
password |
TYPE:
|
email |
TYPE:
|
is_active |
TYPE:
|
is_superuser |
TYPE:
|
is_verified |
TYPE:
|
profile_id |
TYPE:
|
project_dir |
TYPE:
|
slurm_accounts |
TYPE:
|
Source code in fractal_server/app/schemas/user.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
UserUpdateGroups
¶
Bases: BaseModel
Schema for POST /auth/users/{user_id}/set-groups/
Source code in fractal_server/app/schemas/user.py
108 109 110 111 112 113 114 115 116 | |
UserUpdateStrict
¶
Bases: BaseModel
Schema for User self-editing.
| ATTRIBUTE | DESCRIPTION |
|---|---|
slurm_accounts |
TYPE:
|
Source code in fractal_server/app/schemas/user.py
83 84 85 86 87 88 89 90 91 92 | |
validate_cmd(command, *, allow_char=None, attribute_name='Command')
¶
Assert that the provided command does not contain any of the forbidden
characters for commands
(fractal_server.string_tools.NOT_ALLOWED_FOR_COMMANDS)
| PARAMETER | DESCRIPTION |
|---|---|
command
|
command to validate.
TYPE:
|
allow_char
|
chars to accept among the forbidden ones
TYPE:
|
attribute_name
|
Name of the attribute, to be used in error message.
TYPE:
|
Source code in fractal_server/string_tools.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |