{"id":27034,"library":"gspread-asyncio","title":"GSpread Asyncio","description":"An asyncio wrapper for the gspread library for Google Sheets API. Version 2.0.0 brings compatibility with gspread 6.0 and includes breaking changes. Actively maintained, with releases every few months.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/dgilman/gspread_asyncio","tags":["google-sheets","asyncio","gspread","async"],"install":[{"cmd":"pip install gspread-asyncio","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for Google Sheets interaction","package":"gspread","optional":false},{"reason":"Used for authentication in examples","package":"oauth2client","optional":true},{"reason":"Alternative modern authentication","package":"google-auth-oauthlib","optional":true}],"imports":[{"note":"gspread itself does not have async classes","wrong":"from gspread import AsyncioGspreadClientManager","symbol":"AsyncioGspreadClientManager","correct":"from gspread_asyncio import AsyncioGspreadClientManager"},{"note":"Not directly needed typically, use manager to get client","wrong":null,"symbol":"AsyncioGspreadClient","correct":"from gspread_asyncio import AsyncioGspreadClient"},{"note":"","wrong":null,"symbol":"AsyncioGspreadSpreadsheet","correct":"from gspread_asyncio import AsyncioGspreadSpreadsheet"},{"note":"","wrong":null,"symbol":"AsyncioGspreadWorksheet","correct":"from gspread_asyncio import AsyncioGspreadWorksheet"}],"quickstart":{"code":"import asyncio\nfrom gspread_asyncio import AsyncioGspreadClientManager\n\ndef get_creds():\n    # Replace with your own credentials\n    return None\n\nasync def main():\n    agcm = AsyncioGspreadClientManager(get_creds)\n    agc = await agcm.authorize()\n    ss = await agc.open_by_key('your_spreadsheet_key')\n    ws = await ss.get_worksheet(0)\n    val = await ws.acell('A1')\n    print(val.value)\n\nasyncio.run(main())","lang":"python","description":"Authorize and read a cell value from a Google Sheet asynchronously."},"warnings":[{"fix":"Swap arguments or use keyword arguments: ws.update(values=[['a','b']], range_name='A1:B2')","message":"AsyncioGspreadWorksheet.update() argument order changed in v2.0.0: update(values, range_name) instead of update(range_name, values).","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use gspread's copy method or manual sheet duplication via API if necessary.","message":"AsyncioGspreadSpreadsheet.duplicate() is deprecated and will be removed in a future version; avoid using it.","severity":"deprecated","affected_versions":">=1.9.0"},{"fix":"Ensure every call to a method returning a coroutine is preceded with await.","message":"All gspread-asyncio methods must be awaited; forgetting await leads to coroutine objects instead of results.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Call ws.update(values, range_name) or use keyword arguments: ws.update(values=[...], range_name='...')","cause":"In v2.0.0, update() changed from (range_name, values) to (values, range_name).","error":"TypeError: AsyncioGspreadWorksheet.update() takes 2 positional arguments but 3 were given"},{"fix":"Check the actual class name: `from gspread_asyncio import AsyncioGspreadClientManager` and then use `.authorize()` to get a client.","cause":"Importing incorrectly, e.g., `from gspread_asyncio import AsyncioGspreadClient` but the class is named AsyncioGspreadClient or similar variant.","error":"AttributeError: module 'gspread_asyncio' has no attribute 'AsyncioGspreadClient'"},{"fix":"Ensure all async code runs on the same event loop; prefer asyncio.run() over manual loop handling.","cause":"Mixing asyncio event loops, often due to creating the event loop after calling asyncio.run() or using multiple threads.","error":"RuntimeError: Task <Task pending ...> got Future <Future pending ...> attached to a different loop"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}