Skip to main content

Official client for FarazSMS · IranPayamak (فراز اس ام اس · ایران پیامک) — https://farazsms.com. Send pattern/OTP, bulk SMS, reports, phonebook, and all 63 endpoints.

Project description

farazsms

FarazSMS · IranPayamak — فراز اس ام اس · ایران پیامک 🌐 farazsms.com · iranpayamak.com

Official Python client for the FarazSMS / IranPayamak web services — send pattern/OTP, simple & bulk SMS, pull reports, manage your phonebook, and reach all 63 endpoints through a low-level request().

Python 3.7+ · depends only on requests · raises on API errors.

Install

pip install farazsms

Quick start

from farazsms import FarazSMS, FarazError

sms = FarazSMS("YOUR_API_KEY")  # key from the panel → Web Service / API Key

print(sms.balance())                                              # verify the key — free
sms.send_pattern("SJ3FgPrE0C", "09120000000", {"code": "1234"})   # OTP (instant)
sms.send_simple("Hello!", ["09120000000", "09130000000"])         # bulk
print(sms.inbox(page=1, limit=20))                                # inbound replies

try:
    sms.send_pattern("BAD", "09120000000", {"code": "1"})
except FarazError as e:
    print(e.status, e.body)

Recipients use the local format 09120000000 (no +98). Default sender line 90008361.

Bundled helpers

Area Methods
Account balance() · profile() · lines()
Send send_pattern() · send_simple() · send_variable()
Patterns create_pattern() · patterns()
Reports inbox() · send_requests() · send_request_items()
Phonebook phonebooks() · add_contact()
Reference provinces() · number_banks()

Anything else (tickets, orders, voice, LBS, …) via request(method, path, body).

License

MIT

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

farazsms-1.0.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

farazsms-1.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file farazsms-1.0.1.tar.gz.

File metadata

  • Download URL: farazsms-1.0.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for farazsms-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5411ab04e81310466f093de22a9b2bbb9f53b1f3d02119e4eecf9f9a2273d1da
MD5 f37a1f2e1c530497dbc1381ae62d85b3
BLAKE2b-256 5f9ebd4b2017c552125213ae1919c9e8f4fde5bf53833630beb099773e6cfd57

See more details on using hashes here.

File details

Details for the file farazsms-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: farazsms-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for farazsms-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b0823a87ea5ebad0ae88b9deb91ff13ec05cab41d9b9345907bd495f9ed18e2c
MD5 1e92dbc74a52ec97598f2768f7356a76
BLAKE2b-256 8fb3fcf63e7b5fc78bcbba5e63e3ef77f6b679ae8b9a2bc60346073c4b13cb8f

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