aries_cloudagent.multitenant package



aries_cloudagent.multitenant.askar_profile_manager module

aries_cloudagent.multitenant.base module

aries_cloudagent.multitenant.cache module

Cache for multitenancy profiles.

class aries_cloudagent.multitenant.cache.ProfileCache(capacity: int)[source]

Bases: object

Profile cache that caches based on LRU strategy.

get(key: str) Optional[Profile][source]

Get profile with associated key from cache.

If a profile is open but has been evicted from the cache, this will reinsert the profile back into the cache. This prevents attempting to open a profile that is already open. Triggers clean up.


key (str) – the key to get the profile for.


Profile if found in cache.

Return type


has(key: str) bool[source]

Check whether there is a profile with associated key in the cache.


key (str) – the key to check for a profile


Whether the key exists in the cache

Return type


put(key: str, value: Profile) None[source]

Add profile with associated key to the cache.

If new profile exceeds the cache capacity least recently used profiles that are not used will be removed from the cache.

  • key (str) – the key to set

  • value (Profile) – the profile to set

remove(key: str)[source]

Remove profile with associated key from the cache.


key (str) – The key to remove from the cache.

aries_cloudagent.multitenant.error module

Multitenant error classes.

exception aries_cloudagent.multitenant.error.WalletKeyMissingError(*args, error_code: Optional[str] = None, **kwargs)[source]

Bases: BaseError

Wallet key missing exception.

aries_cloudagent.multitenant.manager module

aries_cloudagent.multitenant.manager_provider module

Profile manager for multitenancy.

class aries_cloudagent.multitenant.manager_provider.MultitenantManagerProvider(root_profile)[source]

Bases: BaseProvider

Multitenant manager provider.

Decides which manager to use based on the settings.

MANAGER_TYPES = {'askar-profile': 'aries_cloudagent.multitenant.askar_profile_manager.AskarProfileMultitenantManager', 'basic': 'aries_cloudagent.multitenant.manager.MultitenantManager'}
askar_profile_manager_path = 'aries_cloudagent.multitenant.askar_profile_manager.AskarProfileMultitenantManager'
provide(settings: BaseSettings, injector: BaseInjector)[source]

Create the multitenant manager instance.

aries_cloudagent.multitenant.route_manager module