Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tarekziade
Created April 4, 2017 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarekziade/10b964edc3400e1c766fed652a5e7fbd to your computer and use it in GitHub Desktop.
Save tarekziade/10b964edc3400e1c766fed652a5e7fbd to your computer and use it in GitHub Desktop.
Smowgger Example
import asyncio
from smwogger import API
async def run_heartbeat():
async with API('__api__.json') as api:
res = await api.__heartbeat__()
body = await res.json()
print(body)
loop = asyncio.get_event_loop()
try:
loop.run_until_complete(run_heartbeat())
finally:
loop.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment