"""API Client for snapshot_contracts dockerized lambda.""" import requests class DockerizedLambdaAPIClient: """API Client for snapshot_contracts dockerized lambda.""" def __init__(self, base_url, headers): """Initialize DockerizedLambdaAPIClient class.""" self.base_url = base_url self.headers = headers def post_lambda(self, date, body): """Invoke the lambda.""" endpoint = '{}/{}/functions/function/invocations'.format(self.base_url, date) return requests.post(endpoint, headers=self.headers, json=body)