Use uagents to automate SMS/Whatsapp by twilio
Project description
This uagents utlity was generated with Cookiecutter.
Features
uagents protocols to send SMS or Whatsapp messages using twilio
supports on_message and on_query methods to receive and send messages
Installation
You can install “uagents-twilio” via pip from PyPI:
$ poetry add uagents-twilio
Usage
Create .env file in root folder of project:
AGENT_ADDRESS="" ACCOUNT_SID="" AUTH_TOKEN="" FROM_NUMBER="" WP_FROM_NUMBER="" TO_NUMBER=""
Create a uagents in your project
Import uagents_twilio protocol:
$ from uagents_twilio.protocols.messages import service_protocol
Include protocol in uagent:
$ service_agent.include(service_protocol)
Use functions:
from uagents_twilio.models import Message, MessageType @service_agent.on_interval(period=2.0) async def send_message(ctx: Context): await ctx.send( AGENT_ADDRESS, Message(receiver="<replace_your_number>", msg="hello there bob", type=MessageType.sms), )
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
uagents_twilio-1.0.6.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file uagents_twilio-1.0.6.tar.gz
.
File metadata
- Download URL: uagents_twilio-1.0.6.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.19.0-46-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab2f0b6c30caf545a022bdceb1714bb9c5801ea29b15e173dfe7ec91c9568d0e |
|
MD5 | cb8c5d6106208aca0c067c18fbfc68f6 |
|
BLAKE2b-256 | 0fbb06bc8b12efbf4f0d880443e267b8f17b1854bb68b30eddabf157040dd6e0 |
File details
Details for the file uagents_twilio-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: uagents_twilio-1.0.6-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.19.0-46-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03746f249b1012b11398f67a48eef714810133685543b9430cbfbd90f9bb3bfe |
|
MD5 | e3079dc317ad1a2e0605ef55a41be13e |
|
BLAKE2b-256 | c59798021a6e0d55bed4f3fc4d701918a7c2f3ca0c2536a04761c7bb8a1b3653 |