python-dependency-injector/examples/miniapps/api_client/api.py
2020-01-26 18:41:36 -05:00

16 lines
414 B
Python

"""API client module."""
class ApiClient:
"""Some API client."""
def __init__(self, host, api_key):
"""Initialize instance."""
self.host = host
self.api_key = api_key
def call(self, operation, data):
"""Make some network operations."""
print('API call [{0}:{1}], method - {2}, data - {3}'.format(
self.host, self.api_key, operation, repr(data)))