Skip to content

Application Service

application_service

Inbound port for stateless application-service orchestrators.

ApplicationService

Bases: InboundPort[RequestType, Result[ResponseType, object]], Protocol

Protocol for a stateless application-service orchestrator.

Source code in src/forging_blocks/application/ports/inbound/application_service.py
@runtime_checkable
class ApplicationService[RequestType, ResponseType](
    InboundPort[RequestType, Result[ResponseType, object]],
    Protocol,
):
    """Protocol for a stateless application-service orchestrator."""

    async def execute(self, request: RequestType) -> Result[ResponseType, object]:
        """Execute the business logic for *request*."""
        ...

execute(request: RequestType) -> Result[ResponseType, object] async

Execute the business logic for request.

Source code in src/forging_blocks/application/ports/inbound/application_service.py
async def execute(self, request: RequestType) -> Result[ResponseType, object]:
    """Execute the business logic for *request*."""
    ...