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

.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

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.8.tar.gz (3.4 kB view details)

Uploaded Source

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

Hashes for vktools-1.0.8.tar.gz
Algorithm Hash digest
SHA256 f04a70440a2315588584e2bbfbfd9e99bbaedc92d0593fc999882a7cf3fe0edc
MD5 ea21643f880b67fb8a3c624370f14908
BLAKE2b-256 25d1cb7f933fbec4a4a9b1edb888055f4c515dab623f921b00ba4ad72bba07e7

See more details on using hashes here.

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