Skip to content

saalaus/vk-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VK CLI

Python version

Call VK API methods from terminal.

Installation

Install with pip

  pip install vk-cli

Usage

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

Shell

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=" ")
Павел Дуров