-
Notifications
You must be signed in to change notification settings - Fork 8
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
Batch Operations and data standardization proposal #2
Comments
Just my thoughts. |
A jsonschema document for validation can be pulled out and used in any client library not just Python. |
Ah, yes, I totally agree, the output data should be in JSON format. I was proposing Pydantic partially because it has JSON output |
Will definitely look at that. You won't find any opposition to JSON from me, part of the reason for dabbling with python. The language is new to me, so certainly open to suggestions. |
Will be looking into some JSON validation as well as translating XML to JSON for output. I did make a minor modification I'm going to put up to post() method. Seems it was assuming the "data" was a singleton object; should now check to see if it's getting a list and post through all items at once if so. |
Hi,
Thank you so much for drafting up this API.
As title suggest, I'd love to propose two addional features to this API.
Batch Operations. This would be really useful because at least in our use case, we wanted to POST and GET as much as possible. Here's a sample implementation that suited our need, but i think it can be easily adjusted to a more generic one
batch get
batch post this might not be a good example, input to the function should probably be a dictionary/Pydantic model, and then the function will translate that into XML format, but the idea of batch posting is there
Standardizing Data types. Dictionaries are great, but it will be even better if libraries such as Pydantic can be used. The perks of using it is that it will provide out of the box data validation (like which data are required, which are optional, default fields, data type, etc) and also it will give the developer a very clear idea of what the data looks like. We have actually already created Pydantics models that you can easily use/adapt.
ElinkGetResponseModel
ElinkPostResponseModel
You might want to consider changing the names
Thank you very much! I think this API will help a lot of developers to get their data in quickly.
Best,
Michael Wu
The text was updated successfully, but these errors were encountered: