Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fsoky/vktools
VkTools - дополнительные инструменты для vk-api
https://github.com/fsoky/vktools
api python vk vk-api vktools
Last synced: 2 months ago
JSON representation
VkTools - дополнительные инструменты для vk-api
- Host: GitHub
- URL: https://github.com/fsoky/vktools
- Owner: Fsoky
- Created: 2021-08-13T06:19:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-06T10:05:39.000Z (12 months ago)
- Last Synced: 2024-10-12T19:00:12.706Z (2 months ago)
- Topics: api, python, vk, vk-api, vktools
- Language: Python
- Homepage: https://pypi.org/project/vktools
- Size: 566 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VkTools - дополнительные инструменты для vk-api
### Инструменты 🛠
![Python](https://img.shields.io/badge/Python-3.10-blue?style=for-the-badge&logo=python)
![Json](https://img.shields.io/badge/json-red?style=for-the-badge&logo=json)
![typing](https://img.shields.io/badge/typing-orange?style=for-the-badge)### Установка 💾
- Установка, используя пакетный менеджер pip
```
$ pip install vktools
```
- Установка с GitHub *(требуется [git](https://git-scm.com/downloads))*
```
$ git clone https://github.com/Fsoky/vktools
$ cd vktools
$ python setup.py install
```
- Или
```
$ pip install git+https://github.com/Fsoky/vktools
```### Клавиатура
```py
from vktools import Keyboard, ButtonColor, Text, OpenLink, Locationkeyboard = 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](https://github.com/Fsoky/vktools/blob/main/images/keyboard_image.png)
### Карусель
```py
from vktools import Keyboard, ButtonColor, Text, Carousel, Elementcarousel = 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](https://github.com/Fsoky/vktools/blob/main/images/carousel_image.png)
### Присоединяйся к нам
[![Vkontakte](https://img.shields.io/badge/Vkontakte-black?style=for-the-badge&logo=VK)](https://vk.com/fsoky)
[![YouTube](https://img.shields.io/badge/YouTube-red?style=for-the-badge&logo=YouTube)](https://youtube.com/c/Фсоки)
[![Telegram](https://img.shields.io/badge/Telegram-blue?style=for-the-badge&logo=Telegram)](https://t.me/fsokycommunity)