Skip to main content

botodto

Pydantic model codegen from AWS OpenAPI schemas generated from the AWS JS/TS SDK (v3)

Mission statement

The goal of this library is to wrap boto3 clients so that all calls to AWS APIs through them are ingested into, and emit responses as Pydantic models.

Implementation

OpenAPI schemas are produced from the AWS Javascript SDK (v2) in the OpenAPI Directory by the aws2openapi tool.

These can be used to produce reliable Pydantic data models using datamodel-code-generator (to clarify: with minimal? no? manual editing of the result).

My implementation will take one of the following routes [TBD]:

  • replaces the aws2openapi tool with a Python converter for the v3 SDK (simplest approach, more work?)

    • Theoretically this is the nicest approach
    • It isn't a good idea to approach this without a proof of concept that the proposed solution is viable
  • amends the OpenAPI schema generated by aws2openapi from the v2 SDK to include exceptions from the v3 SDK

    • This could be a neat solution
  • amends the Pydantic models to include exceptions from the v3 SDK (potentially awkward manual mapping exercise, but least work?)

    • This could be a simple proof of concept

I propose to start with the latter approach, for a single service, end to end, and stub out the other services. After this is shown to work, automate the process for the other services.

Reliability

  • I will use a test suite to check the results work for all schemas (there are a lot!)

  • I would like to avoid manual data transfer or generation where possible to make this repeatable, and not deteriorate after writing.

Metadata

Release files for botodto 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for botodto 0.0.2
File Size Uploaded
botodto-0.0.2.tar.gz 64.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for botodto 0.0.2
File Interpreter ABI Platform
botodto-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 129.4 kB

Release files / botodto-0.0.2.tar.gz

Download URL botodto-0.0.2.tar.gz
Size 64.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5763bedcd2ac350ef022572de19bc388f0db1c617984bc63a97fff782f34c1a7
BLAKE2b-256 checksum
How to use checksums
8c4e6bdaa3563981e468a08acd860344a70eee347a204cb4905fa68d34aaf248
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / botodto-0.0.2-py3-none-any.whl

Download URL botodto-0.0.2-py3-none-any.whl
Size 65.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41db2a44d686f3cf075e9dbacd8e64c6cc6b08c4131704cb36bc4dd94be7bf77
BLAKE2b-256 checksum
How to use checksums
09105a5c854635583677a65397552fef0c601aa772000fb667593a0ce917b527
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page