semvec/pypi-packages huggingface dataset:
dspy-react-machina 0.1.2
Alternative ReAct implementation for DSPy with full conversation history
License: MIT
Requires Python: >=3.12
Keywords: dspy, react, llm, agent, state-machine, conversation

# DSPy-ReAct-Machina

Alternative ReAct implementation for DSPy with full conversation history in a unified context.

## Installation

```bash
pip install dspy-react-machina
```

## Quick Start

```python
import dspy
from dspy_react_machina import ReActMachina

# Configure your LM
lm = dspy.LM(model="openai/gpt-4o-mini")
dspy.configure(lm=lm)

# Define tools
def get_weather(city: str) -> str:
    """Get current weather for a city"""
    return f"Weather in {city}: 72°F, sunny"

# Create agent
agent = ReActMachina("history: dspy.History, question -> answer", tools=[get_weather])

# Chat with persistent history
history = dspy.History(messages=[])

while True:
    user_input = input("You: ").strip()
    if user_input.lower() in ["quit", "exit"]:
        break

    response = agent(question=user_input, history=history)
    print(f"Agent: {response.answer}\n")

    # Update history for next turn
    history = response.history
```

## Documentation

- [Examples](examples/) - Working examples including async and instrumentation
- [Testing Conventions](tests/TESTING_CONVENTIONS.md) - Testing guidelines

## Development

### Setup

```bash
uv sync
uv run pre-commit install
```

### Code Quality

```bash
uv run quality-check  # Run all checks: ruff + pyright
```

### Testing

```bash
uv run tests                    # Run tests
uv run tests-coverage           # Run tests with coverage
uv run tests-coverage --web     # Run tests with coverage and open HTML report
```
glowkit 0.3.1
Glowkit - a declarative Python GUI toolkit
License: MIT
Requires Python: >=3.9
Keywords: gui, declarative, tkinter, desktop

Glowkit

Install

```bash
pip install glowkit
```

Quickstart

```python
import glowkit as gk

def main_window():
    with gk.Window(title="Glowkit", width=800, height=600, frosted_glass=True) as window:
        with gk.Container(layout='flex', direction='column', gap=10, padding=20):
            gk.Label("Hello", font_size=24, weight='bold')
            with gk.Container(layout='flex', direction='row', gap=8):
                btn = gk.Button("Click me")
                @btn.on_click
                def _():
                    btn.animate(property='bg', to='#50fa7b', duration=400, easing='ease-in-out')
    window.show()

if __name__ == "__main__":
    app = gk.Application()
    gk.apply_theme('catppuccin_mocha')
    splash = gk.SplashScreen(min_time=1.5)
    splash.show_and_run(main_window)
    app.exec()
```

License

MIT