Async VK API built with asks and trio.
Inspired by vk.
pip install async-vk-api
pip install git+https://github.com/Suenweek/async-vk-api#egg=async-vk-api
import os
import trio
import async_vk_api
async def main():
# Make API
access_token = os.getenv('VK_API_ACCESS_TOKEN')
api = async_vk_api.make_api(access_token, version='5.89')
# Use methods
user, = await api.users.get(user_ids=1)
assert user['id'] == 1
assert user['first_name'] == 'Pavel'
assert user['last_name'] == 'Durov'
if __name__ == '__main__':
trio.run(main)
For the list of available methods see https://vk.com/dev/methods.