Metadata-Version: 2.1
Name: botodto
Version: 0.0.2
Summary: Pydantic interface codegen from Amazon Smithy JSON schemas
Home-page: https://github.com/lmmx/botodto
Author: Louis Maddox
Author-email: louismmx@gmail.com
Maintainer: Louis Maddox
Maintainer-email: louismmx@gmail.com
License: MIT
Project-URL: Bug Tracker, https://github.com/lmmx/botodto/issues
Project-URL: Source Code, https://github.com/lmmx/botodto
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: tests
Provides-Extra: dev
License-File: LICENSE

# 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](https://github.com/APIs-guru/openapi-directory/tree/master/APIs/amazonaws.com)
by [the `aws2openapi` tool](https://github.com/APIs-guru/aws2openapi).

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

[dcg]: datamodel-code-generator "https://github.com/koxudaxi/datamodel-code-generator"

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.
