Skip to main content

No project description provided

Project description

Mobizon Client

Ссылка на официальную документацию

Примеры:

Асинхронный клиент

import asyncio
from mobizon_client import AsyncMobizonClient


async def main():
    url = 'https://api.mobizon.kz'
    api_key = 'xisNSPPFj05WTVyH5oALU86VVuH7SocEUiitN0Og'
    client = AsyncMobizonClient(url=url, api_key=api_key)
    result = await client.send_message(recipient='77071234567', text='Test message', sender_signature=None)
    await asyncio.sleep(3)
    result = await client.get_message_status([result.message_id])
    assert result[0].status == 'DELIVRD'
    await client.close()


if __name__ == '__main__':
    asyncio.run(main())

Синхронный клиент

from time import sleep
from mobizon_client import MobizonClient


def main():
    url = 'https://api.mobizon.kz'
    api_key = 'xisNSPPFj05WTVyH5oALU86VVuH7SocEUiitN0Og'
    client = MobizonClient(url=url, api_key=api_key)
    result = client.send_message(recipient='77071234567', text='Test message', sender_signature=None)
    sleep(3)
    result = client.get_message_status([result.message_id])
    assert result[0].status == 'DELIVRD'
    client.close()


if __name__ == '__main__':
    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

mobizon_client-0.1.2.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

mobizon_client-0.1.2-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

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