Metadata-Version: 2.1
Name: helper20sms
Version: 0.3.2
Summary: HelperSMS API wrapper for Python
Home-page: https://github.com/HelperSMS/helper20sms
Author: HelperSMS
Author-email: admin@helper20sms.ru
License: MIT License
Project-URL: Documentation, https://api.helper20sms.ru/docs
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp~=3.9.1
Requires-Dist: typing~=3.7.4.3
Requires-Dist: requests~=2.31.0

[![Downloads](https://static.pepy.tech/badge/helper20sms)](https://pepy.tech/project/helper20sms)

## Quickstart
1. Install package `pip install helper20sms`
2. See examples
3. Read the [documentation](https://api.helper20sms.ru/docs)

## Usage
1. `from helper20sms import AioHelper20SMS, BadApiKeyProvidedException`
2. `client = AioHelper20SMS('your_api_token')`
3. See example

``` python
balance = await client.get_balance()
print(balance)

countries = await client.get_countries()
print(countries)
```

## Exception handling

``` python
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

``` python
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
