semvec/pypi-packages huggingface dataset:
mdbookhtml2pdf 0.2.0
Convert mdBook HTML to PDF with TOC, code highlighting and mermaid diagrams
Requires Python: >=3.7

# mdBook HTML to PDF Converter
        
        将 mdBook 生成的 HTML 文件转换为 PDF，支持：
        - 自动生成目录（TOC）
        - 代码高亮
        - Mermaid 图表转换
        
        ## 安装要求
        
        1. Python 3.7+
        2. Node.js 和 npm（用于 mermaid-cli）
        
        ## 安装步骤
        
        1. 安装 Node.js 依赖：
        
        ```bash
        npm install -g @mermaid-js/mermaid-cli
        ```
        
        2. 安装 Python 包：
        
        ```bash
        pip install mdbookhtml2pdf
        ```
        
        ### 使用方法
        
        ```bash
        mdbookhtml2pdf input.html [output.pdf]
        ```
        
        
        如果不指定输出文件名，将使用输入文件名（替换扩展名为.pdf）。
        
        
        
        ## 功能特点
        
        1. 目录生成
           - 自动为 h1-h6 标题生成目录
           - 目录包含页码和引导线
           - 目录单独成页
        
        2. 代码高亮
           - 支持多种编程语言
           - 保持原有的代码格式
           - 支持行内代码和代码块
        
        3. Mermaid 图表
           - 自动转换 mermaid 图表为高质量图片
           - 支持所有 mermaid 图表类型
           - 保持图表清晰度
        
        ## 项目地址
        
        * [https://gitee.com/jakHall/mdbookhtml2pdf.git](https://gitee.com/jakHall/mdbookhtml2pdf.git)
        
        ## todo
        
        目前封面支持存在部分问题，后续有空时，会解决改问题，其他的开发者可以自行尝试解决.
        
        ## 许可证
        
        MIT License
astrotel 0.1.0
Add your description here
Requires Python: >=3.12

# Astrotel

Astrotel sending OpenTelemetry tracing and logging integration for Python applications into Signoz, Jaeger, OTEL Collector,... with support for FastAPI, Celery, MCP,... application


## Installation

Install with pip (requires Python 3.12+):

```sh
pip install astrotel[fastapi]
```

For FastAPI support:

```sh
pip install astrotel[fastapi]
```

## Usage

### Basic Usage

```python
from astrotel.provider.fastapi import FastAPIOpentelemetryTracing
from fastapi import FastAPI

app = FastAPI()
tracer = FastAPIOpentelemetryTracing()
tracer.configure_tracing(app)
```

### Logging Integration

```python
import logging

tracer = FastAPIOpentelemetryTracing()
logging_handler = tracer.configure_logging_handler()

# Attach handler to root logger
logging.basicConfig(
    level=logging.INFO, 
    handlers=[logging_handler, logging.StreamHandler()]  # also keep console logs
)

# Attach handler to FastAPI's logger too
uvicorn_logger = logging.getLogger("uvicorn")
uvicorn_logger.addHandler(logging_handler)

uvicorn_logger = logging.getLogger("uvicorn.access")
uvicorn_logger.addHandler(logging_handler)

fastapi_logger = logging.getLogger("fastapi")
fastapi_logger.addHandler(logging_handler)
```

## Configuration

You can configure Astrotel via environment variables or by creating environment variables:

### Meaning
- `OTEL_SERVICE_NAME`: Set service name
- `OTEL_DEPLOYMENT_ENVIRONMENT`: Set deployment environment name
- `OTEL_MODE`: Send to exporter by `http` or `grpc`
- `OTEL_GRPC_ENDPOINT`: gRPC OTEL collector endpoint (default: `http://localhost:4317`)
- `OTEL_HTTP_ENDPOINT`: HTTP OTEL collector endpoint (default: `http://localhost:4318`)
- `OTEL_LOGS_SHIP_LEVEL`: Minimum log level to ship (`DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`)

### For example

```
OTEL_SERVICE_NAME=my-service
OTEL_DEPLOYMENT_ENVIRONMENT=production
OTEL_MODE=grpc
OTEL_GRPC_ENDPOINT=http://otel-collector:4317
OTEL_HTTP_ENDPOINT=http://otel-collector:4318
OTEL_LOGS_SHIP_LEVEL=INFO
```

## Documentation

See the [docs/](docs/index.rst) or build the documentation locally:

```sh
make -C docs html
```

## Development

- Lint: `make lint`
- Format: `make format`

## License
MIT
ssage 1.5.1
Super-Simple AGE - A wrapper around python age (actually good encryption)

# Super-Simple AGE

A wrapper around the [age](https://pypi.org/project/age/) encryption library that makes it easier to use.
AGE stands for Actually Good Encryption, and is a modern encryption library that is easy to use and secure.

Additionally, this library provides an authenticated encryption. However, this feature is fully optional and can be disabled, achieving full compatibility with the age library.

## Installation

```bash
pip install ssage
```

## Supported backends

When using the `ssage` library, you can choose between backends
which handle the actual encryption and decryption.
Backends are chosen by passing `backend=` param to the `SSAGE` class.
The following backends are supported:

### Python age

This is the default backend, and it is a pure Python implementation of the age encryption library.
Its main advantage is that it does not require any additional dependencies,
but does not guarantee side-channel resistance, nor multi-threading support.

### Native

Native backend uses the `age` and `age-keygen` binaries to perform encryption and decryption.
Its main advantage is that is runs anywhere the `age` binaries are available,
the main disadvantage is that is stores the private key in a temporary file.

### Pyrage

Pyrage is using a Rust-based binding for the age encryption.
Main advantage is that it is faster than the Python age backend, but
the Rust library needs to be compiled for the target platform.

## Code Example

### Simple Encryption

```python
from ssage import SSAGE
e = SSAGE(SSAGE.generate_private_key())
encrypted = e.encrypt('Hello, world!')
print(encrypted)
decrypted = e.decrypt(encrypted)
print(decrypted)
assert decrypted == 'Hello, world!'
print('Test passed!')
```

### Simple Authenticated Encryption

```python
from ssage import SSAGE
e = SSAGE(SSAGE.generate_private_key(), strip=True, authenticate=True)
encrypted = e.encrypt('Hello, world!')
print(encrypted)
decrypted = e.decrypt(encrypted)
print(decrypted)
assert decrypted == 'Hello, world!'
print('Test passed!')
```

### Public Key Encryption

```python
from ssage import SSAGE
public_key = SSAGE(SSAGE.generate_private_key()).public_key
e = SSAGE(public_key=public_key)
encrypted = e.encrypt('Hello, world!')
print(encrypted)
decrypted = e.decrypt(encrypted) # This will fail because the private key is not available
```

### Multiple Recipients

```python
from ssage import SSAGE
public_key_1 = SSAGE(SSAGE.generate_private_key()).public_key
public_key_2 = SSAGE(SSAGE.generate_private_key()).public_key
e = SSAGE(public_key=public_key_1)
e.encrypt('Hello, world!', additional_recipients=[public_key_2])
```