botodto


Namebotodto JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/lmmx/botodto
SummaryPydantic interface codegen from Amazon Smithy JSON schemas
upload_time2023-06-10 15:33:48
maintainerLouis Maddox
docs_urlNone
authorLouis Maddox
requires_python>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements defopt pydantic
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lmmx/botodto",
    "name": "botodto",
    "maintainer": "Louis Maddox",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "louismmx@gmail.com",
    "keywords": "",
    "author": "Louis Maddox",
    "author_email": "louismmx@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8c/4e/6bdaa3563981e468a08acd860344a70eee347a204cb4905fa68d34aaf248/botodto-0.0.2.tar.gz",
    "platform": null,
    "description": "# botodto\n\nPydantic model codegen from AWS OpenAPI schemas generated from the AWS JS/TS SDK (v3)\n\n## Mission statement\n\nThe goal of this library is to wrap `boto3` clients so that all calls to AWS APIs through them\nare ingested into, and emit responses as Pydantic models.\n\n## Implementation\n\nOpenAPI schemas are produced from the AWS Javascript SDK (v2)\n[in the OpenAPI Directory](https://github.com/APIs-guru/openapi-directory/tree/master/APIs/amazonaws.com)\nby [the `aws2openapi` tool](https://github.com/APIs-guru/aws2openapi).\n\nThese can be used to produce reliable Pydantic data models using [`datamodel-code-generator`][dcg]\n(_to clarify_: with minimal? no? manual editing of the result).\n\n[dcg]: datamodel-code-generator \"https://github.com/koxudaxi/datamodel-code-generator\"\n\nMy implementation will take one of the following routes [_TBD_]:\n\n- [ ] replaces the `aws2openapi` tool with a Python converter for the v3 SDK (simplest approach, more work?)\n  - Theoretically this is the nicest approach\n  - It isn't a good idea to approach this without a proof of concept that the proposed solution is viable\n\n- [ ] amends the OpenAPI schema generated by `aws2openapi` from the v2 SDK to include exceptions from the v3 SDK\n  - This could be a neat solution\n\n- [ ] amends the Pydantic models to include exceptions from the v3 SDK (potentially awkward manual mapping exercise, but least work?)\n  - This could be a simple proof of concept\n\nI propose to start with the latter approach, for a single service, end to end, and stub out the other services.\nAfter this is shown to work, automate the process for the other services.\n\n## Reliability\n\n- I will use a test suite to check the results work for all schemas (there are a lot!)\n\n- I would like to avoid manual data transfer or generation where possible to make this repeatable,\n  and not deteriorate after writing.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pydantic interface codegen from Amazon Smithy JSON schemas",
    "version": "0.0.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/lmmx/botodto/issues",
        "Homepage": "https://github.com/lmmx/botodto",
        "Source Code": "https://github.com/lmmx/botodto"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "09105a5c854635583677a65397552fef0c601aa772000fb667593a0ce917b527",
                "md5": "7010dba5d8a23ff9a9e15dfc84506496",
                "sha256": "41db2a44d686f3cf075e9dbacd8e64c6cc6b08c4131704cb36bc4dd94be7bf77"
            },
            "downloads": -1,
            "filename": "botodto-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7010dba5d8a23ff9a9e15dfc84506496",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 65279,
            "upload_time": "2023-06-10T15:33:47",
            "upload_time_iso_8601": "2023-06-10T15:33:47.261028Z",
            "url": "https://files.pythonhosted.org/packages/09/10/5a5c854635583677a65397552fef0c601aa772000fb667593a0ce917b527/botodto-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c4e6bdaa3563981e468a08acd860344a70eee347a204cb4905fa68d34aaf248",
                "md5": "55d507b462f40b54c94ad9ccdf091906",
                "sha256": "5763bedcd2ac350ef022572de19bc388f0db1c617984bc63a97fff782f34c1a7"
            },
            "downloads": -1,
            "filename": "botodto-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "55d507b462f40b54c94ad9ccdf091906",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 64133,
            "upload_time": "2023-06-10T15:33:48",
            "upload_time_iso_8601": "2023-06-10T15:33:48.657646Z",
            "url": "https://files.pythonhosted.org/packages/8c/4e/6bdaa3563981e468a08acd860344a70eee347a204cb4905fa68d34aaf248/botodto-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-10 15:33:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lmmx",
    "github_project": "botodto",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "defopt",
            "specs": []
        },
        {
            "name": "pydantic",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "botodto"
}
        
Elapsed time: 0.09305s