Skip to content

gist for typesafe client generation #9

@gsemyong

Description

@gsemyong

here is a small gist to generate typed python client https://gist.github.com/gsemyong/8abb433aa3bb6094644b0f2185dece81

it has some limitations (i made it for my particular use case), but making it feature complete is a matter of couple of hours tops. from my exploration, the best approach will be to use something like ts-morph to read generated type definitions and maybe generate a nested file structure to improve naming (until inline typed dicts arrive). this gist uses simpler approach where it parses function spec json and generates everything in one file with nested dataclasses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions