semvec/pypi-packages huggingface dataset:
sqltypes 0.1.9
Custom types for SQLModel/SQLalchemy
Requires Python: >=3.10

# SQL Types

> Custom type decorators for SQLModel/SQLAlchemy with Pydantic validation

## Installation

```bash
pip install sqltypes
```

## Quick Start

```python
from typing import Sequence
from pydantic import BaseModel
from sqlmodel import Field, SQLModel
from sqltypes import ValidatedJSON, SpaceDelimitedList

class User(BaseModel):
    name: str
    age: int

class Article(SQLModel, table=True):
    id: int | None = Field(default=None, primary_key=True)
    tags: Sequence[str] = Field(sa_type=SpaceDelimitedList)
    author: User = Field(sa_type=ValidatedJSON(User))
```

## Available Types

### `ValidatedJSON(T, name?)`
Stores any Pydantic model or complex type as JSON with automatic validation.

```python
config: Config = Field(sa_type=ValidatedJSON(Config))
```

### `SpaceDelimitedList`
Stores sequences as space-delimited strings.

```python
tags: Sequence[str] = Field(sa_type=SpaceDelimitedList)
# Database: "python sql database"
# Python: ["python", "sql", "database"]
```

### `ValidatedStr(LiteralType)`
Validates strings against Pydantic literal types.

```python
from typing import Literal
Status = Literal["pending", "active", "completed"]
status: Status = Field(sa_type=ValidatedStr(Status))
```

## Custom Types

Use `CustomTypeMeta` to create your own types:

```python
from sqltypes import CustomTypeMeta
from sqlalchemy.types import String

CommaSeparatedList = CustomTypeMeta(
    'CommaSeparatedList',
    (), {},
    Impl=String,
    dump=lambda lst: ','.join(lst),
    parse=lambda s: s.split(',')
)
```

Or use `CustomStringMeta` for string-based types:

```python
from sqltypes import CustomStringMeta

class CommaSeparatedList(metaclass=CustomStringMeta,
                          dump=lambda lst: ','.join(lst),
                          parse=lambda s: s.split(',')):
    ...
```

## Links

- **PyPI**: https://pypi.org/project/sqltypes/
- **Repository**: https://github.com/marciclabas/sqltypes
aiosafeconsumer 0.0.8
Safely consume and process data.
Requires Python: >=3.10
Keywords: asyncio, consumer, microservices

aiosafeconsumer
===============

.. image:: https://github.com/lostclus/aiosafeconsumer/actions/workflows/tests.yml/badge.svg
    :target: https://github.com/lostclus/aiosafeconsumer/actions

.. image:: https://img.shields.io/pypi/v/aiosafeconsumer.svg
    :target: https://pypi.org/project/aiosafeconsumer/
    :alt: Current version on PyPi

.. image:: https://img.shields.io/pypi/pyversions/aiosafeconsumer
    :alt: PyPI - Python Version

aiosafeconsumer is a library that provides abstractions and some implementations
to consume data somewhere and process it.

Features:

* Based on AsyncIO
* Type annotated
* Use logging with contextual information

Abstractions:

* `DataSource` - waits for data and returns batch of records using Python generator
* `DataProcessor` - accepts batch of records and precess it
* `DataTransformer` - accepts batch of records and transform it and calls
  another processor to precess it. Extends `DataProcessor`
* `Worker` - abstract worker. Do a long running task
* `ConsumerWorker` - connects `DataSource` and `DataProcessor`. Extends Worker
* `DataWriter` - base abstraction to perform data synchronization. Extends DataProcessor

Current implementations:

* `KafkaSource` - read data from Kafka
* `RedisStreamSource` - read data from Redis Streams
* `RedisWriter` - synchronize data in Redis
* `ElasticsearchWriter` - synchronize data in Elasticsearch
* `MongoDBWriter` - synchronize data in MongoDB
* `PostgresWriter` - synchronize data in PostgreSQL
* `WorkerPool` - controller to setup and run workers in parallel. Can handle worker failures and restarts workers when it fails or exits.

Install::

    pip install aiosafeconsumer

Install with Kafka::

    pip install aiosafeconsumer[kafka]

Install with Redis::

    pip install aiosafeconsumer[redis]

Install with Elasticsearch::

    pip install aiosafeconsumer[elasticsearch]

Install with MongoDB::

    pip install aiosafeconsumer[mongo]

Install with PostgreSQL::

    pip install aiosafeconsumer[postgres]

Links:

* Producer library: https://github.com/lostclus/django-kafka-streamer
* Example application: https://github.com/lostclus/WeatherApp

TODO:

* Enumerate IDs message type support in PostgreSQL writer
* ClickHouse writer
pytest-llm-agent 0.1.2
LLM Agent for working with pytest
Requires Python: >=3.13

# pytest-llm-agent

CLI helper to work with unit tests for your codebase.

## Installation

Install from PyPI with pip:

```bash
pip install pytest-llm-agent
```

## Configuration

You can choose model and add general default prompt

```toml
[tool.pytest-llm-agent]
model = "gpt-5"
# general_prompt = "Optional extra system prompt for the agent"
```

Secrets can be supplied through environment variables prefixed with `PYTEST_LLM_AGENT_`. For example, set `PYTEST_LLM_AGENT_API_KEY` in your shell and the agent will receive `API_KEY` in its environment at runtime.

```bash
EXPORT PYTEST_LLM_AGENT_API_KEY=foo
```

## Usage

After configuring your project, run the CLI to generate tests for a specific function, method, or class:

```bash
pytest-llm-agent target path/to/module.py:ClassName.method tests/test_module.py
```

You can optionally pass additional instructions to steer generation:

```bash
pytest-llm-agent target path/to/module.py::function tests/test_module.py --prompt "Focus on edge cases"
```

## Contribution

Very welcome. Make sure you also update tests if you add some services logic.

```
PYTHONPATH=. uv run pytest .
```
file-download-server 1.2.1
A simple file server
Requires Python: >=3.6

# Simple file server

## Usage

1. Install 

`pip install file_download_server`

2. create server

```python -m file_server --static_path {path} --port {port} --prefix {url_prefix}```

**required**: `--static_path/-d`

**note**:
    you can get file md5 in path `/{prefix}/md5/{file_name}`

## 为什么要写这个脚本
为什么不直接`python -m http.server`,很简单，
1. http.server 只能单线程下载，有人在下别人就下不了;而且速度不知道为啥慢的不行
2. http.server 不支持url二级路径, 当我用nginx反向代理时就用不了了