pytelefonipapi - Python services for convenient work with telefon-ip.ru api
Установка
Пользуем pip:
pip install pytelefonipapi
Зависимости
python>=3.10
requests
pydantic>=2.9.2
Как использовать
Все названия методов соответствуют action в ссылке (смотрите документацию). Пример названия метода:
- api/v1/authcalls/<token>/get_code/<phone>/ -
get_code
Варианты импорта Вы можете импортировать
TelefonIpAPI - с всеми доступными методами
SettingAPI - только методы для работы с аккаунтом
FlashCallsAPI - только запросы кода авторизации
BackCallsAPI - только запрос обратной авторизации
TGCodeAPI - только запрос кода в Telegram
SMSCodeAPI - только запрос sms
Так же прошу вас обратить внимание на аннотацию типов аргументов
Если вам нужно чтобы ответ был в dict - то при инициализации укажите аргумент return_dict = True
api = TelefonIpAPI(token, return_dict=True)
# Либо
api = TelefonIpAPI(token,)
api.return_dict = True
Example
import logging
from datetime import datetime
from pytelefonipapi import TelefonIpAPI, FlashCallsAPI, SettingAPI
TOKEN = ""
logger = logging.getLogger(__name__)
logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG)
# Получаем биллинг файлом
api = TelefonIpAPI(token=TOKEN, debug=True, logger=logger)
api.get_billing_csv(datetime.now(), "./files/", "1.csv")
# #api.get_billing_csv("2025-04-19", "./files/", "1.csv")
api_flash_calls = FlashCallsAPI(token=TOKEN, debug=True, logger=logger)
# print(api.get_code(phone="+79969307003",))
api_settings = SettingAPI(token=TOKEN, debug=True, logger=logger)
balance = api_settings.get_balance()
Metadata
Release files for pytelefonipapi 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytelefonipapi-0.0.3.tar.gz | 11.0 kB | Without provenance | Details for pytelefonipapi-0.0.3.tar.gz |
Release files / pytelefonipapi-0.0.3.tar.gz
| Download URL | pytelefonipapi-0.0.3.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75e39340eaf50e65487f3d0fe6e2aa6f97b65f7e3b0edc88ecfcefb60c1d110a
|
|
BLAKE2b-256 checksum How to use checksums |
4decb0c0577f4a636ae6440684c2fec62fcd4db5dbaef63faaef4881f7575e01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.7
|
Security for pytelefonipapi 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.