semvec/pypi-packages huggingface dataset:
drills-pro-proto 0.1.2
Protocol Buffers for drills.pro
Requires Python: >=3.10

# Proto

This repository serves as the centralized source for all Protocol Buffers (Protobuf) files and generated code used by services in Drills.pro. It provides a clear structure for managing service definitions and supports code generation for multiple languages.

## Dependencies

- [uv](https://github.com/astral-sh/uv) >= 0.8.13
- [protoc](https://protobuf.dev/installation/) (Protocol Buffers compiler)
- [Go protoc plugin](https://github.com/protocolbuffers/protobuf-go)

---

## Setup Instructions

1. **Install protoc (Protocol Buffers compiler):**
   - Follow the official [installation guide](https://protobuf.dev/installation/).

2. **Install Go protoc plugin:**
   ```bash
   go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
   ```

3. **Install Python dependencies:**
   ```bash
   uv sync
   ```

---

## Folder Structure

```
proto/
  └── <service>/
        └── <version>/
              └── *.proto
gen/
  └── <language>/
        └── <service>/
                └── <version>/
                        └── *generated files*
```

**Example:**

```
proto/
  └── data/
        └── v1/
            └──dataset.proto
            └──file.proto
gen/
  └── go/
        └── data/
            └── v1/
                └── dataset.pb.go
                └── dataset_grpc.pb.go
                └── file.pb.go
                └── file_grpc.pb.go
```

---

## Contributing

1. **Add Protobuf Files:**
   - Place new `.proto` files in the appropriate `proto/<service>/<version>/` directory.

2. **Generate Code:**
   - Run the following command to generate code for all supported languages:
     ```bash
     make gen
     ```

---
mic-worker 0.1.2
Worker package for async tasks
Requires Python: >=3.13

# Async Worker Package

Un package Python pour créer des workers asynchrones qui traitent des tâches à partir de queues RabbitMQ.

## Fonctionnalités

- Support des tâches synchrones et asynchrones
- Gestion automatique des connexions RabbitMQ avec reconnexion
- Health check HTTP intégré
- Gestion des signaux de shutdown gracieux
- Support du mode one-shot et infinite avec concurrence configurable
- Logging structuré avec callbacks de progression

## Installation

Via `pip`

```bash
pip install mic-worker
```

Via `uv`

```bash
uv add mic-worker
```

## Utilisation

### Exemple de tâche asynchrone

```python
from async_worker import AsyncTaskInterface, IncomingMessage
import asyncio

class MyAsyncTask(AsyncTaskInterface):
    async def execute(self, incoming_message: IncomingMessage, progress):
        # Votre logique de traitement ici
        await asyncio.sleep(1)
        await progress(0.5)  # Reporter le progrès
        await asyncio.sleep(1)
        return {"result": "success"}
```

### Exemple de tâche synchrone

```python
from async_worker import SyncTaskInterface, IncomingMessage

class MySyncTask(SyncTaskInterface):
    def execute(self, incoming_message: IncomingMessage, progress):
        # Votre logique de traitement ici
        time.sleep(1)
        progress(0.5)  # Reporter le progrès
        time.sleep(1)
        return {"result": "success"}
```

### Configuration du runner

```python
from async_worker import AsyncWorkerRunner, Infinite, HealthCheckConfig

runner = AsyncWorkerRunner(
    amqp_url="amqp://localhost:5672",
    amqp_in_queue="input_queue",
    amqp_out_queue="output_queue",
    task_provider=lambda: MyAsyncTask(),
    worker_mode=Infinite(concurrency=5),
    health_check_config=HealthCheckConfig(host="0.0.0.0", port=8000)
)

await runner.start()
```

## Intégration conteneurisé

### Construction de l'image

```bash
docker build -t python-worker .
```

### Lancement du conteneur

```bash
docker run -e BROKER_URL="amqp://rabbitmq:5672" \
           -e IN_QUEUE_NAME="my_input_queue" \
           -e OUT_QUEUE_NAME="my_output_queue" \
           -e WORKER_CONCURRENCY="3" \
           -p 8000:8000 \
           python-worker
```

## Variables d'environnement

- `BROKER_URL`: URL de connexion RabbitMQ (obligatoire)
- `IN_QUEUE_NAME`: Nom de la queue d'entrée (défaut: "in_queue_python")
- `OUT_QUEUE_NAME`: Nom de la queue de sortie (défaut: "example_out_queue")
- `WORKER_CONCURRENCY`: Nombre de tâches concurrentes (défaut: "5")
eldar-textformatter-matrix 0.1.0
A simple Python library for text formatting and cleaning.
Requires Python: >=3.7

﻿# textformatter

A simple Python library for text formatting and cleaning.

## Example Usage

```python
from textformatter import capitalize_words, to_snake_case

print(capitalize_words("hello world"))  # Hello World
print(to_snake_case("Hello World"))     # hello_world