Authorization and Permissions
Classes related to authorization and permission management.
- class pypgx.api.auth.PermissionEntity(name, authorization_type, java_permission_entity_class)
Bases:
object
Class representing an entity which can receive permissions.
- Parameters
name (str) –
- get_name()
Get the entity name.
- Returns
the entity name
- Return type
str
- get_type()
Get the authorization type.
This indicates if the entity is a user or a role.
- Returns
the authorization type
- class pypgx.api.auth.PgxGeneralPermission(java_general_permission)
Bases:
object
Class representing a type of general permission.
- allows_compile_algorithm()
Check if you have permission to compile algorithms.
- Returns
Boolean indicating if compiling algorithms is permitted.
- Return type
bool
- allows_create_frame()
Check if you have permission to create a frame.
- Returns
Boolean indicating if creating a frame is permitted.
- Return type
bool
- allows_create_graph()
Check if graph creation is permitted.
- Returns
Boolean indicating if graph creation is permitted.
- Return type
bool
- allows_get_published_graph()
Check if you have permission to get a published graph.
- Returns
Boolean indicating if getting a published graph is permitted.
- Return type
bool
- allows_get_server_info()
Check if you have permission to get the server info.
- Returns
Boolean indicating if getting the server info is permitted.
- Return type
bool
- allows_load_frame()
Check if you have permission to load a frame.
- Returns
Boolean indicating if loading a frame is permitted.
- Return type
bool
- allows_manage_server()
Check if you have permission for managing the server.
- Returns
Boolean indicating if managing the server is permitted.
- Return type
bool
- allows_ml_model_inference()
Check if you have permission for ML model inference.
- Returns
Boolean indicating if ML model inference is permitted.
- Return type
bool
- allows_ml_model_reading()
Check if you have permission to read ML models.
- Returns
Boolean indicating if reading ML models is permitted.
- Return type
bool
- allows_ml_model_storing()
Check if you have permission to store ML models.
- Returns
Boolean indicating if storing ML models is permitted.
- Return type
bool
- allows_ml_model_training()
Check if you have permission to train ML models.
- Returns
Boolean indicating if training ML models is permitted.
- Return type
bool
- allows_publish_graph()
Check if you have permission to publish a graph.
- Returns
Boolean indicating if publishing a graph is permitted.
- Return type
bool
- allows_session_create()
Check if session creation is permitted.
- Returns
Boolean indicating if session creation is permitted.
- Return type
bool
- allows_store_frame()
Check if you have permission to store a frame.
- Returns
Boolean indicating if storing a frame is permitted.
- Return type
bool
- name()
Get the name of the general permission
- Returns
name of the general permission
- Return type
str
- class pypgx.api.auth.PgxGenericPermission(java_generic_permission)
Bases:
object
Class for generic permission.
- get_general_permission()
Get the general permission
- Returns
The general permission
- Return type
- get_location()
Get the generic permission location
- Returns
The generic permission location
- Return type
str
- get_resource_permission()
Get pgx resource permission
- Returns
pgx resource permission
- Return type
- is_file_location_permission()
Check if the location and resource permission aren’t null
- Returns
Boolean indicating location and resource permission aren’t null
- Return type
bool
- is_general_permission()
Check if it is a general permission.
- Returns
Boolean indicating if permission is general.
- Return type
bool
- class pypgx.api.auth.PgxResourcePermission(java_resource_permission)
Bases:
object
Class representing a type of resource permission.
- allows_export()
Check if the resource can be exported.
- Returns
Boolean indicating if the resource can be exported.
- Type
bool
- Return type
bool
- allows_inspect()
Check if the resource can be inspected.
- Returns
Boolean indicating if the resource can be inspected.
- Type
bool
- Return type
bool
- allows_manage()
Check if the resource can be managed.
- Returns
Boolean indicating if the resource can be managed.
- Type
bool
- Return type
bool
- allows_read()
Check if the resource can be read.
- Returns
Boolean indicating if the resource can be read.
- Type
bool
- Return type
bool
- allows_write()
Check if the resource can be written.
- Returns
Boolean indicating if the resource can be written.
- Type
bool
- Return type
bool
- static get_strongest(a, b)
Return the strongest permission of the two.
- Parameters
a (PgxResourcePermission) – A pgx resource permission.
b (PgxResourcePermission) – A pgx resource permission.
- Returns
The strongest pgx resource permission.
- Type
- Return type
- name()
Get the name of the resource permission
- Returns
The name of the resource permission.
- Type
str
- Return type
str
- class pypgx.api.auth.PgxRole(name)
Bases:
PermissionEntity
Class representing a role for the purposes of permission management.
- Parameters
name (str) –
- get_name()
Get the entity name.
- Returns
the entity name
- Return type
str
- get_type()
Get the authorization type.
This indicates if the entity is a user or a role.
- Returns
the authorization type
- class pypgx.api.auth.PgxUser(name)
Bases:
PermissionEntity
Class representing a user for the purposes of permission management.
- Parameters
name (str) –
- get_name()
Get the entity name.
- Returns
the entity name
- Return type
str
- get_type()
Get the authorization type.
This indicates if the entity is a user or a role.
- Returns
the authorization type