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

Generalize error return #20

Open
dbutenhof opened this issue Oct 11, 2021 · 0 comments
Open

Generalize error return #20

dbutenhof opened this issue Oct 11, 2021 · 0 comments

Comments

@dbutenhof
Copy link
Member

Currently pyesbulk returns an error summary tuple; this should at least be packaged into a cleaner named tuple. However, more importantly, error documents discovered when traversing the response generator are written to a file pointer as pretty-printed JSON, which is difficult for a caller to consume.

I'd like to repackage pyesbulk as an object, with the existing entry points being thin compatibility wrappers as in many other packages. Ideally, the object bulk methods would return a list of JSON dicts (or possibly a generator, in case there are many?), which the caller could consume more easily. (The compatibility wrapper would pretty-print and write to the file as it does now.)

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

1 participant