from owsclient import OwsClient from pydantic import BaseModel class Identity(BaseModel): id: str email: str name: str class OwsUsersClient: service_name = "ows-users" def __init__(self, ows_client: OwsClient) -> None: self.ows_client = ows_client def get_identity(self, identity_id: str) -> Identity: response = self.ows_client.get( self.service_name, path=f"/users/identity/{identity_id}" ) response.raise_for_status() return Identity.model_validate_json(response.content)