onlinesimru


Nameonlinesimru JSON
Version 2.1.3 PyPI version JSON
download
home_pageNone
SummaryWrapper for automatic reception of SMS-messages by onlinesim.ru
upload_time2025-08-10 18:51:23
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords sms receive onlinesim-ru autoreg
VCS
bugtrack_url
requirements httpx dacite pydantic pytest pytest-cov pytest-mock
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Onlinesim Python API

Wrapper for automatic reception of SMS-messages by onlinesim.ru

[![N|Solid](https://img.shields.io/pypi/pyversions/onlinesimru.svg)](https://pypi.python.org/pypi/onlinesimru)
![Python publish](https://github.com/s00d/onlinesim-python-api/workflows/Python%20publish/badge.svg)

### Installation
You can install or upgrade package with:
```
$ pip install onlinesimru --upgrade
```
Or you can install from source with:
```
$ git clone https://github.com/s00d/onlinesim-python-api
$ cd onlinesim-python-api
$ python setup.py install
```
...or install from source buth with pip
```
$ pip install git+https://github.com/s00d/onlinesim-python-api
```
### Example

```python
from onlinesimru import FreeNumbersService, RentNumbersService, ProxyService, UserService, NumbersService


def main():
    client = UserService('YOUR_TOKEN')
    balance = client.balance()
    print(balance)


main()
```

### Example2

```python
from onlinesimru import FreeNumbersService, RentNumbersService, ProxyService, UserService, NumbersService


def main():
    numbers = NumbersService('YOUR_TOKEN')
    input('Press enter if you sms was sent')

    tzid = numbers.get('service')
    print(tzid)
    code = numbers.wait_code(tzid)
    print(code)


main()
```

### Example3

```python
# multiple driver using
from onlinesimru import Driver


def main():
    driver = Driver('YOUR_TOKEN')

    tzid = driver.numbers().get('service')
    print(tzid)
    code = driver.numbers().wait_code(tzid)
    print(code)


main()
```

### Example4 - Custom Domain

```python
# Using custom domain for API endpoints
from onlinesimru import Driver


def main():
    # Use custom domain
    driver = Driver('YOUR_TOKEN', base_url='https://custom-onlinesim.com')
    
    # Or use local development server
    driver_local = Driver('YOUR_TOKEN', base_url='http://localhost:8000')
    
    # Standard usage remains the same
    tzid = driver.numbers().get('service')
    print(tzid)


main()
```

## Documentation

All documentation is in the wiki of this project - **[Documentation](https://github.com/s00d/onlinesim-python-api/wiki)**

## Testing

The project includes comprehensive test coverage. All tests are located in the `tests/` directory.

### Running Tests

```bash
# Install test dependencies
pip install pytest pytest-cov pytest-mock

# Run all tests
python -m pytest tests/ -v

# Run specific test files
python -m pytest tests/test_basic_api.py -v
python -m pytest tests/integration_tests.py -v

# Run tests with coverage
python -m pytest tests/ --cov=onlinesimru --cov-report=html
```

For more detailed testing information, see [tests/README.md](tests/README.md).

## Bugs

If you have any problems, please create Issues [here](https://github.com/s00d/onlinesim-python-api/issues)  

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "onlinesimru",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "s00d <suppport@onlinesim.ru>",
    "keywords": "sms, receive, onlinesim-ru, autoreg",
    "author": null,
    "author_email": "s00d <suppport@onlinesim.ru>",
    "download_url": "https://files.pythonhosted.org/packages/55/2a/acb4a785447054b8e8bdc4bdc4e54137c39c4a5bfabedc6ad2b068a3b2f2/onlinesimru-2.1.3.tar.gz",
    "platform": null,
    "description": "# Onlinesim Python API\n\nWrapper for automatic reception of SMS-messages by onlinesim.ru\n\n[![N|Solid](https://img.shields.io/pypi/pyversions/onlinesimru.svg)](https://pypi.python.org/pypi/onlinesimru)\n![Python publish](https://github.com/s00d/onlinesim-python-api/workflows/Python%20publish/badge.svg)\n\n### Installation\nYou can install or upgrade package with:\n```\n$ pip install onlinesimru --upgrade\n```\nOr you can install from source with:\n```\n$ git clone https://github.com/s00d/onlinesim-python-api\n$ cd onlinesim-python-api\n$ python setup.py install\n```\n...or install from source buth with pip\n```\n$ pip install git+https://github.com/s00d/onlinesim-python-api\n```\n### Example\n\n```python\nfrom onlinesimru import FreeNumbersService, RentNumbersService, ProxyService, UserService, NumbersService\n\n\ndef main():\n    client = UserService('YOUR_TOKEN')\n    balance = client.balance()\n    print(balance)\n\n\nmain()\n```\n\n### Example2\n\n```python\nfrom onlinesimru import FreeNumbersService, RentNumbersService, ProxyService, UserService, NumbersService\n\n\ndef main():\n    numbers = NumbersService('YOUR_TOKEN')\n    input('Press enter if you sms was sent')\n\n    tzid = numbers.get('service')\n    print(tzid)\n    code = numbers.wait_code(tzid)\n    print(code)\n\n\nmain()\n```\n\n### Example3\n\n```python\n# multiple driver using\nfrom onlinesimru import Driver\n\n\ndef main():\n    driver = Driver('YOUR_TOKEN')\n\n    tzid = driver.numbers().get('service')\n    print(tzid)\n    code = driver.numbers().wait_code(tzid)\n    print(code)\n\n\nmain()\n```\n\n### Example4 - Custom Domain\n\n```python\n# Using custom domain for API endpoints\nfrom onlinesimru import Driver\n\n\ndef main():\n    # Use custom domain\n    driver = Driver('YOUR_TOKEN', base_url='https://custom-onlinesim.com')\n    \n    # Or use local development server\n    driver_local = Driver('YOUR_TOKEN', base_url='http://localhost:8000')\n    \n    # Standard usage remains the same\n    tzid = driver.numbers().get('service')\n    print(tzid)\n\n\nmain()\n```\n\n## Documentation\n\nAll documentation is in the wiki of this project - **[Documentation](https://github.com/s00d/onlinesim-python-api/wiki)**\n\n## Testing\n\nThe project includes comprehensive test coverage. All tests are located in the `tests/` directory.\n\n### Running Tests\n\n```bash\n# Install test dependencies\npip install pytest pytest-cov pytest-mock\n\n# Run all tests\npython -m pytest tests/ -v\n\n# Run specific test files\npython -m pytest tests/test_basic_api.py -v\npython -m pytest tests/integration_tests.py -v\n\n# Run tests with coverage\npython -m pytest tests/ --cov=onlinesimru --cov-report=html\n```\n\nFor more detailed testing information, see [tests/README.md](tests/README.md).\n\n## Bugs\n\nIf you have any problems, please create Issues [here](https://github.com/s00d/onlinesim-python-api/issues)  \n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Wrapper for automatic reception of SMS-messages by onlinesim.ru",
    "version": "2.1.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/s00d/onlinesim-python-api/issues",
        "Documentation": "https://github.com/s00d/onlinesim-python-api/wiki",
        "Download": "https://github.com/s00d/onlinesim-python-api/archive/master.zip",
        "Homepage": "https://github.com/s00d/onlinesim-python-api",
        "Repository": "https://github.com/s00d/onlinesim-python-api"
    },
    "split_keywords": [
        "sms",
        " receive",
        " onlinesim-ru",
        " autoreg"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1130a69cf0d071ea68d276bc76fb730db132b7685d32740fc9ff061851243c5e",
                "md5": "fbf608f0b13789abdfb143d07eb69115",
                "sha256": "85cb97d6c66c5e996f44b0cf83991b1f60cec59aac7b04380290bba0c676e1e8"
            },
            "downloads": -1,
            "filename": "onlinesimru-2.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fbf608f0b13789abdfb143d07eb69115",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 15032,
            "upload_time": "2025-08-10T18:51:22",
            "upload_time_iso_8601": "2025-08-10T18:51:22.159568Z",
            "url": "https://files.pythonhosted.org/packages/11/30/a69cf0d071ea68d276bc76fb730db132b7685d32740fc9ff061851243c5e/onlinesimru-2.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "552aacb4a785447054b8e8bdc4bdc4e54137c39c4a5bfabedc6ad2b068a3b2f2",
                "md5": "37ec6d13b02eefa135506859557170d5",
                "sha256": "7193be83bc28076a706d1326e495ea533a2f4e068c1ebf3244e6f260e1935317"
            },
            "downloads": -1,
            "filename": "onlinesimru-2.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "37ec6d13b02eefa135506859557170d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 17067,
            "upload_time": "2025-08-10T18:51:23",
            "upload_time_iso_8601": "2025-08-10T18:51:23.320056Z",
            "url": "https://files.pythonhosted.org/packages/55/2a/acb4a785447054b8e8bdc4bdc4e54137c39c4a5bfabedc6ad2b068a3b2f2/onlinesimru-2.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-10 18:51:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "s00d",
    "github_project": "onlinesim-python-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "httpx",
            "specs": []
        },
        {
            "name": "dacite",
            "specs": []
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "<",
                    "3.0.0"
                ],
                [
                    ">=",
                    "1.10.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    ">=",
                    "4.0.0"
                ]
            ]
        },
        {
            "name": "pytest-mock",
            "specs": [
                [
                    ">=",
                    "3.10.0"
                ]
            ]
        }
    ],
    "lcname": "onlinesimru"
}
        
Elapsed time: 0.86415s