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

Asyncio support #54

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Asyncio support #54

wants to merge 4 commits into from

Conversation

adamAfro
Copy link

It uses asyncio to speed up fetching multiple entities of the same type. Open Alex has now rate limit 10/s so it may be a significant boost as up to 9 new requests don't have to wait for a previous one to be resolved

from pyalex import Works, concurrent
worker = lambda x: Works().search_filter( **x )
targets = [{"title": "science"}, {"title": "fiction"}]
await concurrent(worker, targets, frequency=10)

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

Successfully merging this pull request may close these issues.

1 participant