smsaero-api


Namesmsaero-api JSON
Version 2.2.0 PyPI version JSON
download
home_pagehttps://smsaero.ru/integration/class/python
SummarySend SMS via smsaero.ru gate
upload_time2023-09-22 11:48:44
maintainer
docs_urlNone
authorApelt Dmitry
requires_python
licenseMIT
keywords sms sendings hlr viber calls flashcalls
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SmsAero Python Api


### Installation:

    $ pip install -U smsaero_api


### Usage:

Get credentials from account settings page: https://smsaero.ru/cabinet/settings/apikey/
    
    SMSAERO_EMAIL = 'your email'
    SMSAERO_API_KEY = 'your api key'
    
    
    def send_sms(phone: int, message: str) -> dict:
        """
        Send sms and return results.
    
                Parameters:
                        phone (int): Phone number
                        message (str): Message to send
    
                Returns:
                        data (dict): API request result
        """
        api = SmsAero(SMSAERO_EMAIL, SMSAERO_API_KEY)
        res = api.send(phone, message)
        assert res.get('success'), res.get('message')
        return res.get('data')
    
    
    if __name__ == '__main__':
        data = send_sms(70000000000, 'Hello, World!')
        pprint(data)

            

Raw data

            {
    "_id": null,
    "home_page": "https://smsaero.ru/integration/class/python",
    "name": "smsaero-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "sms,sendings,hlr,viber,calls,flashcalls",
    "author": "Apelt Dmitry",
    "author_email": "apelt.dmitry@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/16/40/93e969aa0179c84d3af620cbb5fb1f2c3d2dec2e0a8bdc27a16e5c25022e/smsaero_api-2.2.0.tar.gz",
    "platform": null,
    "description": "# SmsAero Python Api\n\n\n### Installation:\n\n    $ pip install -U smsaero_api\n\n\n### Usage:\n\nGet credentials from account settings page: https://smsaero.ru/cabinet/settings/apikey/\n    \n    SMSAERO_EMAIL = 'your email'\n    SMSAERO_API_KEY = 'your api key'\n    \n    \n    def send_sms(phone: int, message: str) -> dict:\n        \"\"\"\n        Send sms and return results.\n    \n                Parameters:\n                        phone (int): Phone number\n                        message (str): Message to send\n    \n                Returns:\n                        data (dict): API request result\n        \"\"\"\n        api = SmsAero(SMSAERO_EMAIL, SMSAERO_API_KEY)\n        res = api.send(phone, message)\n        assert res.get('success'), res.get('message')\n        return res.get('data')\n    \n    \n    if __name__ == '__main__':\n        data = send_sms(70000000000, 'Hello, World!')\n        pprint(data)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Send SMS via smsaero.ru gate",
    "version": "2.2.0",
    "project_urls": {
        "Homepage": "https://smsaero.ru/integration/class/python"
    },
    "split_keywords": [
        "sms",
        "sendings",
        "hlr",
        "viber",
        "calls",
        "flashcalls"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d1ac568647169110a6fe63b59d1f01e2b21e6beec3535032f1d3aab509a654a6",
                "md5": "7a1ee99a46a41ae93fcce9e92f8d068a",
                "sha256": "cf36f5319bda3012ba38280434e3837a10e00501a51443c65f4ab0ac0e6949b6"
            },
            "downloads": -1,
            "filename": "smsaero_api-2.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7a1ee99a46a41ae93fcce9e92f8d068a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3856,
            "upload_time": "2023-09-22T11:48:42",
            "upload_time_iso_8601": "2023-09-22T11:48:42.242535Z",
            "url": "https://files.pythonhosted.org/packages/d1/ac/568647169110a6fe63b59d1f01e2b21e6beec3535032f1d3aab509a654a6/smsaero_api-2.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "164093e969aa0179c84d3af620cbb5fb1f2c3d2dec2e0a8bdc27a16e5c25022e",
                "md5": "4245d92115f18b39406683fd7358fb36",
                "sha256": "f62456ef7f646e8726e03fcfbd46befac257101e478cfb30e30235cabbdc4017"
            },
            "downloads": -1,
            "filename": "smsaero_api-2.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4245d92115f18b39406683fd7358fb36",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3972,
            "upload_time": "2023-09-22T11:48:44",
            "upload_time_iso_8601": "2023-09-22T11:48:44.974818Z",
            "url": "https://files.pythonhosted.org/packages/16/40/93e969aa0179c84d3af620cbb5fb1f2c3d2dec2e0a8bdc27a16e5c25022e/smsaero_api-2.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-22 11:48:44",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "smsaero-api"
}
        
Elapsed time: 0.11591s