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: 6 months 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 (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-19T10:13:17.000Z (about 2 years ago)
- Last Synced: 2024-03-29T13:02:34.266Z (about 2 years 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'):
pass
def analytics(self, params={}):
pass
def balance(self, api_key: str = None):
pass
def contacts(self, action: ContactsAction, params: dict = {}):
pass
def hooks(self, action: HooksAction, params: dict = {}):
pass
def journal(self, typ: JournalType, params: dict = {}):
pass
def lookup(self, typ: LookupType, number: str, json: bool = False):
pass
def pricing(self, format_: PricingFormat = PricingFormat.CSV, country: str = None):
pass
def sms(self, to: str, text: str, params: dict = {}):
pass
def status(self, msg_id: int):
pass
def subaccounts(self, action: SubaccountsAction, params: dict = {}):
pass
def validate_for_voice(self, number: str, callback: str = None):
pass
def voice(self, to: str, text: str, params: dict = {}):
pass
```
### Examples
#### Retrieve balance associated with given API key
```python
from sms77api.Sms77api import Sms77api
client = Sms77api("InsertYourSuperSecretApiKeyFromSms77")
print(client.balance())
```
#### Send an SMS and return a detailed JSON response
```python
from sms77api.Sms77api import Sms77api
import os
client = 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
[](LICENSE)