textflowsms


Nametextflowsms JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryPython library that helps you send SMS using TextFlow API
upload_time2023-02-05 05:52:00
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.
            # Textflow python client

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

### 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 textflowsms`

## Sending an SMS

To send an SMS, you have to create an API key using the [Textflow dashboard](https://textflow.me/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 textflowsms as tf
tf.useKey("YOUR_API_KEY");

tf.sendSMS("+381611231234", "Dummy message text...")
```

### Handle send message request result

```python
result = tf.sendSMS("+381611231234", "Dummy message text...")
if(result.ok):
  print(result.data)
else:
  print(result.message)
```

### Example result object of the successfully sent message

```json
{
    "ok": true,
    "status": 200,
    "message": "Message sent successfully",
    "data": {
        "to": "+381611231234",
        "content": "Dummy message text...",
        "country_code": "RS",
        "price": 0.05,
        "timestamp": 1674759108881
    }
}
```

### Example result object of the unsuccessfully sent message

```json
{
    "ok": false,
    "status": 404,
    "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
resultSMS = tf.sendVerificationSMS ("+11234567890", service_name, seconds);

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

# The user has submitted the code
resultCode = tf.VerifyCode("+11234567890", user_entered_code);
# if `resultCode.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://textflow.me) first, and contact us at [support@textflow.me](mailto://support@textflow.me) 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": "textflowsms",
    "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": "TextFlow <admin@textflow.me>",
    "download_url": "https://files.pythonhosted.org/packages/1e/65/aad46510d703da6d0d3a08f9a52caa2adaf0f3a24c963043655d4c653160/textflowsms-0.1.0.tar.gz",
    "platform": null,
    "description": "# Textflow python client\n\n[![PyPI](https://img.shields.io/pypi/v/textflowsms.svg)](https://pypi.python.org/pypi/textflowsms)\n[![PyPI](https://img.shields.io/pypi/pyversions/textflowsms.svg)](https://pypi.python.org/pypi/textflowsms)\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 textflowsms`\n\n## Sending an SMS\n\nTo send an SMS, you have to create an API key using the [Textflow dashboard](https://textflow.me/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 textflowsms as tf\ntf.useKey(\"YOUR_API_KEY\");\n\ntf.sendSMS(\"+381611231234\", \"Dummy message text...\")\n```\n\n### Handle send message request result\n\n```python\nresult = tf.sendSMS(\"+381611231234\", \"Dummy message text...\")\nif(result.ok):\n  print(result.data)\nelse:\n  print(result.message)\n```\n\n### Example result object of the successfully sent message\n\n```json\n{\n    \"ok\": true,\n    \"status\": 200,\n    \"message\": \"Message sent successfully\",\n    \"data\": {\n        \"to\": \"+381611231234\",\n        \"content\": \"Dummy message text...\",\n        \"country_code\": \"RS\",\n        \"price\": 0.05,\n        \"timestamp\": 1674759108881\n    }\n}\n```\n\n### Example result object of the unsuccessfully sent message\n\n```json\n{\n    \"ok\": false,\n    \"status\": 404,\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\nresultSMS = tf.sendVerificationSMS (\"+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\nresultCode = tf.VerifyCode(\"+11234567890\", user_entered_code);\n# if `resultCode.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://textflow.me) first, and contact us at [support@textflow.me](mailto://support@textflow.me) 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 TextFlow API",
    "version": "0.1.0",
    "split_keywords": [
        "api",
        "api-client",
        "simple-sms",
        "sms",
        "sms-api",
        "sms-verification",
        "text-message",
        "user-verification"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4fcdf702e0f4e64c0d4f7e2bddb07c3f72f564003ab64e6d0d1cfbda183d55b1",
                "md5": "1837f9b9d99d44cd01f27fe310a301b1",
                "sha256": "c09909eccec00757d7c4eaf53a4b5a1d49032980383c6febb3ce874b0c5d81bf"
            },
            "downloads": -1,
            "filename": "textflowsms-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1837f9b9d99d44cd01f27fe310a301b1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4693,
            "upload_time": "2023-02-05T05:51:58",
            "upload_time_iso_8601": "2023-02-05T05:51:58.824820Z",
            "url": "https://files.pythonhosted.org/packages/4f/cd/f702e0f4e64c0d4f7e2bddb07c3f72f564003ab64e6d0d1cfbda183d55b1/textflowsms-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1e65aad46510d703da6d0d3a08f9a52caa2adaf0f3a24c963043655d4c653160",
                "md5": "b4c8275e7e4b8e5ba7456fa031ea1e8a",
                "sha256": "23d72ee80346bc6cece7751c8d9a40e032523249459397209bde69e51eb1cd17"
            },
            "downloads": -1,
            "filename": "textflowsms-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b4c8275e7e4b8e5ba7456fa031ea1e8a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4275,
            "upload_time": "2023-02-05T05:52:00",
            "upload_time_iso_8601": "2023-02-05T05:52:00.532432Z",
            "url": "https://files.pythonhosted.org/packages/1e/65/aad46510d703da6d0d3a08f9a52caa2adaf0f3a24c963043655d4c653160/textflowsms-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-05 05:52:00",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "textflowsms"
}
        
Elapsed time: 0.03811s