Call VK API methods from terminal.
Install with pip
pip install vk-cli
Help
> vk -h
Usage: python -m vk [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
api Call the API
profile Proile commands
shell start shell
Create new profile
vk profile new --access-token <VK TOKEN>
API call
vk api users.get user_id=1
Run Shell
vk shell
Shel is it interactive python shell, but you can call to api vk
>>> response = API.users.get(user_id=1)
>>> user = user["response"][0]
>>> print(user["first_name"], user["last_name"], sep=" ")
Павел Дуров