Created
April 4, 2017 14:00
-
-
Save tarekziade/10b964edc3400e1c766fed652a5e7fbd to your computer and use it in GitHub Desktop.
Smowgger Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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