Use async / await for requests
Opened this issue · 2 comments
skasberger commented
Check out if usage of async / await for requests is reasonable. Especially check testing, mocking and Python dependencies.
Prepare
- Research
- Read https://lucumr.pocoo.org/2020/1/1/async-pressure/
- https://www.youtube.com/watch?v=BI0asZuqFXM
- https://www.youtube.com/watch?v=NLaeCFr_FlI
- https://www.youtube.com/watch?v=tSLDcRkgTsY
- https://docs.python.org/3/library/asyncio.html
- https://www.youtube.com/watch?v=F19R_M4Nay4
- https://www.youtube.com/watch?v=Xbl7XjFYsN4
- https://www.youtube.com/watch?v=E7Yn5biBZ58
- https://www.youtube.com/watch?v=-CzqsgaXUM8
- Technical Solution
- Check Tests
- Research
- Mocking
- Check if vcrpy works
- Prototype for basic request
- Tools
- https://pypi.org/project/pytest-asyncio/
- https://aiounittest.readthedocs.io/en/latest/asynctestcase.html
- https://fastapi.tiangolo.com/advanced/async-tests/
- https://dino.codes/posts/mocking-asynchronous-functions-python/
- https://docs.aiohttp.org/en/stable/testing.html
- kevin1024/vcrpy#339
- kevin1024/vcrpy#398
- Prototype
- Basic requests
- Tests
- Mocking
- Python 3.6, 3.7, 3.8
- Evaluate if useful
Implementation
- Write tests
- Update code
- [ ]
- [ ]
- [ ]
- Update Docs
- Update Docstrings
- Run pytest
- Run tox
- Run pylint
- Run mypy
Review
- Code
- Tests
- Docs
Follow-Ups
- [ ]
-
- [ ]
- [ ]
pdurbin commented
As discussed during the 2024-02-14 meeting of the pyDataverse working group, we are closing old milestones in favor of a new project board at https://github.com/orgs/gdcc/projects/1 and removing issues (like this one) from those old milestones. Please feel free to join the working group! You can find us at https://py.gdcc.io and https://dataverse.zulipchat.com/#narrow/stream/377090-python