activeviam.config package

Submodules

activeviam.config.parsing module

Config parsing error.

exception activeviam.config.parsing.ConfigParsingError(message, parsed_object=None)

Bases: ValueError

Error raised when the parsing of the config failed.

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

Module contents

Session configuration.

class activeviam.config.SessionConfiguration(inherit, metadata_db=None, roles=None, authentication=None, properties=None)

Bases: activeviam._serialization_utils.FromDict, activeviam.config._utils.Mergeable

Configuration of the session.

authentication = None
classmethod merge(instance1, instance2)

Merge two instances of the class. Second overrides the first one.

Return type

Optional[~MergeInheritedClass]

metadata_db = None
properties = None
roles = None
activeviam.config.create_config(inherit=True, metadata_db=None, roles=None, authentication=None, properties=None)

Create the configuration.

Parameters
  • inherit (bool) – Whether this config should be merged with the default config if it exists.

  • metadata_db (Optional[str]) – The description of the database where the session’s metadata will be stored. This can be either a file path or a connection string to a remote database.

  • roles (Optional[List[Role]]) – The roles and their restrictions.

  • authentication (Optional[Auth]) – The authentication used by the server.

  • properties (Optional[Dict[Properties, Any]]) – The properties provided to the ActiveViam server.

Return type

SessionConfiguration

Returns

The configuration.

activeviam.config.create_role(name, restrictions=None)

Create a role with the given restrictions.

Return type

Role

class activeviam.config.Auth0Authentication(issuer=None, audience=None, client_id=None, client_secret=None, role_mapping=None)

Bases: activeviam.config._auth.Auth, activeviam.config._utils.Mergeable

Auth0 authentication.

get_type()

Return the authentication type.

Return type

str

classmethod merge(instance1, instance2)

Merge two instances of the class. Second overrides the first one.

Return type

Optional[~MergeInheritedClass]

class activeviam.config.BasicUser(name, password, roles)

Bases: activeviam._serialization_utils.FromDict

Basic user with roles.

class activeviam.config.BasicAuthentication(users, realm=None)

Bases: activeviam.config._auth.Auth, activeviam.config._utils.Mergeable

Basic authentication.

get_type()

Return the authentication type.

Return type

str

classmethod merge(instance1, instance2)

Merge two instances of the class. Second overrides the first one.

Return type

Optional[~MergeInheritedClass]

class activeviam.config.Properties(value, send_to_server=True)

Bases: enum.Enum

Configurable properties.

csv_max_line_size = 'csv_max_line_size'

Maximum size in KB that each line in CSV can take. Default is 2048.

max_memory = 'max_memory'

Max memory allocated to each session. Actually set the -Xms and -Xmx JVM parameters. The format is a string containing a number followed by a unit among G, M and K, for instance “4G”. Default to the JVM default memory which is 25% of the machine memory.

websocket_compression = 'websocket_compression'

Set to True to enable WebSocket compression in the JVM. Default is False.