reagento / dataclass-rest Goto Github PK
View Code? Open in Web Editor NEWA modern and simple way to create clients for REST like APIs
License: Apache License 2.0
A modern and simple way to create clients for REST like APIs
License: Apache License 2.0
Via custom headers or auth params
add decorator like
@on(404, Model)
So ApiError[Model] will be raised
Hi!
Does your wrapper have the ability to send requests with an authentication token?
As a client I could provide an endpoint and authorization data, and in return I could receive, for example, a json web token. This assumes correct operation in a concurrent environment within one service instance and caching of the token until it expires
In the get_query_params_schema method of the BoundMethod class, when installed using pip, print is called in this format print("get_query_params_schema", self.name,
self.query_params_schema_getter)
Add decorator to send json rpc requests instead of simple post
where body should be awaited?
Sometimes URL is constructed in more complicated way than just string interpolation.
We can support it by allowing user to pass function as URL generator.
E.g
def url_generator(xxx: str):
if not xxx:
return "/me"
return f"/users/{xxx}"
@get(url_generator)
def foo(self, xxx: str) ->Result:
pass
Hi! There are people who want to use this repo in their work. But our policies forbid usage of software without a license. Please add one that you think is suitable for this project.
It's ok not to define separate class for POST body, but to use it's arguments
factory = Factory()
factory.load(response, Contract)
rises
ValueError: can not convert python name that not follow snake_case
If we have parsing error we need to understand what was the origin: our models or other issues.
For compatibility we can add come unused paramtetrs.
Decorator must hav option to ignore some
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.