Skip to main content

A (limited) Python wrapper for Sveve's SMS sending API

Project description

sveve

A (limited) Python wrapper for Sveve's API

Based on API documentation.

I am in no way affiliated with Sveve and accept no liability for damages caused as a result of using this code.

Usage

The client returns a pydantic class that matches the data structure in the API documentation unless a fatal error occurs, in which case it raises a SveveError with a descriptive error message.

Initialising client

from sveve.client import SveveClient, SveveError
client = SveveClient(user="usr", password="123", default_sender="funbit")

Sending an SMS

try:
  # Sending to one recipient using client's default_sender
  client.send_sms(to="12345678", msg="Hello world!")
except SveveError:
  print("Something went wrong...")

# Alternatively with multiple recipients
recipients = ["12345001", "12345002", "12345003"]
client.send_sms(to=recipients, msg="Hello world!")
# Or using a custom sender name
client.send_sms(to="12345678", msg="Hello world!", sender="Your Name")

Checking remaining balance

try:
  balance = client.remaining_sms()
except SveveError:
  print("Something went wrong...")

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

Sveve-1.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

Sveve-1.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file Sveve-1.1.0.tar.gz.

File metadata

  • Download URL: Sveve-1.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for Sveve-1.1.0.tar.gz
Algorithm Hash digest
SHA256 0ff2ffcd19ba75166cda6961cad319971638dfe92c9afab7a8ee9a362f2072dd
MD5 847438ac7316764590059dc14c16e0d8
BLAKE2b-256 3922e0c3b3e519206e91c7df9656f58907dfdca7430d4bd6c55b55e01f160954

See more details on using hashes here.

File details

Details for the file Sveve-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: Sveve-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for Sveve-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c127914539211dc32e4afd488c0cfb400f0f71eaf1ab0769cff263a49566d9df
MD5 7790a4a279702d49ea7bc41cc3205b91
BLAKE2b-256 ef3e4b2d191536f511f48b3c49d89da476ed4fd65ddcd045d3670a8738133452

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