User
User
¶
Bases: UUIDBaseNode
The User node represents any researcher or individual who interacts with the CRIPT platform. It serves two main purposes: 1. It plays a core role in permissions (access control) 1. It provides a traceable link to the individual who has contributed or edited data within the database
attribute | type | example | description | required | vocab |
---|---|---|---|---|---|
url | str | unique ID of the node | True | ||
username | str | "john_doe" | User’s name | True | |
str | "user@cript.com" | email of the user | True | ||
orcid | str | "0000-0000-0000-0000" | ORCID ID of the user | True | |
updated_at | datetime* | 2023-03-06 18:45:23.450248 | last date the node was modified (UTC time) | True | |
created_at | datetime* | 2023-03-06 18:45:23.450248 | date it was created (UTC time) | True |
JSON¶
{
"node": "User",
"username": "my username",
"email": "user@email.com",
"orcid": "0000-0000-0000-0001",
}
Warnings
- A User cannot be created or modified using the Python SDK.
- A User node is a read-only node that can only be deserialized from API JSON response to Python node.
- The User node cannot be instantiated and within the Python SDK.
- Attempting to edit the user node will result in an
Attribute Error
Source code in src/cript/nodes/supporting_nodes/user.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
email: Union[str, None]
property
¶
user's email
Raises:
Type | Description |
---|---|
AttributeError
|
|
Returns:
Type | Description |
---|---|
user email: str
|
User node email |
orcid: Union[str, None]
property
¶
users ORCID
Raises:
Type | Description |
---|---|
AttributeError
|
|
Returns:
Name | Type | Description |
---|---|---|
ORCID |
str
|
user's ORCID |
username: str
property
¶
username of the User node
Raises:
Type | Description |
---|---|
AttributeError
|
|
Returns:
Name | Type | Description |
---|---|---|
username |
str
|
username of the User node |
JsonAttributes
dataclass
¶
__init__(username, email='', orcid='', **kwargs)
¶
Json from CRIPT API to be converted to a node optionally the group can be None if the user doesn't have a group
Parameters:
Name | Type | Description | Default |
---|---|---|---|
username |
str
|
user username |
required |
email |
Optional[str]
|
user email |
''
|
orcid |
Optional[str]
|
user ORCID |
''
|