-
Notifications
You must be signed in to change notification settings - Fork 46
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
Async requests #175
Async requests #175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the example with python=3.11
.
Notices missing dependency urllib3
which is not specified in the requirements but imported in src/pyDataverse/__init__.py
.
Except for that the example works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the example with python=3.11
.
Notices missing dependency urllib3
which is not specified in the requirements but imported in src/pyDataverse/__init__.py
.
Except for that the example works as expected.
@haeussma thanks for the review! I have added |
Changes this PR introduces
This pull request adds async support to pyDataverse based on the previously merged switch from
requests
tohttpx
. Asynchronous requests significantly improve pyDataverse's performance by using concurrent requests. The implementation provides a seamless usage to work either sync or async by the usage of a context manager.Small benchmark
api/info/version
to demo.dataverse.orgOverview
_sync_request
and_async_request
base methodsAPI
to enable async requestsExample
Synchronous
Asynchronous