semvec/pypi-packages huggingface dataset:
weavel 1.11.0
Weavel, automated prompt engineering and observability for LLM applications
Requires Python: >=3.8.10
Keywords: weavel, agent, llm, evaluation, llm evaluation, prompt evaluation, dataset curation, prompt engineering, prompt optimization, AI Prompt Engineer

<div align="center">
    <a href="https://www.weavel.ai">
        <img src="https://i.imgur.com/uQ7ulX3.png" title="Logo" style="" />
    </a>
    <h1>Weavel Python SDK</h1>
    <h3>Prompt Optimization & Evaluation for LLM Applications</h3>
    <div>
        <a href="https://pypi.org/project/weavel" target="_blank">
            <img src="https://img.shields.io/pypi/v/weavel.svg" alt="PyPI Version"/>
        </a>
    </div>
</div>

## Installation

```bash
pip install weavel
```

## Documentation

You can find our full documentation [here](https://weavel.ai/docs/python-sdk).

## How to use

### Option 1: Using OpenAI wrapper

```python
from weavel import WeavelOpenAI as OpenAI

openai = OpenAI()

response = openai.chat.completions.create(
    model="gpt-4o",
    messages=[
        {"role": "user", "content": "Hello, world!"}
    ],
    headers={
      "generation_name": "hello",
    }
)

```

### Option 2: Logging inputs/outputs of LLM calls

```python
from weavel import Weavel
from openai import OpenAI
from pydantic import BaseModel

openai = OpenAI()
# initialize Weavel
weavel = Weavel()

class Answer(BaseModel):
    reasoning: str
    answer: str

question = "What is x if x + 2 = 4?"
response = openai.beta.chat.completions.parse(
    model="gpt-4o-2024-08-06",
    messages=[
        {"role": "system", "content": "You are a math teacher."},
        {"role": "user", "content": question}
    ],
    response_format=Answer
).choices[0].message.parsed

# log the generation
weavel.generation(
    name="solve-math", # optional
    inputs={"question": question},
    outputs=response.model_dump()
)
```

### Option 3 (Advanced Usage): OTEL-compatible trace logging

```python
from weavel import Weavel

weavel = Weavel()

session = weavel.session(user_id = "UNIQUE_USER_ID")

session.message(
    role="user",
    content="Nice to meet you!"
)

session.track(
    name="Main Page Viewed"
)

trace = session.trace(
    name="retrieval_module"
)

trace.log(
    name="google_search"
)
```
pgwidget 0.8.1
Widgets for pygame
Requires Python: >=3.6

# pgwidget

pgwidget is a Python library for easy creation of GUI widgets in pygame environment (+web engine experimental).

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install pgwidget.

```bash
pip install pgwidget
```

## Usage

```python
import pgwidget.pgwidget_core as pgw

buttons=pgw.PgWidget()
button1=pgw.Button([800,100],[80,20],"Submit")
buttons.elements.append(button1)

pgwidgets=[buttons]
pgw.main_program_loop(pgwidgets,None)
```

In examples folder you can get several GUI elements.
## Examples of UIs possible to create with pgwidget
Project Forloop.ai
![obrazek](https://github.com/DovaX/pgwidget/assets/29150831/789131c7-8789-4e09-841c-79250c209dc2)
![obrazek](https://github.com/DovaX/pgwidget/assets/29150831/6d7a9239-a31f-44c6-b1d9-caa56a21f55e)
Older example
![alt text](https://github.com/dovax/pgwidget/blob/main/example1.png?raw=true)

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License
[MIT](https://choosealicense.com/licenses/mit/)

## Currently implemented

* Checkbox
* Radio button
* Button (image)
* Button (classical)
* Table (spreadsheet)