Skip to main content

HelperSMS API wrapper for Python

Project description

Downloads

Quickstart

  1. Install package pip install helper20sms
  2. See examples
  3. Read the documentation

Usage

  1. from helper20sms import AioHelper20SMS, BadApiKeyProvidedException
  2. client = AioHelper20SMS('your_api_token')
  3. 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


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.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

helper20sms-0.3.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file helper20sms-0.3.2.tar.gz.

File metadata

  • Download URL: helper20sms-0.3.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for helper20sms-0.3.2.tar.gz
Algorithm Hash digest
SHA256 75566c53504d9442e72739729b81d14e9f1403a14555b4d17d999f7c5a92261c
MD5 72c8d6bb91d4f3bcbd9a16f128020cfb
BLAKE2b-256 253a0b9e288e1e3305128ac38e97b3820039e89ab2656cc0eefb8b02a8eff2b1

See more details on using hashes here.

File details

Details for the file helper20sms-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: helper20sms-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for helper20sms-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2cc32b33f80736bb58ed656db693a3665c538bf50c23469928ae8c32125ad03f
MD5 b8716dec2bfc8717eedc62fb793c3583
BLAKE2b-256 b8bd822963b3da48c6810260f11dbae1acfd82d3db9032962a0cbcaf8c5cf62c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page