New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

playmobile-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

playmobile-client

Python client for Playmobile.uz API

  • 1.0.0
  • PyPI
  • Socket score

Maintainers
1

Python client for Playmobile.uz API (aka smsxabar.uz)

This is Python HTTP Client for Playmobile.uz (aka smsxabar.uz) based on httpx.

Playmobile is a SMS broker which allows you to send messages throughout Uzbekistan.

Installation

To install playmobile-client, simply:

$ pip install playmobile-client

This package can be found on PyPI.

Usage

import httpx
import playmobile

client = playmobile.HttpClient(
    account=playmobile.Credentials(
        username="example",
        password="example",
    ),
    base_url=httpx.URL("https://playmobile-example.uz"),
    session=httpx.Client(),
)

sms = playmobile.SMS(
    id="unique_string",
    sender="0001",
    recipient="998xx3332211",
    text="Hello world!",
)

# Single SMS
client.send_sms(sms)

# SMS batch
sms_batch = [
    playmobile.SMS(
        id="unique_string_1",
        sender="0001",
        recipient="998xx3332211",
        text="Hello world!",
    ),
    playmobile.SMS(
        id="unique_string_2",
        sender="0001",
        recipient="998xx3332211",
        text="Yankee!",
    ),
]
client.send_sms_batch(sms_batch)  

You can set up Timing settings:

import playmobile

sms = playmobile.SMS(...)

timing = playmobile.Timing(
    start_at=datetime(2023, 1, 1, 12, 0),
    end_at=datetime(2023, 1, 1, 14, 0),
)

# Single SMS
client.send_sms(sms, timing=timing)

Advanced users can set up HTTPX session with custom parameters. For example:

client = playmobile.Client(
    ...,
    session = httpx.Client(
        timeout=httpx.Timeout(timeout=2.0),
    ),
)

Package also have the test utils which will help you test your service:

  • playmobile.generate_sms
  • playmobile.generate_error

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc