ShapeParser#
Mypy_boto3_builder Index / Mypy Boto3 Builder / Parsers / ShapeParser
Auto-generated documentation for mypy_boto3_builder.parsers.shape_parser module.
ShapeParser#
Show source in shape_parser.py:74
Parser for botocore shape files.
Arguments#
session
- Boto3 session.service_name
- ServiceName.
Signature#
See also#
ShapeParser._get_streaming_body#
Show source in shape_parser.py:449
Get the streaming member's shape if any; or None otherwise.
Signature#
ShapeParser().fix_method_arguments_for_mypy#
Show source in shape_parser.py:984
Accept both input and output shapes in method arguments.
mypy does not compare TypedDicts, so we need to accept both input and output shapes. https://github.com/youtype/mypy_boto3_builder/issues/209
Signature#
See also#
ShapeParser().fix_typed_dict_names#
Show source in shape_parser.py:923
Fix typed dict names to avoid duplicates.
Signature#
ShapeParser().get_client_method_map#
Show source in shape_parser.py:235
Get client methods from shape.
Returns#
A map of method name to Method.
Signature#
See also#
ShapeParser().get_collection_batch_methods#
Show source in shape_parser.py:843
Get batch operations for Resource collection.
Arguments#
name
- Collection record name.collection
- Boto3 Collection.class_type
- Collection self type annotation.
Returns#
List of Method records.
Signature#
See also#
ShapeParser().get_collection_filter_method#
Show source in shape_parser.py:805
Get filter
classmethod for Resource collection.
Arguments#
name
- Collection record name.collection
- Boto3 Collection.class_type
- Collection class type annotation.
Returns#
Filter Method record.
Signature#
def get_collection_filter_method(
self, name: str, collection: Collection, self_type: FakeAnnotation
) -> Method: ...
See also#
ShapeParser().get_paginate_method#
Show source in shape_parser.py:545
Get Paginator paginate
method.
Arguments#
paginator_name
- Paginator name.
Returns#
Method.
Signature#
See also#
ShapeParser().get_paginator_names#
Show source in shape_parser.py:153
Get available paginator names.
Returns#
A list of paginator names.
Signature#
ShapeParser().get_resource_method_map#
Show source in shape_parser.py:669
Get methods for Resource.
Arguments#
- ShapeParser().resource_name - Resource name.
Returns#
A map of method name to Method.
Signature#
See also#
ShapeParser().get_service_resource_method_map#
Show source in shape_parser.py:634
Get methods for ServiceResource.
Returns#
A map of method name to Method.
Signature#
See also#
ShapeParser().get_wait_method#
Show source in shape_parser.py:601
Get Waiter wait
method.
Arguments#
waiter_name
- Waiter name.
Returns#
Method.
Signature#
See also#
ShapeParser().parse_shape#
Show source in shape_parser.py:463
Parse any botocore shape to TypeAnnotation.
Arguments#
shape
- Botocore shape.output
- Whether shape should use strict output types.output_child
- Whether shape parent is marked as output.is_streaming
- Whether shape should be streaming.
Returns#
TypeAnnotation or similar class.
Signature#
def parse_shape(
self,
shape: Shape,
output: bool = False,
output_child: bool = False,
is_streaming: bool = False,
) -> FakeAnnotation: ...
See also#
ShapeParser().resource_name#
Show source in shape_parser.py:114
Parsed resource name.
Signature#
ShapeParserError#
Show source in shape_parser.py:68
Main error for ShapeParser.