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.1.0.tar.gz (104.4 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.1.0-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aiosmsactivate-1.1.0.tar.gz
Algorithm Hash digest
SHA256 edff6a35609064a20c95d4c0b57fd6e48c4d5afe2f080fdda2a3016e49a15d45
MD5 806334bf903f2478e64c78d64b4fbe45
BLAKE2b-256 0faf2c19c53a93192332993ce371ce3bddb016af422258b124780367ebc4f3f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aiosmsactivate-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.7 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c05b5052e53c19f6387aeb08dcfd54559252a82b218749d9c1cb0729651a34a5
MD5 79ee0024a01270014d8d0a76bdd672d1
BLAKE2b-256 5eff0693c5a65a77e5e6151d9e824c1f1af923e4f997b8cbc149ff662f517b6a

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