HelperSMS API wrapper for Python
Project description
Quickstart
- Install package
pip install helper20sms
- See examples
- Read the documentation
Usage
from helper20sms import AioHelper20SMS, BadApiKeyProvidedException
client = AioHelper20SMS('your_api_token')
- See example
balance = await client.get_balance()
print(balance)
countries = await client.get_countries()
print(countries)
Exception handling
from aiohelper20sms import AioHelper20SMS, BadApiKeyProvidedException
client = AioHelper20SMS(token)
try:
balance = await client.get_balance()
print(balance)
except BadApiKeyProvidedException as e:
print(e)
> {'detail': 'Bad API key provided'}
See the documentation for exceptions in the exceptions.md
file
Sync version
from aiohelper20sms import Helper20SMS, BadApiKeyProvidedException
token = 'your_api_token'
def main(token):
client = Helper20SMS(token)
try:
balance = client.get_balance()
print(balance)
countries = client.get_countries()
print(countries)
except BadApiKeyProvidedException as e:
print(e)
if __name__ == '__main__':
main()
License
Project AioHelperSMS is distributed under the MIT license
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
helper20sms-0.3.1.tar.gz
(6.8 kB
view hashes)
Built Distribution
Close
Hashes for helper20sms-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95a2c74df95591ff806f0e7270f72221d1432ce0ad9f44552a53b29efc0c9291 |
|
MD5 | 1aceaf63d0cd9968fea08bf0d479f43f |
|
BLAKE2b-256 | fe2a68328ac92b575d72228bd28d98eed2ab0fc33d862a4103cb9027f00149f2 |