atoti.config package¶
Submodules¶
atoti.config.parsing module¶
Config parsing error.
-
exception
atoti.config.parsing.
ConfigParsingError
(message, parsed_object=None)¶ Bases:
ValueError
Error raised when the parsing of the config failed.
Module contents¶
Session configuration.
-
class
atoti.config.
SessionConfiguration
(inherit, port, url_pattern, metadata_db, roles, authentication, sampling_mode, max_memory, java_args)¶ Bases:
atoti._serialization_utils.FromDict
,atoti.config._utils.Mergeable
Configuration of the session.
-
authentication
: Optional[Auth] = None¶
-
inherit
: bool = None¶
-
java_args
: Optional[Collection[str]] = None¶
-
max_memory
: Optional[str] = None¶
-
metadata_db
: Optional[str] = None¶
-
port
: Optional[int] = None¶
-
roles
: Optional[Collection[Role]] = None¶
-
sampling_mode
: Optional[SamplingMode] = None¶
-
url_pattern
: Optional[str] = None¶
-
-
atoti.config.
create_config
(*, inherit=True, port=None, url_pattern=None, metadata_db=None, roles=None, authentication=None, sampling_mode=None, max_memory=None, java_args=None)¶ Create a configuration.
- Parameters
inherit (
bool
) – Whether this config should be merged with the default config if it exists.port (
Optional
[int
]) – The port on which the session will be exposed. Defaults to a random available port.url_pattern (
Optional
[str
]) – The pattern of the public URL of the session. The{host}
and{port}
placeholders will be replaced with, respectively, the actual host address and port number. IfNone
, defaults tohttp://localhost:{port}
.metadata_db (
Optional
[str
]) – The description of the database where the session’s metadata will be stored. It is the path to a file, which will be created if needed.roles (
Optional
[Collection
[Role
]]) – The roles and their restrictions.authentication (
Optional
[Auth
]) – The authentication used by the server.sampling_mode (
Optional
[SamplingMode
]) –The sampling mode describing how files are loaded into the stores. It’s faster to build the data model when only part of the data is loaded.
Modes are available in
atoti.sampling
.If
atoti.sampling.FULL
isn’t passed, callload_all_data()
to load everything once the model definition is done.max_memory (
Optional
[str
]) – Max memory allocated to each session. Actually sets the-Xmx
JVM parameter. The format is a string containing a number followed by a unit amongG
,M
andK
. For instance:64G
. Defaults to the JVM default memory which is 25% of the machine memory.java_args (
Optional
[Collection
[str
]]) – Collection of additional arguments to pass to the Java process. For instance:["-verbose:gc", "-Xms1g", "-XX:+UseG1GC"]
.
- Return type
-
atoti.config.
create_role
(name, *, restrictions=None)¶ Create a role with the given restrictions.
- Return type
Role
-
class
atoti.config.
BasicUser
(name, password, roles=<factory>)¶ Bases:
atoti._serialization_utils.FromDict
Basic user with roles.
-
name
: str = None¶
-
password
: str = None¶
-
roles
: Collection[str] = None¶
-
-
class
atoti.config.
BasicAuthentication
(users, realm=None)¶ Bases:
atoti.config._auth.Auth
,atoti.config._utils.Mergeable
Basic authentication.
- Parameters
users (Collection[BasicUser]) – The list of users that can authenticate against the session.
realm (Optional[str]) – The realm describing the protected area. Different realms can be used to isolate sessions running on the same domain (regardless of the port). The realm will also be displayed by the browser when prompting for credentials. Defaults to
f"{session_name} atoti session at {session_id}"
.
-
realm
: Optional[str] = None¶
-
users
: Collection[BasicUser] = None¶
-
class
atoti.config.
OidcAuthentication
(provider_id=None, issuer_url=None, client_id=None, client_secret=None, paths_to_authorities=None, role_mapping=<factory>)¶ Bases:
atoti.config._auth.Auth
,atoti.config._utils.Mergeable
OpenID connect authentication.
-
client_id
: Optional[str] = None¶
-
client_secret
: Optional[str] = None¶
-
issuer_url
: Optional[str] = None¶
-
provider_id
: Optional[str] = None¶
-
role_mapping
: Optional[Mapping[str, Collection[str]]] = None¶
-