You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

vktools

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vktools

Инструменты для модуля vk-api. Клавиатура и карусели.

1.0.8
PyPI
Maintainers
1

VkTools - дополнительные инструменты для vk-api

Инструменты 🛠

Python Json typing

Установка 💾

  • Установка, используя пакетный менеджер pip
$ pip install vktools
  • Установка с GitHub (требуется git)
$ git clone https://github.com/Fsoky/vktools
$ cd vktools
$ python setup.py install
  • Или
$ pip install git+https://github.com/Fsoky/vktools

Клавиатура

from vktools import Keyboard, ButtonColor, Text, OpenLink, Location

keyboard = Keyboard(
    [
        [
            Text("RED", ButtonColor.NEGATIVE),
            Text("GREEN", ButtonColor.POSITIVE),
            Text("BLUE", ButtonColor.PRIMARY),
            Text("WHITE")
        ],
        [
            OpenLink("YouTube", "https://youtube.com/c/Фсоки"),
            Location()
        ]
    ]
)

.add_keyboard() - получить JSON клавиатуры
.get_empty_keyboard() - Удалить клавиатуру

Keyboard

Карусель

from vktools import Keyboard, ButtonColor, Text, Carousel, Element

carousel = Carousel(
    [
        Element(
            "The First Title",
            "The First Description",
            "-000000_1111111", # ID фотографии
            "https://vk.com/fsoky", # Редирект при клике
            [Text("Button 1", ButtonColor.POSITIVE)]
        ),
        Element(
            "The Second Title",
            "The Second Description",
            "-000000_1111111",
            "https://vk.com/fsoky",
            [Text("Button 2", ButtonColor.NEGATIVE)]
        )     
    ]
)

.add_carousel() - Получить JSON карусели

Carousel

Присоединяйся к нам

Vkontakte YouTube Telegram

Keywords

vktools vk vk-api api

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts