Python клиент для Telecore Telegram Database API с поддержкой proxy
Project description
Telecore API Client
Python клиент для работы с Telecore Telegram Database API с поддержкой proxy.
Установка
pip install telecore-api
Быстрый старт
from pipy import TelecoreAPI
# Создание клиента
api = TelecoreAPI(api_key="your-api-key")
# С proxy
api = TelecoreAPI(
api_key="your-api-key",
proxy="socks5://localhost:1080"
)
# Поиск пользователей
result = api.search_users(username="durov")
for user in result.data:
print(f"{user.user_id}: {user.first_name}")
# Семантический поиск
result = api.semantic_search("уязвимость CVE", limit=10)
for msg in result.data.results:
print(f"[{msg.score:.2f}] {msg.text[:50]}")
# Баланс
balance = api.get_balance()
print(f"Баланс: {balance.data.balance}")
api.close()
Async
import asyncio
from pipy import AsyncTelecoreAPI
async def main():
async with AsyncTelecoreAPI(api_key="your-key") as api:
users = await api.search_users(username="example")
print(users.data)
asyncio.run(main())
Proxy Support
# HTTP/HTTPS
api = TelecoreAPI(api_key="xxx", proxy="http://proxy:8080")
# SOCKS5
api = TelecoreAPI(api_key="xxx", proxy="socks5://localhost:1080")
# С аутентификацией
api = TelecoreAPI(api_key="xxx", proxy="http://user:pass@proxy:8080")
API Методы
| Метод | Описание |
|---|---|
search_users() |
Поиск пользователей |
get_user_messages() |
Сообщения пользователя |
get_message_context() |
Контекст сообщения |
semantic_search() |
Семантический поиск |
get_user_history() |
История изменений профиля |
search_history() |
Поиск по истории |
search_channels() |
Поиск каналов |
get_channel_info() |
Информация о канале |
get_balance() |
Баланс аккаунта |
License
MIT
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
telecore_api-1.1.1.tar.gz
(10.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file telecore_api-1.1.1.tar.gz.
File metadata
- Download URL: telecore_api-1.1.1.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e008a2cc3e518395d654dae41757fc11854b4e494fb8957e2423b6ab762b9de
|
|
| MD5 |
12f721a0e37410e79bed32c99a243b77
|
|
| BLAKE2b-256 |
c1b839ef385a25572812214650f5e9d5f5cf8bd0deed533724ab590ebbb3e2f0
|
File details
Details for the file telecore_api-1.1.1-py3-none-any.whl.
File metadata
- Download URL: telecore_api-1.1.1-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cb2025335fd89c4393df951792b1e0f06e50a12e1c36d79d39b63ce84018297
|
|
| MD5 |
28720e0ed5d25b62778586c865320f0e
|
|
| BLAKE2b-256 |
79089c221ba141b4dd9b7f26c104f2218209acfb032489d582c3a2c2ab9208d4
|