telyx 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
telyx-0.0.1/.gitignore ADDED
@@ -0,0 +1,16 @@
1
+ node_modules/
2
+ .next/
3
+ dist/
4
+ build/
5
+ *.tgz
6
+ *.egg-info/
7
+ __pycache__/
8
+ .venv/
9
+ .env*
10
+ !.env.example
11
+ *.tsbuildinfo
12
+ .registry-lock
13
+ *.tmp
14
+ artifacts/
15
+
16
+ .python-tools/
telyx-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 nnolyk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
telyx-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.5
2
+ Name: telyx
3
+ Version: 0.0.1
4
+ Summary: Premium Telegram icons for developers
5
+ Project-URL: Owner, https://t.me/nnolyk
6
+ Project-URL: Telegram, https://core.telegram.org/bots/api
7
+ Author: nnolyk
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: custom-emoji,emoji,icons,telegram
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Typing :: Typed
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+
17
+ # Telyx
18
+
19
+ Premium Telegram icons for developers.
20
+
21
+ ## Установить сейчас — одной командой
22
+
23
+ Из корневой папки этого проекта (Python 3.10+):
24
+
25
+ ```bash
26
+ pip install ./python
27
+ ```
28
+
29
+ Или скачайте готовый wheel со страницы `/docs#installation`, откройте терминал в папке с файлом и выполните:
30
+
31
+ ```bash
32
+ pip install telyx-0.0.1-py3-none-any.whl
33
+ ```
34
+
35
+ Команда `pip install telyx` станет командой установки этого проекта после его первой публикации в PyPI. Пакет пока не опубликован. Библиотека работает отдельно от сайта и не требует запущенного Next.js.
36
+
37
+ ## Сообщения
38
+
39
+ ```python
40
+ import telyx as tx
41
+
42
+ await bot.send_message(chat_id, f"{tx.circle_check} Готово!", parse_mode="HTML")
43
+ ```
44
+
45
+ ## Инлайн-кнопки — без ручных ID
46
+
47
+ Установите выбранную библиотеку для бота отдельно, например `pip install -U aiogram`.
48
+
49
+ ```python
50
+ import telyx as tx
51
+ from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup
52
+
53
+ keyboard = InlineKeyboardMarkup(inline_keyboard=[
54
+ [InlineKeyboardButton(**tx.wallet.button("Баланс", callback_data="balance"))],
55
+ [InlineKeyboardButton(**tx.crown.button("Premium", url="https://t.me/nnolyk"))],
56
+ ])
57
+ await bot.send_message(chat_id, "Выберите действие", reply_markup=keyboard)
58
+ ```
59
+
60
+ В кнопках `text` — обычный текст, не HTML. `.button()` подставляет техническое поле иконки самостоятельно. Для кнопки выберите ровно одно действие: `callback_data` (1–64 UTF-8 байта) или `url`. Полный бот с обработчиком нажатий: `examples/aiogram_buttons.py`. Запуск: задайте `BOT_TOKEN`, затем `python examples/aiogram_buttons.py`.
61
+
62
+ Для обычной emoji в тексте кнопки передайте `custom_emoji=False`. Telegram custom emoji зависят от условий Bot API: https://core.telegram.org/bots/api#inlinekeyboardbutton. Пакет не предоставляет Premium-возможности сам по себе.
63
+
64
+ `from telyx.telegram import inline_button, keyboard_button` — независимые от фреймворка функции для словарей Bot API. Актуальные aiogram, telebot и python-telegram-bot принимают поля через `**`.
65
+
66
+ ---
67
+
68
+ ## API
69
+
70
+ `tx.get`, `tx.exists`, `tx.search`, `tx.render`, `tx.load_registry`. Именованные импорты: `from telyx import wallet, crown`. Объекты иконок неизменяемые; строковое представление — Telegram HTML.
71
+
72
+ MIT — код; данные иконок сохраняют собственные права. Автор: https://t.me/nnolyk
telyx-0.0.1/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # Telyx
2
+
3
+ Premium Telegram icons for developers.
4
+
5
+ ## Установить сейчас — одной командой
6
+
7
+ Из корневой папки этого проекта (Python 3.10+):
8
+
9
+ ```bash
10
+ pip install ./python
11
+ ```
12
+
13
+ Или скачайте готовый wheel со страницы `/docs#installation`, откройте терминал в папке с файлом и выполните:
14
+
15
+ ```bash
16
+ pip install telyx-0.0.1-py3-none-any.whl
17
+ ```
18
+
19
+ Команда `pip install telyx` станет командой установки этого проекта после его первой публикации в PyPI. Пакет пока не опубликован. Библиотека работает отдельно от сайта и не требует запущенного Next.js.
20
+
21
+ ## Сообщения
22
+
23
+ ```python
24
+ import telyx as tx
25
+
26
+ await bot.send_message(chat_id, f"{tx.circle_check} Готово!", parse_mode="HTML")
27
+ ```
28
+
29
+ ## Инлайн-кнопки — без ручных ID
30
+
31
+ Установите выбранную библиотеку для бота отдельно, например `pip install -U aiogram`.
32
+
33
+ ```python
34
+ import telyx as tx
35
+ from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup
36
+
37
+ keyboard = InlineKeyboardMarkup(inline_keyboard=[
38
+ [InlineKeyboardButton(**tx.wallet.button("Баланс", callback_data="balance"))],
39
+ [InlineKeyboardButton(**tx.crown.button("Premium", url="https://t.me/nnolyk"))],
40
+ ])
41
+ await bot.send_message(chat_id, "Выберите действие", reply_markup=keyboard)
42
+ ```
43
+
44
+ В кнопках `text` — обычный текст, не HTML. `.button()` подставляет техническое поле иконки самостоятельно. Для кнопки выберите ровно одно действие: `callback_data` (1–64 UTF-8 байта) или `url`. Полный бот с обработчиком нажатий: `examples/aiogram_buttons.py`. Запуск: задайте `BOT_TOKEN`, затем `python examples/aiogram_buttons.py`.
45
+
46
+ Для обычной emoji в тексте кнопки передайте `custom_emoji=False`. Telegram custom emoji зависят от условий Bot API: https://core.telegram.org/bots/api#inlinekeyboardbutton. Пакет не предоставляет Premium-возможности сам по себе.
47
+
48
+ `from telyx.telegram import inline_button, keyboard_button` — независимые от фреймворка функции для словарей Bot API. Актуальные aiogram, telebot и python-telegram-bot принимают поля через `**`.
49
+
50
+ ---
51
+
52
+ ## API
53
+
54
+ `tx.get`, `tx.exists`, `tx.search`, `tx.render`, `tx.load_registry`. Именованные импорты: `from telyx import wallet, crown`. Объекты иконок неизменяемые; строковое представление — Telegram HTML.
55
+
56
+ MIT — код; данные иконок сохраняют собственные права. Автор: https://t.me/nnolyk
@@ -0,0 +1,19 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27"]
3
+ build-backend = "hatchling.build"
4
+ [project]
5
+ name = "telyx"
6
+ version = "0.0.1"
7
+ description = "Premium Telegram icons for developers"
8
+ readme = "README.md"
9
+ requires-python = ">=3.10"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ authors = [{name = "nnolyk"}]
13
+ keywords = ["telegram", "emoji", "icons", "custom-emoji"]
14
+ classifiers = ["Programming Language :: Python :: 3", "Typing :: Typed", "Operating System :: OS Independent"]
15
+ [project.urls]
16
+ Owner = "https://t.me/nnolyk"
17
+ Telegram = "https://core.telegram.org/bots/api"
18
+ [tool.hatch.build.targets.wheel]
19
+ packages = ["telyx"]
@@ -0,0 +1,13 @@
1
+ from .model import Icon, Registry
2
+ from .api import get, exists, search, render, load_registry
3
+
4
+ def __getattr__(name: str) -> Icon:
5
+ try:
6
+ return get(name)
7
+ except KeyError:
8
+ raise AttributeError(f"Unknown Telyx icon: {name}") from None
9
+
10
+ def __dir__():
11
+ return sorted(set(globals()) | {icon.slug[3:].replace('-','_') for icon in search('')})
12
+
13
+ __all__ = ['Icon','Registry','get','exists','search','render','load_registry'] + [icon.slug[3:].replace('-','_') for icon in search('')]