How mypy-boto3-builder works
mainmypy-boto3-builder is a code generator that creates Python type stubs (.pyi files) for AWS SDK libraries like boto3, aioboto3, and aiobotocore.
It follows a pipeline architecture:
- Parsing: Extracts AWS service definitions from
botocoreusingParsers. - Structuring: Converts raw definitions into an internal data model using
Structures(Data Transfer Objects). - Generating: Transforms the internal model into a target library format using
Generators(Strategy Pattern). - Rendering: Uses Jinja2
Templatesto produce the final Python code.
This pipeline allows the tool to support hundreds of AWS services and multiple target SDK formats by simply swapping generators and templates.