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 #466

Open
iAnanich opened this issue Jun 18, 2017 · 5 comments
Open

Asyncio support #466

iAnanich opened this issue Jun 18, 2017 · 5 comments

Comments

@iAnanich
Copy link

I'm using gspread as driver for storage for items from scrapy spiders. And there is many items from one job, so gspread takes a long time to write them all.

I think, that it can work faster if making requests in async. Can it be so?

@seppestas
Copy link

You can provide your own [http session object] (https://gspread.readthedocs.io/en/latest/#gspread.Client) when initializing a gspread client, so in theory you can implement something wrapping e.g aiohttp so you execute your HTTP request async.

I don't know if this would have any advantage over just creating multiple gspread client instances though.

@dgilman
Copy link
Contributor

dgilman commented Jun 25, 2018

I've written an asyncio API for gspread that wraps the gspread client and adds a few more high-level features. If adding an async API is on the table for gspread I would be willing to open a PR if @burnash will give feedback on what needs to be done to get it merged, otherwise I can release it as its own package.

@dgilman
Copy link
Contributor

dgilman commented Oct 23, 2018

My gspread_asyncio library is now available on PyPI.

@battogtokhb
Copy link

@dgilman Thanks for writing this!

@lavigne958
Copy link
Collaborator

Hi @dgilman thank you very much for you work, I'll look into it, that might be something of interest for sure ! thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants