A FastAPI-inspired client library #14665
phalt
started this conversation in
Show and tell
Replies: 1 comment
-
|
Looks very similar to https://github.com/reagento/descanso |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello folks.
I recently built an API client library that is heavily inspired by the style of FastAPI and how it leverages decorators and types.
Strongly typed validation
You can use types to enforce data validation on the responses:
You can do the same when you're sending POST/PUT/PATCH/DELETE requests too:
Other features
response_parsercallback or a simpleresponse_map.httpx.Clientif you prefer full control.But, why?
One of FastAPI's successes is the way they use decorators and types:
I took that idea and applied it to a client library to see if it would work, and I think it does?
Docs etc
Project can be found at https://github.com/phalt/clientele - please ⭐ if you like it!
Documentation can be found at https://clientele.spice.tools/
Background and the original blog post where I explored this idea: https://paulwrites.software/articles/python-api-clients
What do you think?
Give it a try, and let me know what you think 😸
Beta Was this translation helpful? Give feedback.
All reactions