acapy_agent.askar package

Subpackages

Submodules

acapy_agent.askar.profile module

acapy_agent.askar.profile_anon module

Manage Aries-Askar profile interaction.

class acapy_agent.askar.profile_anon.AskarAnonCredsProfile(opened: AskarOpenStore, context: InjectionContext | None = None, *, profile_id: str | None = None)[source]

Bases: Profile

Provide access to Aries-Askar profile interaction methods.

BACKEND_NAME: str | None = 'askar-anoncreds'
TEST_PROFILE_NAME = 'test-profile'
bind_providers()[source]

Initialize the profile-level instance providers.

async close()[source]

Close the profile instance.

init_ledger_pool()[source]

Initialize the ledger pool.

property name: str

Accessor for the profile name.

async remove()[source]

Remove the profile.

session(context: InjectionContext | None = None) AskarAnonCredsProfileSession[source]

Start a new interactive session with no transaction support requested.

property store: aries_askar.Store

Accessor for the opened Store instance.

transaction(context: InjectionContext | None = None) AskarAnonCredsProfileSession[source]

Start a new interactive session with commit and rollback support.

If the current backend does not support transactions, then commit and rollback operations of the session will not have any effect.

class acapy_agent.askar.profile_anon.AskarAnonCredsProfileSession(profile: AskarAnonCredsProfile, is_txn: bool, *, context: InjectionContext | None = None, settings: Mapping[str, Any] = None)[source]

Bases: ProfileSession

An active connection to the profile management backend.

property handle: aries_askar.Session

Accessor for the Session instance.

property is_transaction: bool

Check if the session supports commit and rollback operations.

property store: aries_askar.Store

Accessor for the Store instance.

class acapy_agent.askar.profile_anon.AskarAnonProfileManager[source]

Bases: ProfileManager

Manager for Aries-Askar stores.

async classmethod generate_store_key(seed: str | None = None) str[source]

Generate a raw store key.

async open(context: InjectionContext, config: Mapping[str, Any] = None) Profile[source]

Open an instance of an existing profile.

async provision(context: InjectionContext, config: Mapping[str, Any] = None) Profile[source]

Provision a new instance of a profile.

acapy_agent.askar.store module

Askar store configuration and management.

class acapy_agent.askar.store.AskarOpenStore(config: AskarStoreConfig, created: bool, store: aries_askar.Store)[source]

Bases: object

Handle and metadata for an opened Askar store.

async close()[source]

Close and optionally remove the store.

config: AskarStoreConfig
created: bool
property name: str

Accessor for the store name.

store: aries_askar.Store
class acapy_agent.askar.store.AskarStoreConfig(config: dict | None = None)[source]

Bases: object

Helper for handling Askar store configuration.

DEFAULT_KEY = ''
DEFAULT_KEY_DERIVATION = 'kdf:argon2i:mod'
SUPPORTED_STORAGE_TYPES = ('sqlite', 'postgres')
get_uri(create: bool = False, in_memory: bool | None = False) str[source]

Construct the storage URI.

async open_store(provision: bool = False, in_memory: bool | None = False) AskarOpenStore[source]

Open or provision the store based on configuration.

async remove_store()[source]

Remove the store if it exists.