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'] - max(b['zbalance'], 0)} 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.1

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.1
File Size Uploaded Provenance Actions
onlinesimru-3.1.1.tar.gz 48.4 kB With provenance Details for onlinesimru-3.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 83.4 kB

Release files / onlinesimru-3.1.1.tar.gz

Download URL onlinesimru-3.1.1.tar.gz
Size 48.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cb37d603e860a3a3344a0dc93e684e42cffd17d9ff51a6afdb1876f1033e54b7
BLAKE2b-256 checksum
How to use checksums
618bfecbf23fb196626ab9cc11d1284b25e4112a0b29993bcbd6fe0f0a766149
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 20, 2026.

Transparency log

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

Download URL onlinesimru-3.1.1-py3-none-any.whl
Size 35.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b8344f5e664f73374fef3cc3bbf3bfeb8a9b35682f617eca9badbb301a22462
BLAKE2b-256 checksum
How to use checksums
5f7fff919674a2ace2d1649734a7a2bbf03651cebd77e4270541650f92de786d
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 20, 2026.

Transparency log

Security for onlinesimru 3.1.1

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.1.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 20, 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