Инструменты для модуля vk-api. Клавиатура и карусели.
Project description
VkTools - дополнительные инструменты для vk-api
Инструменты 🛠
Установка 💾
- Установка, используя пакетный менеджер 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)]
)
]
)
Присоединяйся к нам
Project details
Release history Release notifications | RSS feed
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)