Skip to main content

Upload Python Package

SmsPilotPy

Не официальный клиент API проекта SMSPilot

https://smspilot.ru/

Установка

pip install sms-pilot-py

Пример использования

from sms_pilot import SmsPilot

API_KEY = 'XXXXXXXXXXXXYYYYYYYYYYYYZZZZZZZZXXXXXXXXXXXXYYYYYYYYYYYYZZZZZZZZ'

api = SmsPilot(API_KEY, default_sender='INFORM')

result = api.send_message(79201112223, 'Привет, мир!')
print(result.status, result.get_status_verbose()) 
print(result.cost)

# Запрос PING
ping_response = api.ping(79201112223)
# time.sleep(10)
ping_result = api.check_ping_hlr(ping_response.server_id)

if ping_result.is_ot_of_service():
    print('Не обслуживается')

Отправка нескольких сообщений

from sms_pilot import SmsPilot
from sms_pilot import Callback

API_KEY = 'XXXXXXXXXXXXYYYYYYYYYYYYZZZZZZZZXXXXXXXXXXXXYYYYYYYYYYYYZZZZZZZZ'

api = SmsPilot(API_KEY, default_sender='INFORM')

api.add_message(79221112233, 'Hello')
api.add_message(79221112222, 'Привет', sender='MYSENDER')
api.add_message(79122334434, 'Привет мир', id=455, callback=Callback('https://smspilot.ru/callback', 'POST'))
result = api.send_messages()

print(result.cost)

for msg_result in result.send:
    print(msg_result.status, msg_result.id)

Для использования требуется регистрация на https://smspilot.ru

Больше информации о API на http://www.smspilot.ru/apikey.php

Metadata

Release files for sms-pilot-py 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sms-pilot-py 0.3
File Size Uploaded Provenance Actions
sms-pilot-py-0.3.tar.gz 7.7 kB Without provenance Details for sms-pilot-py-0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sms-pilot-py 0.3
File Interpreter ABI Platform Actions
sms_pilot_py-0.3-py3-none-any.whl Python 3 none any Details for sms_pilot_py-0.3-py3-none-any.whl

Total release size: 16.6 kB

Release files / sms-pilot-py-0.3.tar.gz

Download URL sms-pilot-py-0.3.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e62c5dc51a054b8d1aadbe424e972ef497b4f15d77e534a43407324b94018734
BLAKE2b-256 checksum
How to use checksums
70aa367521c219ac86353222657dad21fe21f2ef129d82576edc07ee61c97d65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

Release files / sms_pilot_py-0.3-py3-none-any.whl

Download URL sms_pilot_py-0.3-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2423d564bd6d132904272074319d91ce3aae60566207dd38627dd6942191edaf
BLAKE2b-256 checksum
How to use checksums
ec0b6dd328592a79ae6ec2dabfbdd93be00860f2ac9e2651623eaaba1ecb6ce2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

Security for sms-pilot-py 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.

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page