from anydi import singleton from owsclient import OwsClient from app.models import Event @singleton class OwsTextCampaignsClient: service_name = "ows-text-campaigns" def __init__(self, ows_client: OwsClient) -> None: self.ows_client = ows_client def forward_message( self, event: Event, ) -> None: response = self.ows_client.post( self.service_name, path="/twilio/inbound", json=event.body ) response.raise_for_status()