Python asyncio wrapper for sms-activate.io API
Project description
AioSmsActivate
Getting Started
Simple usage
from aiosmsactivate import SmsActivate
from aiosmsactivate.types import SetActivationStatus
import asyncio
sa = SmsActivate('token')
async def main():
balance = await sa.get_balance()
print(balance) # 6.25
number = await sa.purchase('ya')
number.activation_id # 3807035855
number.phone_number # '79238944456'
number.operator # 'mtt'
print(number)
# activation_id=3809954454 phone_number='79927146212' activation_cost=0.2
# country_code='0' can_get_another_sms=True activation_time='2025-07-09 01:14:45'
# operator='mtt' activation_unix_time=1654093857
code = await number.wait_sms_code(timeout=300)
print(code) # 1234
status = await number.get_activation_status()
await number.set_activation_status(SetActivationStatus.CANCEL) # Отменить номер || Cancel number
await number.set_activation_status(8) # Отменить номер || Cancel number
service = await sa.get_service('ya', 0) # 0 it is ru country
print(service)
# code='ya' name='Yandex/Uber' country='0'
# price=0.115 retail_price=0.2 free_price_map={'0.3067': 17134, '0.3065': 16996, ...}
# count=11049 physical_count=5334
asyncio.run(main())
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
aiosmsactivate-1.4.1.tar.gz
(110.4 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 aiosmsactivate-1.4.1.tar.gz.
File metadata
- Download URL: aiosmsactivate-1.4.1.tar.gz
- Upload date:
- Size: 110.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9246c8b9cf23bac1b318d937f046d662c5cc56f890680523a6d9bf43b3ed4a22
|
|
| MD5 |
ca0726e1776d2b3b6477c1d35933b467
|
|
| BLAKE2b-256 |
b33b1ce4af339e1f6bcb12a39c7cbcf69eb24e63597174e8e1ce181bd7e37429
|
File details
Details for the file aiosmsactivate-1.4.1-py3-none-any.whl.
File metadata
- Download URL: aiosmsactivate-1.4.1-py3-none-any.whl
- Upload date:
- Size: 36.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c965968a7238e3fce727186b24dd7bc7f710d0b54d59e04ca4498eb539a79d4a
|
|
| MD5 |
5625d357475a649198d632a01500309e
|
|
| BLAKE2b-256 |
8656d2e1888f3352651d87ec3dfd871a880ee9e563a9445ab266d722f66efabe
|