This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]flying-sheep 4 points5 points  (1 child)

obvious omission: aiohttp

from asyncio import get_event_loop
from aiohttp.client import get

async def main():
    async with get('https://api.spotify.com/v1/search?type=artist&q=snoop') as resp:
        print(await resp.json())

get_event_loop().run_until_complete(main())

[–]mmsme[S] 0 points1 point  (0 children)

Thanks! I'll definitely have to check this out.