title: How do I add type hints to fuctions with boto3 objects in python?
body: <p>How do I add type hints to functions using boto3 without using external libraries like mypy_boto3?
  This is especially confusing with the boto3.client which returns the object of the type botocore.client.s3 which is unavailable to import.</p>
  <p>Example functions to annotate in script below would be <code>get_client</code> and <code>list_objects</code>:</p>
  <pre><code>import boto3
  
  
  def get_client():
      return boto3.client('s3')
  
  
  def list_objects(client):
      response = client.list_objects(Bucket=&quot;a&quot;, Prefix=&quot;b&quot;)
      for content in response.get('Contents', []):
          yield content.get('Key')
  
  
  client = get_client()
  for f in list_objects(client):
      print(f)
  
  </code></pre>
  <p>I am getting started in <code>typing</code> module and had a look at different options available in python 3.6+ , but am unclear on what would be the type hints for runtime types like the object returned by <code>boto3.client</code> in this case.</p>