Инструменты для модуля 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()
]
]
)
.add_keyboard()
- получить JSON клавиатуры
.get_empty_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 карусели
Присоединяйся к нам
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.8.tar.gz
(3.4 kB
view details)
File details
Details for the file vktools-1.0.8.tar.gz
.
File metadata
- Download URL: vktools-1.0.8.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f04a70440a2315588584e2bbfbfd9e99bbaedc92d0593fc999882a7cf3fe0edc |
|
MD5 | ea21643f880b67fb8a3c624370f14908 |
|
BLAKE2b-256 | 25d1cb7f933fbec4a4a9b1edb888055f4c515dab623f921b00ba4ad72bba07e7 |