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.3.0.tar.gz (109.8 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.3.0-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aiosmsactivate-1.3.0.tar.gz
Algorithm Hash digest
SHA256 59c0ec0f2a6693137c8d1e6b0b43268d8684d40860d5fb2b5b2e24a8cb9976ac
MD5 f294f971b62e47d6e994a83099e007db
BLAKE2b-256 c81092a8a47aeb35c2ea3a89860a2ac6094e8c6b6610307765ebcd0ba3ae237a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aiosmsactivate-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 36.4 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f59f87b3931ff484635c0abb63d5e519ec82a30693265737d9ae736aca2f55d
MD5 5f47c6f6f2abe2bee18ae6e90fdbf992
BLAKE2b-256 b31faeb25d79623923d0e0e173c1abe3baa1d14944a490da4f8c1c5362cf1a22

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