semvec/pypi-packages huggingface dataset:
pycentroid 2.0.0
@themost-framework alternative for python
Requires Python: <4.0,>=3.9


# pycentroid

![pycentroid logo](https://avatars.githubusercontent.com/u/131147072?s=200&v=4)

@themost-framework for Python

[@themost-framework](https://github.com/themost-framework) is a fully-featured end-to-end framework for building scalable data-driven web applications and services under node.js. It consists of a wide set of server-side libraries and client-side tools for helping developers creating scalable and configurable production environments. `pycentroid` is a `@themost-framework` alternative for python.

## pycentroid.client

A client-side library of [@themost-framework](https://github.com/themost-framework) application for python

```python
from typing import List
from pycentroid.client import ClientDataContext, ClientContextOptions
from pycentroid.query import select

async def get_products():
    context = ClientDataContext(ClientContextOptions('http://localhost:3000/api/'))
    # get products
    items: List = await context.model('Products').as_queryable().select(
            lambda x: select(id=x.id, name=x.name, product_model=x.model,)
        ).where(
            lambda x: x.category == 'Laptops'
        ).get_items()
    return items
```

Read more at [pycentroid.client](./pycentroid/client/README.md)

## pycentroid.query

A database-agnostic query module which for writing SQL expressions of any kind

```python
from pycentroid.query import QueryExpression, QueryEntity, SqlFormatter, select


products = QueryEntity('ProductData')
query = QueryExpression(products).select(
        lambda x: select(id=x.id, name=x.name, price=round(x.price, 2))
    ).where(
        lambda x: round(x.price, 2) < 800 and x.category == 'Laptops'
    )
sql = SqlFormatter().format(query)
# sql > SELECT id,name,ROUND(price,2) AS price FROM ProductData WHERE ((ROUND(price,2)<800) AND (category='Laptops'))
```

## pycentroid.data

A next-generation ORM data module for developing data-driven application and services.

```python
from pycentroid.data.application import DataApplication
from os.path import abspath, join, dirname
APP_PATH = abspath(join(dirname(__file__), '..'))


async def main():
    app = DataApplication(cwd=APP_PATH)
    context = app.create_context()
    results = await context.model('Order').where(
        lambda x: x.orderedItem.category == 'Desktops'
        ).get_items()
    print(results)
```
social-validator 0.3.1
Validator for data from social networks & messengers
Requires Python: >=3.8

# Social validator

![CI](https://github.com/flacy/social-validator/actions/workflows/ci.yml/badge.svg)
[![codecov](https://codecov.io/gh/Flacy/social-validator/graph/badge.svg?token=IX9AMG6L9F)](https://codecov.io/gh/Flacy/social-validator)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/social-validator)
![License](https://img.shields.io/github/license/flacy/social-validator)

### ❓ What's this
This is a library for validating data from social networks and messengers,
such as identifiers, usernames, etc.

### ⚡ Motivation
The motivation behind creating this library stemmed from the lack of a
centralized database containing restrictions for each service.
Often, validating data correctly requires thoroughly analyzing documentation
or manually testing validation.
This library aims to solve this problem but is currently available only for Python.

### 💽 Installation
You can use [pip](https://github.com/pypa/pip) or
[fext](https://github.com/fextpkg/cli) to install the library:
```shell
fext install social-validator
```

### ✨ Usage
The interface for validating the values of **each service** looks like this:
```python
from social_validator import telegram

# Functions starting with "is" are used for boolean value checking.
telegram.is_valid_id("test_user_id")  # True

# Functions starting with "validate" perform full-fledged validation,
# formatting and raising "social_validator.exceptions.ValidationError" if the
# validation fails.
telegram.validate_id("test_user_ID")  # "test_user_id"

# Note: Each validation function is based on a corresponding boolean check
# function, but not vice versa.
telegram.validate_command("cmd") and telegram.is_valid_command("cmd")
```
Documentation for each method is available via docstrings.
If you really need documentation as a separate page, please open issue.

### ⚠️ Roadmap
The project is under development and is moving to a stable version.
To track the status, you can [follow the link](https://github.com/users/Flacy/projects/1).

### 🛠️ Contributing
If you want to contribute to development, request a feature, or report a bug,
please open an [issue](https://github.com/Flacy/social-validator/issues)
with the appropriate label.
tiptoi-dl 0.1.0
A TipToi Download helper
Requires Python: >=3.13

# TipToi-dl

A linux CLI TipToi audiofile downloader.

## Motivation

[Ravensburger](https://www.ravensburger.de/), the manufacturer of the famous [TipToi](https://www.ravensburger.de/de-DE/entdecken/tiptoi) offers a Windows and a Mac Program for downloading new audiofiles.
As a Linux user you have to do that [manually via their website](https://service.ravensburger.de/tiptoi%C2%AE/tiptoi%C2%AE_Audiodateien) which is not the best experience.

So I decided to build this little CLI that allows me to download and copy the audiofile for a new book onto my kids TipToi within seconds.

## Usage

```
python tiptoi-dl.py
```

You can enter any word thats in the title of a book, afterwards you get a list of possible matches.
The script guides you through the rest of the steps and will download the .gme file automatically if the TipToi pen is connected via USB and mounted.
Otherwise the .gme file is downloaded into your Downloads folder.

![](https://github.com/Bouni/tiptoi-dl/blob/d73cdd2e0c5f3f5bb59584a734ea6f9805bd51bb/demo.gif)

## Disclaimer

tiptoi-dl is neither offered nor supported by Ravensburger.
The authors do not take any liability for possible damages.
llmxml 0.4.4
XML parsing for LLM outputs
Requires Python: >=3.12

# llmxml - XML parsing for LLM outputs

[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)
[![PyPI package](https://badge.fury.io/py/llmxml.svg)](https://badge.fury.io/py/llmxml)

**Sponsored by [Speck](https://speck.sh)**
[![Speck](https://speck.sh/_next/image?url=%2Fspeck-icon.png&w=16&q=75)](https://speck.sh/)

XML outputs are a common format for LLM outputs, but they are not always easy to parse. This package provides a way to parse XML outputs into Pydantic models.

This supports nested models, lists, and unions as well as partial parsing for streamed responses. llmxml also supports generating a prompt template for the XML schema to pass to the LLM.

![Parser Demo](assets/parser.gif)

## Usage

### Parsing XML

```python
from llmxml import parse_xml, generate_prompt_template
from pydantic import BaseModel, Field

class Movie(BaseModel):
    title: str = Field(..., description="The title of the movie")
    director: str = Field(..., description="The director of the movie")

class Response(BaseModel):
    movies: list[Movie] = Field(
        ..., description="A list of movies that match the query"
    )

class ResponseObject(BaseModel):
    response: Response = Field(
        ..., description="The response object that contains the movies"
    )

xml: str = """
<response>
    <movies>
        <movie>
            <title>The Matrix</title>
            <director>The Wachowskis</director>
        </movie>
    </movies>
</response>
"""

result: ResponseObject = parse_xml(ResponseObject, xml)
print(result)
```

Output:

```
response=Response(movies=[Movie(title='The Matrix', director='The Wachowskis')])
```

### Generating a prompt template

```python
prompt: str = generate_prompt_template(
    model=Response, include_instructions=True  # Default is true
)
print(prompt)
```

Output:

```
<response_instructions>
You are to understand the content and provide the parsed objects in xml that match the following xml_schema:

Make sure to return an instance of the XML, not the schema itself

Each field in the field_schema has a description and a type.
Example:
<field_name>
[type]
[description]
</field_name>

Schema:
<movies>
[type: list]
[A list of movies]
</movies>
</response_instructions>
```

## Development
### Running tests
```
$ uv run -m pytest -n auto tests/test_parser.py
```

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.