semvec/pypi-packages huggingface dataset:
uagents-twilio-test-dummy 1.0.7
Use uagents to automate SMS/Whatsapp by twilio
Requires Python: >=3.8.1,<3.12

==============
uagents-twilio
==============

.. image:: https://img.shields.io/pypi/v/uagents-twilio.svg
    :target: https://pypi.org/project/uagents-twilio
    :alt: PyPI version


----

This `uagents <https://github.com/fetchai/uAgents>`_ utlity was generated with `Cookiecutter <https://github.com/cookiecutter/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 <https://pypi.org/project/pip/>`_ from `PyPI <https://pypi.org/project>`_::

    $ pip install uagents-twilio

You can install "uagents_twilio" via poetry::

    $ 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),
        )
pyspark-helpers 0.2.1
A collection of tools to help when developing PySpark applications
Requires Python: >=3.8,<4.0

# PySpark Helpers

A collection of tools to help when developing PySpark applications

## Installation

With pip
```
pip install pyspark_helpers
```

With poetry
```
poetry add pyspark_helpers
```

## Usage

### Auto Generate PySpark Schemas from JSON examples

Through cli:

```sh
python -m pyspark_helpers.schema
# OR with script
psh-schema-from-json --path ./tests/data/schema/array.json --output ./results/array_schema.json
```

Or programatically

```py
from pyspark_helpers.schema import schema_from_json, bulk_schema_from_jsom
from pathlib import Path

data_dir = "data/json"


## One file
schema = schema_from_json(f"{data_dir}/file.json")

print(schema)

## A whole directory
files = [Path(f) for f in Path.glob(f"{data_dir}/*.json")]
schemas = bulk_schema_from_jsom(files)

for _file, schema in zip(files, schemas):
    print(_file.name, schema)
```

## Guidelies for Contributing

Use [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) messages. 

To help with this, I encourage you to use commitizen when making your commits. The process for this is straight forward:

```sh
# Checkout a new branch
git checkout -b <my-new-branch>

# Make changes to the code....

# Add your changes
git add <changed-file-1> <changed-file-2> ...

# Run commitizen commit and follow prompts
commitizen commit # `cz c` in short

# Push branch
git push

# Open a Pull Request
## This is done in Github
```