semvec/pypi-packages huggingface dataset:
pigeon-bot 0.1.1
A Python library for interacting with Pigeon Messenger
Requires Python: >=3.8
Keywords: pigeon, chat, websocket, bot

# Pigeon Bot Python

[![Python](https://img.shields.io/badge/python-%3E%3D3.8-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

A Python library for building chat bots on the Pigeon Messenger.

## Installation

```bash
pip install pigeon-bot
```

## Quick Start

```python

import asyncio
import os
from pigeon_bot import Client, ClientConfig

async def main():
    token = os.getenv("BOT_TOKEN")
    if not token:
        print("Please set your bot token in the BOT_TOKEN environment variable")
        return

    config = ClientConfig(
        token=token,
        base_url="http://localhost",
        ws_url="ws://localhost/api/v1/ws"
    )
    client = Client(config)

    @client.on_event("ready")
    async def on_ready():
        print("bot is ready!")

    @client.on_event("new_message")
    async def on_new_message(message):
        if "hello" in message.content.lower():
            await message.reply("hi")

    await client.connect()

if __name__ == "__main__":
    asyncio.run(main())
```

## Configuration

```python
class ClientConfig:
    token: str
    base_url: Optional[str] = "http://localhost:8000"
    ws_url: Optional[str] = None
    auto_reconnect: bool = True
    reconnect_interval_ms: int = 5000
```

## Base Events

- `ready`: Fires when the bot connects successfully
- `authenticated`: Fires after successful authentication
- `new_message`: Triggered on new messages
- `error`: Emitted on connection/authentication errors

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
yuutools 0.1.0
Explicit, async-first tool framework for LLM agents
Requires Python: >=3.12

# yuutools

Explicit, async-first tool framework for LLM agents.

## Install

```sh
uv add yuutools
```

## Usage

```python
import yuutools as yt

def get_z(ctx) -> int:
    return ctx.multiplier

@yt.tool(
    params={"x": "first operand", "y": "list of ints to sum"},
    name="goodtool",
    description="Add x + sum(y) + z",
)
async def goodtool(x: int, y: list[int], z: int = yt.depends(get_z)):
    return x + sum(y) + z

# Registry
manager = yt.ToolManager([goodtool])

tool = manager["goodtool"]
print(tool.spec.to("json_schema"))

# Bind context and run
result = await tool.bind(ctx).run(x=1, y=[2, 3])
```

### `@yt.tool`

Decorator that turns a function into a `Tool`. Parameters:

- `params` — `{name: description}` mapping for the LLM schema
- `name` — override tool name (default: `__name__`)
- `description` — tool description (default: first docstring line)

### `yt.depends(resolver)`

Marks a parameter as context-injected. The resolver is called with the
bound context at execution time. Hidden from the generated spec.

### `ToolSpec.to(fmt)`

Serialize to `"json_schema"` or `"yaml"` (requires `yuutools[yaml]`).

### `ToolManager`

Name-keyed registry with `[]` lookup, iteration, and `.specs()` for
bulk JSON schema export.

## License

MIT