Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seven-io/python-client
Official Python API Client for seven
https://github.com/seven-io/python-client
api-client cnam hlr mnp sdk sms text2speech
Last synced: about 1 month ago
JSON representation
Official Python API Client for seven
- Host: GitHub
- URL: https://github.com/seven-io/python-client
- Owner: seven-io
- License: mit
- Created: 2020-07-23T12:05:38.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-19T10:13:17.000Z (9 months ago)
- Last Synced: 2024-03-29T13:02:34.266Z (9 months ago)
- Topics: api-client, cnam, hlr, mnp, sdk, sms, text2speech
- Language: Python
- Homepage: https://pypi.org/project/sms77api/
- Size: 216 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python API Client
## Installation
Make sure you have [Python 3](https://www.python.org/downloads/) installed.
```shell script
pip3 install sms77api
```### Methods
```python
def __init__(self, api_key: str, sent_with: str = 'Python'):
passdef analytics(self, params={}):
passdef balance(self, api_key: str = None):
passdef contacts(self, action: ContactsAction, params: dict = {}):
passdef hooks(self, action: HooksAction, params: dict = {}):
passdef journal(self, typ: JournalType, params: dict = {}):
passdef lookup(self, typ: LookupType, number: str, json: bool = False):
passdef pricing(self, format_: PricingFormat = PricingFormat.CSV, country: str = None):
passdef sms(self, to: str, text: str, params: dict = {}):
passdef status(self, msg_id: int):
passdef subaccounts(self, action: SubaccountsAction, params: dict = {}):
passdef validate_for_voice(self, number: str, callback: str = None):
passdef voice(self, to: str, text: str, params: dict = {}):
pass
```### Examples
#### Retrieve balance associated with given API key
```python
from sms77api.Sms77api import Sms77apiclient = Sms77api("InsertYourSuperSecretApiKeyFromSms77")
print(client.balance())
```#### Send an SMS and return a detailed JSON response
```python
from sms77api.Sms77api import Sms77api
import osclient = Sms77api(os.environ.get('SMS77_API_KEY', 'FallbackValueIfMissing'))
print(client.sms('+491771783130', 'Hi friend!', {'json': True}))
```#### Support
Need help? Feel free to [contact us](https://www.sms77.io/en/company/contact/).
###### License
[![MIT](https://img.shields.io/badge/License-MIT-teal.svg)](LICENSE)