SDK em Python para a API de envios de SMS em Angola
Project description
Ombala SDK Python
SDK Python para a API Ombala — envio de SMS em Angola.
Instalação
pip install ombala
Uso
from ombala import Ombala
client = Ombala("Token a9eb6ea6-5777-4848-a9ed-8cbffc74a503")
# Enviar SMS
client.messages.send(
message="Olá, tudo bem?",
from_="MINHALOJA",
to="921939411",
)
# Listar mensagens
client.messages.list(page=1)
# Ver saldo
client.credits.balance()
Modo assíncrono
import asyncio
from ombala import AsyncOmbala
async def main():
async with AsyncOmbala("Token ...") as client:
resp = await client.messages.send(
message="Olá, tudo bem?",
from_="MINHALOJA",
to="921939411",
)
print(resp)
asyncio.run(main())
API
Mensagens
| Método | Descrição |
|---|---|
messages.send(message, from_, to, schedule?) |
Enviar SMS |
messages.list(page?) |
Listar mensagens |
messages.get(message_id, id?) |
Obter mensagem por ID |
messages.delete(message_id) |
Apagar registo de envio |
messages.list_recipients(page?) |
Listar destinatários |
messages.list_by_date_range(start, end, page?) |
Listar mensagens por intervalo de datas |
messages.list_by_recipient(phone_number?, page?) |
Listar mensagens de um número |
Remetentes
| Método | Descrição |
|---|---|
senders.create(name) |
Criar remetente |
senders.list() |
Listar remetentes |
senders.list_approved() |
Listar remetentes aprovados |
senders.list_pending() |
Listar remetentes pendentes |
senders.delete(sender_id) |
Apagar remetente |
Créditos
| Método | Descrição |
|---|---|
credits.balance() |
Mostrar saldo |
credits.recharges() |
Histórico de carregamentos |
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
ombala-0.1.0.tar.gz
(5.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ombala-0.1.0.tar.gz.
File metadata
- Download URL: ombala-0.1.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8334ef7d8c63656005db59d50253b478c7980849abc5480d98e8cb36e563f1c6
|
|
| MD5 |
ccdd9c81854713bc7da6225ad3a7ec50
|
|
| BLAKE2b-256 |
61d06bcf1ea331b219770dce40995d20dde01515644404bf660875cf981fc563
|
File details
Details for the file ombala-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ombala-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52c1e2782a20eb7d0bae07dc60f6ce68289db1f8f4492e476a5ae64b8c3c5417
|
|
| MD5 |
a1d3816a2997a53dc645b509744f91de
|
|
| BLAKE2b-256 |
0e8530a4a7bdb640a5e9a9d5953d2f6268a6933af2875f76dc9c5dc85d3f4c56
|