Skip to main content

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

Project description

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()
        ]
    ]
)

Карусель

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)]
        )     
    ]
)

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

Vkontakte YouTube Telegram

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vktools-1.0.4.tar.gz (2.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page