aries_cloudagent.admin package


aries_cloudagent.admin.base_server module

Abstract admin server interface.

class aries_cloudagent.admin.base_server.BaseAdminServer[source]

Bases: abc.ABC

Admin HTTP server class.

abstract async start() None[source]

Start the webserver.


AdminSetupError – If there was an error starting the webserver

abstract async stop() None[source]

Stop the webserver.

aries_cloudagent.admin.error module

Admin error classes.

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

Bases: aries_cloudagent.core.error.BaseError

Base class for Admin-related errors.

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

Bases: aries_cloudagent.admin.error.AdminError

Admin server setup or configuration error.

aries_cloudagent.admin.request_context module

Admin request context class.

A request context provided by the admin server to admin route handlers.

class aries_cloudagent.admin.request_context.AdminRequestContext(profile: aries_cloudagent.core.profile.Profile, *, context: Optional[aries_cloudagent.config.injection_context.InjectionContext] = None, settings: Optional[Mapping[str, object]] = None, root_profile: Optional[aries_cloudagent.core.profile.Profile] = None, metadata: Optional[dict] = None)[source]

Bases: object

Context established by the Conductor and passed into message handlers.

inject(base_cls: Type[aries_cloudagent.config.base.InjectType], settings: Optional[Mapping[str, object]] = None) aries_cloudagent.config.base.InjectType[source]

Get the provided instance of a given class identifier.

  • cls – The base class to retrieve an instance of

  • settings – An optional mapping providing configuration to the provider


An instance of the base class, or None

inject_or(base_cls: Type[aries_cloudagent.config.base.InjectType], settings: Optional[Mapping[str, object]] = None, default: Optional[aries_cloudagent.config.base.InjectType] = None) Optional[aries_cloudagent.config.base.InjectType][source]

Get the provided instance of a given class identifier or default if not found.

  • base_cls – The base class to retrieve an instance of

  • settings – An optional dict providing configuration to the provider

  • default – default return value if no instance is found


An instance of the base class, or None

property injector: aries_cloudagent.config.injector.Injector

Accessor for the associated Injector instance.

property metadata: dict

Accessor for the associated metadata.

property profile: aries_cloudagent.core.profile.Profile

Accessor for the associated Profile instance.

property root_profile: Optional[aries_cloudagent.core.profile.Profile]

Accessor for the associated root_profile instance.

session() aries_cloudagent.core.profile.ProfileSession[source]

Start a new interactive session with no transaction support requested.

property settings: aries_cloudagent.config.settings.Settings

Accessor for the context settings.

classmethod test_context(session_inject: Optional[dict] = None, profile: Optional[aries_cloudagent.core.profile.Profile] = None) aries_cloudagent.admin.request_context.AdminRequestContext[source]

Quickly set up a new admin request context for tests.

transaction() aries_cloudagent.core.profile.ProfileSession[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.

update_settings(settings: Mapping[str, object])[source]

Update the current scope with additional settings.

aries_cloudagent.admin.server module