aries_cloudagent.admin package

Submodules

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.

add_webhook_target(target_url: str, topic_filter: Sequence[str] = None, max_attempts: int = None)[source]

Add a webhook target.

remove_webhook_target(target_url: str)[source]

Remove a webhook target.

send_webhook(topic: str, payload: dict)[source]

Add a webhook to the queue, to send to all registered targets.

start() → None[source]

Start the webserver.

Raises:AdminSetupError – If there was an error starting the webserver
stop() → None[source]

Stop the webserver.

aries_cloudagent.admin.error module

Admin error classes.

exception aries_cloudagent.admin.error.AdminError(*args, error_code: 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: str = None, **kwargs)[source]

Bases: aries_cloudagent.admin.error.AdminError

Admin server setup or configuration error.

aries_cloudagent.admin.server module

Admin server classes.

class aries_cloudagent.admin.server.AdminModulesSchema(*args, **kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Schema for the modules endpoint.

result

Used by autodoc_mock_imports.

class aries_cloudagent.admin.server.AdminResponder(context: aries_cloudagent.config.injection_context.InjectionContext, send: Coroutine[T_co, T_contra, V_co], webhook: Coroutine[T_co, T_contra, V_co], **kwargs)[source]

Bases: aries_cloudagent.messaging.responder.BaseResponder

Handle outgoing messages from message handlers.

send_outbound(message: aries_cloudagent.transport.outbound.message.OutboundMessage)[source]

Send outbound message.

Parameters:message – The OutboundMessage to be sent
send_webhook(topic: str, payload: dict)[source]

Dispatch a webhook.

Parameters:
  • topic – the webhook topic identifier
  • payload – the webhook payload value
class aries_cloudagent.admin.server.AdminServer(host: str, port: int, context: aries_cloudagent.config.injection_context.InjectionContext, outbound_message_router: Coroutine[T_co, T_contra, V_co], webhook_router: Callable, task_queue: aries_cloudagent.utils.task_queue.TaskQueue = None, conductor_stats: Coroutine[T_co, T_contra, V_co] = None)[source]

Bases: aries_cloudagent.admin.base_server.BaseAdminServer

Admin HTTP server class.

add_webhook_target(target_url: str, topic_filter: Sequence[str] = None, max_attempts: int = None)[source]

Add a webhook target.

make_application() → <sphinx.ext.autodoc.importer._MockObject object at 0x7faf6a1cff98>[source]

Get the aiohttp application instance.

on_startup(app: <sphinx.ext.autodoc.importer._MockObject object at 0x7faf6a1cff98>)[source]

Perform webserver startup actions.

plugins_handler(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7faf6a1cff98>)[source]

Request handler for the loaded plugins list.

Parameters:request – aiohttp request object
Returns:The module list response
redirect_handler(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7faf6a1cff98>)[source]

Perform redirect to documentation.

remove_webhook_target(target_url: str)[source]

Remove a webhook target.

send_webhook(topic: str, payload: dict)[source]

Add a webhook to the queue, to send to all registered targets.

start() → None[source]

Start the webserver.

Raises:AdminSetupError – If there was an error starting the webserver
status_handler(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7faf6a1cff98>)[source]

Request handler for the server status information.

Parameters:request – aiohttp request object
Returns:The web response
status_reset_handler(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7faf6a1cff98>)[source]

Request handler for resetting the timing statistics.

Parameters:request – aiohttp request object
Returns:The web response
stop() → None[source]

Stop the webserver.

websocket_handler(request)[source]

Send notifications to admin client over websocket.

class aries_cloudagent.admin.server.AdminStatusSchema(*args, **kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Schema for the status endpoint.

class aries_cloudagent.admin.server.WebhookTarget(endpoint: str, topic_filter: Sequence[str] = None, max_attempts: int = None)[source]

Bases: object

Class for managing webhook target information.

topic_filter

Accessor for the target’s topic filter.