Skip to main content

onlinesim-python-api

PyPI CI

Typed Python client for the OnlineSim API: SMS numbers, rent, account and free numbers. Zero runtime dependencies (standard library urllib), Python 3.9+, type hints (py.typed).

pip install onlinesimru
import os

from onlinesimru import OnlineSim

client = OnlineSim(os.environ["ONLINESIM_KEY"])

b = client.user.balance()
print(f"available: {b['balance'] - b['zbalance']} USD")

order = client.numbers.get_with_number("google", 44)
print(f"enter {order['number']} in the app")
print("code:", client.numbers.wait_code(order["tzid"]))

Testing

MockOnlineSim is a built-in offline fake of the API: test your integration without network, key or money. More in the testing guide.

from onlinesimru import MockOnlineSim

mock = MockOnlineSim(balance=10)
client = mock.client()

tzid = client.numbers.get("google", 44)
mock.add_sms_after(tzid, "Your code: 123-456", 2)  # arrives on the third poll
assert client.numbers.wait_code(tzid, interval=0) == "123456"
assert mock.balance() == 9.8

Documentation: https://s00d.github.io/onlinesim-python-api/ · Changes: CHANGELOG.md · License: Apache-2.0

Metadata

Release files for onlinesimru 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onlinesimru 3.1.0
File Size Uploaded Provenance Actions
onlinesimru-3.1.0.tar.gz 43.5 kB With provenance Details for onlinesimru-3.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for onlinesimru 3.1.0
File Interpreter ABI Platform Actions
onlinesimru-3.1.0-py3-none-any.whl Python 3 none any Details for onlinesimru-3.1.0-py3-none-any.whl

Total release size: 76.4 kB

Release files / onlinesimru-3.1.0.tar.gz

Download URL onlinesimru-3.1.0.tar.gz
Size 43.5 kB
Tags Source
SHA-256 checksum
How to use checksums
36f970a0b5727b3ad343b827c1772f295e82822adc3e9f3a1249875b38450f26
BLAKE2b-256 checksum
How to use checksums
dba1542818dbd9b37f7961894100eea4062b96b995e96c9fee37888ad39c0f49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / onlinesimru-3.1.0-py3-none-any.whl

Download URL onlinesimru-3.1.0-py3-none-any.whl
Size 32.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e65a50daf27f1c0d1f6fb35cc752b113b99d162578c096793363c7f097150fe6
BLAKE2b-256 checksum
How to use checksums
29bc5976505fac93d0c91528efd6dccf4226378a6184de6c779b4e481501ca1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for onlinesimru 3.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for onlinesimru-3.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page