Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/saalaus/vk-cli

Call VK API in terminal
https://github.com/saalaus/vk-cli

cli cli-app vk vk-api vk-cli vkontakte-api

Last synced: about 1 month ago
JSON representation

Call VK API in terminal

Awesome Lists containing this project

README

        

# VK CLI
[![Python version](https://img.shields.io/pypi/pyversions/vk-cli)](https://img.shields.io/pypi/pyversions/vk-cli)

Call VK API methods from terminal.

## Installation

Install with pip

```bash
pip install vk-cli
```

## Usage
Help
```bash
> 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
```bash
vk profile new --access-token
```

API call
```bash
vk api users.get user_id=1
```

## Shell
Run Shell
```bash
vk shell
```
Shel is it interactive python shell, but you can call to api vk
```Py
>>> response = API.users.get(user_id=1)
>>> user = user["response"][0]
>>> print(user["first_name"], user["last_name"], sep=" ")
Павел Дуров
```