semvec/pypi-packages huggingface dataset:
async-wrapper-telegraph 0.1.0
Async python wrapper for Telegraph
License: MIT
Requires Python: >=3.8

# Telegraph

Async python wrapper for Telegraph

## Install

```bash
pip install async-wrapper-telegraph
```

## Usage

```py
import asyncio
from telegraph import Telegraph
from telegraph.types import NodeElement


async def main():
    access_token = 'd3b25feccb89e508a9114afb82aa421fe2a9712b963b387cc5ad71e58722'
    async with Telegraph(access_token) as client:
        r = await client.create_page(
            title='Test telegra.ph',
            content=[
                NodeElement(
                    tag='p',
                    children=[
                        'Hello, ',
                        NodeElement(tag='b', children=['world!'])
                    ]
                )
            ]
        )
        print(r)

asyncio.run(main())
```
flexinfer-llm-kit 0.2.1
Reusable LLM clients and speculative decode workflows for FlexInfer services
License: MIT
Requires Python: >=3.11

# flexinfer-llm-kit

Reusable LLM client helpers and speculative decoding workflows for FlexInfer Python services.

## Features

- OpenAI-compatible client configuration (LiteLLM / vLLM / OpenAI)
- LangChain `ChatOpenAI` factories for common workloads
- Speculative decode workflow (draft → verify → revise) via LangGraph

## Installation

From PyPI:

```bash
pip install flexinfer-llm-kit
```

From GitLab:

```bash
pip install git+https://gitlab.flexinfer.ai/libs/py-llm-kit.git
```

## Usage

### Speculative decode

```python
from llm_kit.spec_decode import spec_decode

result = await spec_decode("Write 3 storyboard panel prompts in JSON.")
```

### Model factories

```python
from llm_kit.clients import get_textgen_model

model = get_textgen_model()
response = model.invoke([{"role": "user", "content": "Hello"}])
print(response.content)
```

## Configuration

| Env Var | Description | Default |
| --- | --- | --- |
| `LLM_BASE_URL` | OpenAI-compatible base URL (ex: `http://litellm.../v1`) | `http://litellm.ai.svc:8000/v1` |
| `LLM_API_KEY` | API key for the endpoint | `sk-local` |
| `LLM_TEXTGEN_MODEL` | LiteLLM model id/alias | `textgen` |
| `LLM_AGENT_MODEL` | LiteLLM model id/alias | `agent` |
| `LLM_VISION_MODEL` | LiteLLM model id/alias | `vision` |

## License

MIT

## Publishing (GitLab PyPI)

1. Bump `version` in `pyproject.toml`.
2. Tag and push:

```bash
git tag -a v0.2.0 -m "Release v0.2.0"
git push origin v0.2.0
```

3. In GitLab CI for `libs/py-llm-kit`, run the manual `publish` job for that tag pipeline.

## Publishing (Public PyPI)

1. Set GitLab CI variables: `PYPI_API_TOKEN` and `PUBLISH_PUBLIC_PYPI=true`.
2. Run the manual `publish:pypi` job for the tag pipeline.
flexinfer-observability 0.2.2
Structured logging and metrics for Python services
License: MIT
Requires Python: >=3.11

![Banner](assets/banner.png)
# flexinfer-observability

![Header](assets/header.svg)

[![pipeline status](https://gitlab.flexinfer.ai/libs/py-observability/badges/main/pipeline.svg)](https://gitlab.flexinfer.ai/libs/py-observability/-/commits/main)
[![coverage report](https://gitlab.flexinfer.ai/libs/py-observability/badges/main/coverage.svg)](https://gitlab.flexinfer.ai/libs/py-observability/-/commits/main)

Standardized observability library for Python services in the FlexInfer ecosystem.

## Features

- **Structured Logging**: `JsonFormatter` with automatic OpenTelemetry trace ID injection.
- **Metrics**: `BaseMetrics` abstraction for Prometheus counters/gauges with Pushgateway support.
- **Timing**: Context managers for operation latency measurement.

## Usage

### Logging

```python
from observability.logging import setup_logging

logger = setup_logging(level="INFO", log_format="json")
logger.info("Service started", extra={"service_id": "api-1"})
```

### Metrics

```python
from observability.metrics import BaseMetrics
from prometheus_client import Counter

class ServiceMetrics(BaseMetrics):
    def __init__(self):
        super().__init__(job_name="my_service")
        self.requests = Counter("requests_total", "Total requests")

metrics = ServiceMetrics()
metrics.requests.inc()
metrics.push()
```

## Configuration

| Environment Variable      | Description                  | Default     |
| ------------------------- | ---------------------------- | ----------- |
| `LOG_LEVEL`               | Log level (DEBUG, INFO, ...) | INFO        |
| `LOG_FORMAT`              | logging format (json, plain) | plain       |
| `METRICS_PUSHGATEWAY_URL` | Prometheus Pushgateway URL   | None        |
| `METRICS_JOB_NAME`        | Job name for metrics         | default_job |

## Installation

```bash
pip install flexinfer-observability
```