credentials
check_user_permissions(shotgrid_url, username, password=None, api_key=None, script_name=None, proxy=None)
Check if the provided user can access the Shotgrid API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shotgrid_url | str | The Shotgun server URL. | required |
username | str | The Shotgrid username to use the Session as. | required |
password | Optional[str] | The Shotgrid password to use the Session as. | None |
api_key | Optional[str] | The Shotgrid API key to use the Session as. | None |
script_name | Optional[str] | The Shotgrid API script name to use the Session as. | None |
proxy | Optional[str] | The proxy to use for the connection. | None |
Returns:
Name | Type | Description |
---|---|---|
tuple | (bool, str) | Whether the connection was successful or not, and a string message with the result. |
Source code in client/ayon_shotgrid/lib/credentials.py
7 8 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 |
|
clear_local_login()
Clear the Shotgrid Login entry from the local registry.
Source code in client/ayon_shotgrid/lib/credentials.py
144 145 146 147 148 149 150 151 |
|
create_sg_session(shotgrid_url, username, password=None, api_key=None, script_name=None, proxy=None)
Attempt to create a Shotgun Session
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shotgrid_url | str | The Shotgun server URL. | required |
username | str | The Shotgrid username to use the Session as. | required |
password | Optional[str] | The Shotgrid password to use the Session as. | None |
api_key | Optional[str] | The Shotgrid API key to use the Session as. | None |
script_name | Optional[str] | The Shotgrid API script name to use the Session as. | None |
proxy | Optional[str] | The proxy to use for the connection. | None |
Returns:
Name | Type | Description |
---|---|---|
session | Shotgun | A Shotgrid API Session. |
Raises:
Type | Description |
---|---|
AuthenticationFault | If the authentication with Shotgrid fails. |
Source code in client/ayon_shotgrid/lib/credentials.py
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 |
|
get_local_login()
Get the Shotgrid Login entry from the local registry.
Source code in client/ayon_shotgrid/lib/credentials.py
124 125 126 127 128 129 130 131 132 133 |
|
save_local_login(username, password)
Save the Shotgrid Login entry from the local registry.
Source code in client/ayon_shotgrid/lib/credentials.py
136 137 138 139 140 141 |
|