Skip to main content

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=3807035855 phone_number='79238944456' activation_cost=0.2 
    # country_code='0' can_get_another_sms=True activation_time='2025-07-08 10:49:27' 
    # operator='mtt' 
    
    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
    
asyncio.run(main())

Project details


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.2.0.tar.gz (107.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiosmsactivate-1.2.0-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

Details for the file aiosmsactivate-1.2.0.tar.gz.

File metadata

  • Download URL: aiosmsactivate-1.2.0.tar.gz
  • Upload date:
  • Size: 107.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for aiosmsactivate-1.2.0.tar.gz
Algorithm Hash digest
SHA256 156bd8b9db68b9c28229ec7b93477f823c2f450cccf77762e65122738c7ff933
MD5 64de6256fc1bc38dd533033d4d19ef8a
BLAKE2b-256 29f30bccb4e97aa4147a3499c4f371516962dd4b13c920dad5b6b7ea44b404ef

See more details on using hashes here.

File details

Details for the file aiosmsactivate-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: aiosmsactivate-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 36.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for aiosmsactivate-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3bd30e728210933bfdaeda9cef2d1e423b19d026ad746b451a06b1da2040034
MD5 b0c85acf3d6da3e359d443a7d154c301
BLAKE2b-256 db183ffa7cbe9fb2a8525ad9331fae8990b1268e7a00215e6e1a802ccb70dda4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page