sms-api-guru


Namesms-api-guru JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryPython library that helps you send SMS using SMS API Guru API
upload_time2023-05-28 20:49:19
maintainer
docs_urlNone
author
requires_python>=3.6
license
keywords api api-client simple-sms sms sms-api sms-verification text-message user-verification
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SMS API Guru python client

[![PyPI](https://img.shields.io/pypi/v/sms_api_guru.svg)](https://pypi.python.org/pypi/sms_api_guru)
[![PyPI](https://img.shields.io/pypi/pyversions/sms_api_guru.svg)](https://pypi.python.org/pypi/sms_api_guru)

### Supported Python Versions

This library supports the following Python implementations:

* Python 3.6
* Python 3.7
* Python 3.8
* Python 3.9
* Python 3.10
* Python 3.11

## Installation
`pip install sms-api-guru`

## Sending an SMS

To send an SMS, you have to create an API key using the [SMS API Guru dashboard](https://smsapiguru.com/api). When you register an account, you automatically get an API key with one free SMS which you can send anywhere.

### Just send a message

```python
import sms_api_guru as api
api.set_key("YOUR_API_KEY")

api.send_sms("+381611231234", "Dummy message text...")
```

### Handle send message request result

```python
result = api.send_sms("+381611231234", "Dummy message text...")
if(result.ok):
  print(result.price)
else:
  print(result.message)
```

### Example result object of the successfully sent message

```json
{
    "ok": true,
    "message": "Message sent successfully",
    "price": 0.05
}
```

### Example result object of the unsuccessfully sent message

```json
{
    "ok": false,
    "message": "API key not found"
}
```

## Verifying a phone number

You can also use our service to easily verify a phone number, without storing data about the phones that you are about to verify, because we can do it for you.

### Example usage

```python
# User has sent his phone number for verification
result_sms = api.send_verification_code("+11234567890", service_name, seconds)

# Show him the code submission form
# We will handle the verification code ourselves

# The user has submitted the code
result_code = api.verify_code("+11234567890", user_entered_code)
# if `result_code.valid` is True, then the phone number is verified. 
```

#### Verification options

`service_name` is what the user will see in the verification message, e. g. `"Your verification code for Guest is: CODE"`

`seconds` is how many seconds the code is valid. Default is 10 minutes. Maximum is one day. 

## Getting help

If you need help installing or using the library, please check the [FAQ](https://smsapiguru.com) first, and contact us at [support@smsapiguru.com](mailto://support@smsapiguru.com) if you don't find an answer to your question.

If you've found a bug in the API, package or would like new features added, you are also free to contact us!

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "sms-api-guru",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "api,api-client,simple-sms,sms,sms-api,sms-verification,text-message,user-verification",
    "author": "",
    "author_email": "SMS API Guru <admin@smsapiguru.com>",
    "download_url": "https://files.pythonhosted.org/packages/52/7a/e8fce681ac8c817d5daa418d6c5a54fe9a449902a97dbe4201339c7aa278/sms_api_guru-0.0.2.tar.gz",
    "platform": null,
    "description": "# SMS API Guru python client\n\n[![PyPI](https://img.shields.io/pypi/v/sms_api_guru.svg)](https://pypi.python.org/pypi/sms_api_guru)\n[![PyPI](https://img.shields.io/pypi/pyversions/sms_api_guru.svg)](https://pypi.python.org/pypi/sms_api_guru)\n\n### Supported Python Versions\n\nThis library supports the following Python implementations:\n\n* Python 3.6\n* Python 3.7\n* Python 3.8\n* Python 3.9\n* Python 3.10\n* Python 3.11\n\n## Installation\n`pip install sms-api-guru`\n\n## Sending an SMS\n\nTo send an SMS, you have to create an API key using the [SMS API Guru dashboard](https://smsapiguru.com/api). When you register an account, you automatically get an API key with one free SMS which you can send anywhere.\n\n### Just send a message\n\n```python\nimport sms_api_guru as api\napi.set_key(\"YOUR_API_KEY\")\n\napi.send_sms(\"+381611231234\", \"Dummy message text...\")\n```\n\n### Handle send message request result\n\n```python\nresult = api.send_sms(\"+381611231234\", \"Dummy message text...\")\nif(result.ok):\n  print(result.price)\nelse:\n  print(result.message)\n```\n\n### Example result object of the successfully sent message\n\n```json\n{\n    \"ok\": true,\n    \"message\": \"Message sent successfully\",\n    \"price\": 0.05\n}\n```\n\n### Example result object of the unsuccessfully sent message\n\n```json\n{\n    \"ok\": false,\n    \"message\": \"API key not found\"\n}\n```\n\n## Verifying a phone number\n\nYou can also use our service to easily verify a phone number, without storing data about the phones that you are about to verify, because we can do it for you.\n\n### Example usage\n\n```python\n# User has sent his phone number for verification\nresult_sms = api.send_verification_code(\"+11234567890\", service_name, seconds)\n\n# Show him the code submission form\n# We will handle the verification code ourselves\n\n# The user has submitted the code\nresult_code = api.verify_code(\"+11234567890\", user_entered_code)\n# if `result_code.valid` is True, then the phone number is verified. \n```\n\n#### Verification options\n\n`service_name` is what the user will see in the verification message, e. g. `\"Your verification code for Guest is: CODE\"`\n\n`seconds` is how many seconds the code is valid. Default is 10 minutes. Maximum is one day. \n\n## Getting help\n\nIf you need help installing or using the library, please check the [FAQ](https://smsapiguru.com) first, and contact us at [support@smsapiguru.com](mailto://support@smsapiguru.com) if you don't find an answer to your question.\n\nIf you've found a bug in the API, package or would like new features added, you are also free to contact us!\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python library that helps you send SMS using SMS API Guru API",
    "version": "0.0.2",
    "project_urls": null,
    "split_keywords": [
        "api",
        "api-client",
        "simple-sms",
        "sms",
        "sms-api",
        "sms-verification",
        "text-message",
        "user-verification"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5dbba085f42d5e8050cd7aa16263853bb300477271cb9060991cde014998845f",
                "md5": "c0d27447d6e144ab7eac676de9ed94aa",
                "sha256": "d87cb6436d0db63399175d5101a14c0f95d4ac3c2c5a96434ab074a29fc7f481"
            },
            "downloads": -1,
            "filename": "sms_api_guru-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c0d27447d6e144ab7eac676de9ed94aa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4505,
            "upload_time": "2023-05-28T20:49:17",
            "upload_time_iso_8601": "2023-05-28T20:49:17.170559Z",
            "url": "https://files.pythonhosted.org/packages/5d/bb/a085f42d5e8050cd7aa16263853bb300477271cb9060991cde014998845f/sms_api_guru-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "527ae8fce681ac8c817d5daa418d6c5a54fe9a449902a97dbe4201339c7aa278",
                "md5": "467f1be565cb9de5c0823f6883211af2",
                "sha256": "2967431f019de9cc97fb5f375874a8d1fe0620d4c061945f4a4109985a6b1c3b"
            },
            "downloads": -1,
            "filename": "sms_api_guru-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "467f1be565cb9de5c0823f6883211af2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3960,
            "upload_time": "2023-05-28T20:49:19",
            "upload_time_iso_8601": "2023-05-28T20:49:19.041363Z",
            "url": "https://files.pythonhosted.org/packages/52/7a/e8fce681ac8c817d5daa418d6c5a54fe9a449902a97dbe4201339c7aa278/sms_api_guru-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-28 20:49:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "sms-api-guru"
}
        
Elapsed time: 0.06804s