# Infobip API Python SDK
[![Version](https://img.shields.io/pypi/v/infobip-api-python-sdk)](https://pypi.org/project/infobip-api-python-sdk/)
![Python](https://img.shields.io/pypi/pyversions/infobip-api-python-sdk)
[![Workflow](https://img.shields.io/github/workflow/status/infobip-community/infobip-api-python-sdk/Python%20package)](https://github.com/infobip-community/infobip-api-python-sdk/actions/workflows/python-package.yml)
![Release](https://img.shields.io/github/release-date/infobip-community/infobip-api-python-sdk)
[![Licence](https://img.shields.io/github/license/infobip-community/infobip-api-python-sdk)](LICENSE)
Client SDK to use the Infobip API with Python.
This package enables you to use multiple Infobip communication channels, like SMS, MMS, WhatsApp, Email, etc.
---
## ๐ก Supported APIs
The following communication channels are supported:
- [SMS + 2FA](https://www.infobip.com/docs/api#channels/sms)
- [Whatsapp](https://www.infobip.com/docs/api#channels/whatsapp)
- [Email](https://www.infobip.com/docs/api#channels/email)
- [WebRTC](https://www.infobip.com/docs/api#channels/webrtc/)
- [MMS](https://www.infobip.com/docs/api#channels/mms)
- [RCS](https://www.infobip.com/docs/api#channels/rcs)
The following platform management APIs are supported:
- [Entities](https://www.infobip.com/docs/api/platform/application-entity)
More APIs to be added in the near future.
## ๐ Authentication
Currently, infobip-api-python-sdk only supports API Key authentication,
and the key needs to be passed during client creation.
This will most likely change with future versions,
once more authentication methods are included.
## ๐ฆ Installation
To install infobip SDK you will need to run:
```bash
pip install infobip-api-python-sdk
```
Details of the package can be found
in the [PyPI page](https://pypi.org/project/infobip-api-python-sdk/).
## ๐ Usage
### Code Example
To use the package you'll need an Infobip account.
If you don't already have one, you can create a free trial account
[here](https://www.infobip.com/signup).
In this example, we will show how to send a WhatsApp text message.
Other channels can be used in a similar way.
The first step is to import the necessary channel, in this case WhatsApp channel.
```python
from infobip_channels.whatsapp.channel import WhatsAppChannel
```
Now you can create instance of `WhatsAppChannel` with your `base_url` and `api_key`.
```python
c = WhatsAppChannel.from_auth_params({
"base_url": "<your_base_url>",
"api_key": "<your_api_key>"
})
```
Alternatively, you can create the instance from the environment, having the `IB_BASE_URL` and `IB_API_KEY` variables
set, like this:
```python
c = WhatsAppChannel.from_env()
```
After that you can access all the methods from `WhatsAppChannel`.
To send text message you can use `send_text_message` method and add correct payload:
```python
response = c.send_text_message(
{
"from": "<WhatsApp sender number from your Infobib account>",
"to": "<Number that will receive WhatsApp message>",
"messageId": "a28dd97c-1ffb-4fcf-99f1-0b557ed381da",
"content": {
"text": "Some text"
},
"callbackData": "Callback data",
"notifyUrl": "https://www.example.com/whatsapp"
}
)
```
### Samples
We are adding samples in the [samples](samples) folder, which you can use as a reference on how to use the SDK
with real payloads.
## ๐๏ธ Notes
For `infobip-api-python-sdk` versioning we use
[Semantic Versioning](https://semver.org) scheme.
Python 3.6 is the minimum supported version by this library.
## ๐งก Want to help and improve this open-source SDK?
Check out our [contributing guide](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md).
## โ๏ธ License
This library is distributed under the MIT license found in the [License](LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/infobip-community/infobip-api-python-sdk",
"name": "infobip-api-python-sdk",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "infobip,sdk,channels,sms,whatsapp,email,webrtc,mms,api",
"author": "Luka Kilic, Dino Lozina, Erick Corona",
"author_email": "DevRel@infobip.com",
"download_url": "https://files.pythonhosted.org/packages/bd/01/2e6366f85efa4c955ce354a3a40ba216bc27d64426bd4b55cdb60ade4e64/infobip-api-python-sdk-5.0.1.tar.gz",
"platform": null,
"description": "# Infobip API Python SDK\n\n[![Version](https://img.shields.io/pypi/v/infobip-api-python-sdk)](https://pypi.org/project/infobip-api-python-sdk/)\n![Python](https://img.shields.io/pypi/pyversions/infobip-api-python-sdk)\n[![Workflow](https://img.shields.io/github/workflow/status/infobip-community/infobip-api-python-sdk/Python%20package)](https://github.com/infobip-community/infobip-api-python-sdk/actions/workflows/python-package.yml)\n![Release](https://img.shields.io/github/release-date/infobip-community/infobip-api-python-sdk)\n[![Licence](https://img.shields.io/github/license/infobip-community/infobip-api-python-sdk)](LICENSE)\n\nClient SDK to use the Infobip API with Python.\n\nThis package enables you to use multiple Infobip communication channels, like SMS, MMS, WhatsApp, Email, etc.\n\n---\n\n## \ud83d\udce1 Supported APIs\n\nThe following communication channels are supported:\n\n- [SMS + 2FA](https://www.infobip.com/docs/api#channels/sms)\n- [Whatsapp](https://www.infobip.com/docs/api#channels/whatsapp)\n- [Email](https://www.infobip.com/docs/api#channels/email)\n- [WebRTC](https://www.infobip.com/docs/api#channels/webrtc/)\n- [MMS](https://www.infobip.com/docs/api#channels/mms)\n- [RCS](https://www.infobip.com/docs/api#channels/rcs)\n\nThe following platform management APIs are supported:\n- [Entities](https://www.infobip.com/docs/api/platform/application-entity)\n\nMore APIs to be added in the near future.\n\n## \ud83d\udd10 Authentication\n\nCurrently, infobip-api-python-sdk only supports API Key authentication,\nand the key needs to be passed during client creation.\nThis will most likely change with future versions,\nonce more authentication methods are included.\n\n## \ud83d\udce6 Installation\n\nTo install infobip SDK you will need to run:\n\n```bash\npip install infobip-api-python-sdk\n```\n\nDetails of the package can be found\nin the [PyPI page](https://pypi.org/project/infobip-api-python-sdk/).\n\n## \ud83d\ude80 Usage\n\n### Code Example\nTo use the package you'll need an Infobip account.\nIf you don't already have one, you can create a free trial account\n[here](https://www.infobip.com/signup).\n\nIn this example, we will show how to send a WhatsApp text message.\nOther channels can be used in a similar way.\nThe first step is to import the necessary channel, in this case WhatsApp channel.\n\n```python\nfrom infobip_channels.whatsapp.channel import WhatsAppChannel\n```\n\nNow you can create instance of `WhatsAppChannel` with your `base_url` and `api_key`.\n\n```python\nc = WhatsAppChannel.from_auth_params({\n \"base_url\": \"<your_base_url>\",\n \"api_key\": \"<your_api_key>\"\n})\n```\n\nAlternatively, you can create the instance from the environment, having the `IB_BASE_URL` and `IB_API_KEY` variables\nset, like this:\n\n```python\nc = WhatsAppChannel.from_env()\n```\n\nAfter that you can access all the methods from `WhatsAppChannel`.\nTo send text message you can use `send_text_message` method and add correct payload:\n```python\nresponse = c.send_text_message(\n {\n \"from\": \"<WhatsApp sender number from your Infobib account>\",\n \"to\": \"<Number that will receive WhatsApp message>\",\n \"messageId\": \"a28dd97c-1ffb-4fcf-99f1-0b557ed381da\",\n \"content\": {\n \"text\": \"Some text\"\n },\n \"callbackData\": \"Callback data\",\n \"notifyUrl\": \"https://www.example.com/whatsapp\"\n }\n)\n```\n\n### Samples\n\nWe are adding samples in the [samples](samples) folder, which you can use as a reference on how to use the SDK\nwith real payloads.\n\n## \ud83d\uddd2\ufe0f Notes\n\nFor `infobip-api-python-sdk` versioning we use\n[Semantic Versioning](https://semver.org) scheme.\n\nPython 3.6 is the minimum supported version by this library.\n\n## \ud83e\udde1 Want to help and improve this open-source SDK?\n\nCheck out our [contributing guide](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md).\n\n## \u2696\ufe0f License\n\nThis library is distributed under the MIT license found in the [License](LICENSE).\n",
"bugtrack_url": null,
"license": "",
"summary": "Python sdk for Infobip's API",
"version": "5.0.1",
"project_urls": {
"Bug Tracker": "https://github.com/infobip-community/infobip-api-python-sdk/issues",
"Homepage": "https://github.com/infobip-community/infobip-api-python-sdk"
},
"split_keywords": [
"infobip",
"sdk",
"channels",
"sms",
"whatsapp",
"email",
"webrtc",
"mms",
"api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "90370f71ae5a2e8561b46ef1f3c553125e60986882d713e4f7a88b8141bb51c2",
"md5": "fc6ffb715e8e473cd2f52df0f88e5ac2",
"sha256": "40a1ec4bf7328cb39853f4e9e1987f98a44511f4408c385637982c5cafe4ac43"
},
"downloads": -1,
"filename": "infobip_api_python_sdk-5.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fc6ffb715e8e473cd2f52df0f88e5ac2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 96348,
"upload_time": "2023-05-26T15:10:33",
"upload_time_iso_8601": "2023-05-26T15:10:33.733498Z",
"url": "https://files.pythonhosted.org/packages/90/37/0f71ae5a2e8561b46ef1f3c553125e60986882d713e4f7a88b8141bb51c2/infobip_api_python_sdk-5.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bd012e6366f85efa4c955ce354a3a40ba216bc27d64426bd4b55cdb60ade4e64",
"md5": "39e00a8e09cc50e018b0de13e1e0cff7",
"sha256": "579a68f249de02ae11ba098b484f0064d7321b010c94fa6278ed00c766c1ff3a"
},
"downloads": -1,
"filename": "infobip-api-python-sdk-5.0.1.tar.gz",
"has_sig": false,
"md5_digest": "39e00a8e09cc50e018b0de13e1e0cff7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 43447,
"upload_time": "2023-05-26T15:10:35",
"upload_time_iso_8601": "2023-05-26T15:10:35.439460Z",
"url": "https://files.pythonhosted.org/packages/bd/01/2e6366f85efa4c955ce354a3a40ba216bc27d64426bd4b55cdb60ade4e64/infobip-api-python-sdk-5.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-26 15:10:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "infobip-community",
"github_project": "infobip-api-python-sdk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "infobip-api-python-sdk"
}