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.1.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.1-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aiosmsactivate-1.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 387d32944de965fdd62da21bcb2e00e5eb699e71b11a226109762851a314b44b
MD5 654614dfab88c33a1356c88f7f64e2e6
BLAKE2b-256 5e2f26aa23fbdd10fe97a9f17c1325cb2b7e358086b5db42e3f9cd5bffc58a49

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aiosmsactivate-1.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 96a29248013731ab64d3a9420e22ac48176a06bff8a9ef7eea5ec98e9bd1730d
MD5 2bc7f2da0d4eeabb9a77b95e68cc439a
BLAKE2b-256 106d1341f893ff2fe06962fece767af5024c00383a4896b7fa25a6e324caf138

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