Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining Data Transfer Objects (in terms of @dataclass) for easier development #133

Closed
ggoggam opened this issue Jun 8, 2022 · 1 comment

Comments

@ggoggam
Copy link

ggoggam commented Jun 8, 2022

Hello, thank you for creating such a great project.

I was wondering if there is a plan to add pre-defiend DTOs for API request / response since the official API is out of beta.

Currently, API endpoint invocations return generic SyncAsync[T] types, which makes development a bit cumbersome.

From what I am aware of, the following libs are options for defining DTOs:

  • dataclasses is built-in from 3.7, but cannot serialize / deserialize nested object (dataclasses-json).
  • pydantic has good serialization / deserialization features, but a bit heavier than the other.
@ramnes
Copy link
Owner

ramnes commented Jun 8, 2022

Hi, and thanks for the kind words!

This is a duplicate of #9, have a look if you want more context.

I guess you'll be interested in @jheddings' abstraction, notional.

@ramnes ramnes closed this as completed Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants