bayesline.api#

Description of the public-facing API for bayesline.

Core#

AsyncBayeslineApi()

Abstract base class for Bayesline API operations.

BayeslineApi()

Abstract base class for Bayesline API operations.

AsyncBayeslineApi()

Abstract base class for Bayesline API operations.

Authentication API#

ACLEntry

An individual ACL entry granting specific permissions to a principal for a resource.

ACLError

Base exception for ACL-related errors.

ACLValidationError

Raised when ACL data fails validation.

CreateACLEntry

Request model for creating a new ACL entry.

CreateGroupMembership

Request model for adding a user to a group.

CreateUserGroup

Request model for creating a new user group.

CreateUserRole

Request model for assigning a role to a user.

GroupCreationError

Raised when creating a group fails.

GroupDeletionError

Raised when deleting a group fails.

GroupMembership

Represents a user's membership in a group.

GroupMembershipError

Raised when adding or removing users from groups fails.

GroupUpdateError

Raised when updating a group fails.

PermissionDeniedError

Raised when a user attempts an action they don't have permission for.

PermissionGrantError

Raised when granting a permission fails.

PermissionLevel(value[, names, module, ...])

Permission levels for resource access.

PrincipalNotFoundError

Raised when a principal (user/group/role) referenced in ACL operations doesn't exist.

PrincipalType(value[, names, module, ...])

Types of principals that can be granted permissions.

ResourceNotFoundError

Raised when a resource referenced in ACL operations doesn't exist.

ResourcePermissionSummary

Summary of a user's permissions for a specific resource.

ResourceType(value[, names, module, ...])

Types of resources that can be protected by ACL.

RoleAssignmentError

Raised when assigning or revoking roles fails.

RoleType(value[, names, module, qualname, ...])

Built-in system roles with predefined permissions.

UpdateACLEntry

Request model for updating an existing ACL entry.

UpdateUserGroup

Request model for updating an existing user group.

UserGroup

A group of users for simplified permission management.

UserPermissionsSummary

Complete summary of a user's permissions across all resources.

UserRef

alias of str

UserRole

Represents a user's system role assignment.

expand_roles(held_roles)

Expand assigned roles into every role they fulfil via the hierarchy.

role_satisfies(held_roles, required_role)

Return whether the held roles satisfy required_role per the hierarchy.

AsyncPermissionsApi()

Abstract base class for asynchronous ACL-based permissionining API operations.

PermissionsApi()

Abstract base class for synchronous ACL-based permissionining API operations.

Settings API#

AsyncRegistryBasedApiBase()

Concrete base for RegistryBasedApi implementations.

AsyncSettingsRegistry()

Abstract base class for settings registries.

AsyncTypedSettingsRegistry()

Abstract base class for typed settings registries.

RegistryBasedApiBase()

Concrete base for RegistryBasedApi implementations.

SettingsIdentifiers

Holds mappings of globally unique settings identifiers to other properties.

SettingsRegistry()

Abstract base class for settings registries.

TypedSettingsRegistry()

Abstract base class for typed settings registries.

CouldNotDeleteSettingsError

Raised when a settings object could not be deleted from the registry.

CouldNotPermissionSettingsError

Raised when a settings object could not be permissioned.

CouldNotSaveSettingsError

Raised when a settings object could not be saved to the registry.

DatasetAwareSettings

Settings bound to a dataset.

DatasetError

Exception raised for dataset-related errors.

DeleteItemResult

The result of a single delete operation.

DeleteResult

The result of a batch delete operation.

EmptySettingsMenu

Empty settings menu implementation.

ItemResult

The result of a single item operation, e.g. delete on a single settings object.

ItemStatus(value[, names, module, qualname, ...])

The status of a single item operation, e.g. delete on a single settings object.

PermissionItemResult

The result of a single permission operation.

PermissionResult

The result of a batch permission operation.

RawSettings

Raw settings data structure.

SaveItemResult

The result of a single save operation.

SaveResult

The result of a batch save operation.

SettingInvalid(name, id, owner, raw_json, issues)

A settings result that exists but is invalid.

SettingNotFound(name, id[, kind])

A settings result that could not be found.

SettingNotPermissioned(name, id, owner[, kind])

A settings result that exists but the current user does not have read permissions.

SettingResult

alias of SettingValid[T] | SettingInvalid | SettingNotFound | SettingNotPermissioned

Settings

Base class for all settings objects.

SettingsMenu

Abstract base class for settings menus.

SettingsMetaData

Metadata for settings objects.

SettingsRegistryError

Raised when an unexpected error occurs in the settings registry.

SettingsRegistryResult

The result of a batch operation, e.g. a batch delete operation.

SettingsTransferObject

A settings transfer object.

SettingValid(name, id, owner, value, ...[, kind])

A settings result that exists and is valid.

expect_valid(result)

Like unwrap_valid, but returns the SettingValid wrapper.

unwrap_valid(result)

Convert a SettingResult[T] into the bare DatasetAwareSettings[T].

REPORT_SETTINGS_TYPES

Built-in mutable sequence.

RISKDATASET_SETTINGS_TYPES

Built-in mutable sequence.

SETTINGS_TYPES

Built-in mutable sequence.

migrate_raw_json(settings_type, raw_json)

Apply sequential migrations to raw_json and strip the version key.

parse_stored(settings_type, raw_json)

Migrate and validate persisted raw JSON into a Settings instance.

stamp_version(settings_type, raw_json)

Stamp the current schema version into raw_json for persistence.

strip_meta_keys(raw_json)

Return raw_json without storage-level meta keys.

validate_migration_chain(settings_type)

Validate that a settings type has a complete chain of migrations.

DATASET_KEY

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Tasks API#

AsyncTask()

Abstract base class representing a task that produces a result of type T.

AsyncTasksApi()

Abstract base class for synchronous task API operations.

Task()

Abstract base class representing a task that produces a result of type T.

TaskError

Exception raised when a task operation fails.

TaskProgress

The progress of a task.

TaskResponse

Response model for task operations.

TasksApi()

Abstract base class for synchronous task API operations.

TaskState(value[, names, module, qualname, ...])

The state of a task.