Metadata-Version: 2.4
Name: bendlog
Version: 0.1.0
Summary: Utilities for analyzing Databend logs
Project-URL: Homepage, https://github.com/datafuselabs/databend
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: zstandard>=0.20.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Provides-Extra: publish
Requires-Dist: build; extra == "publish"
Requires-Dist: twine; extra == "publish"

# bendlog

Utilities for analyzing Databend logs.

## Installation

```bash
# From the bendlog directory
pip install .

# Editable install (for development, changes take effect immediately)
pip install -e .

# With dev dependencies (pytest)
pip install -e ".[dev]"
```

## Usage

```python
from bendlog import read_lines

# Plain text file
for line in read_lines("file.log"):
    print(line)

# Zstd compressed
for line in read_lines("file.log.zst"):
    print(line)

# Tar.gz archive (reads all files inside)
for line in read_lines("logs.tar.gz"):
    print(line)

# Stdin
for line in read_lines("-"):
    print(line)
```

## Run Tests

```bash
pytest tests/ -v
```

## Publish to PyPI

```bash
# Install publish dependencies
pip install -e ".[publish]"

# Get API token from https://pypi.org/manage/account/token/
# or https://test.pypi.org/manage/account/token/ for TestPyPI

# Publish to TestPyPI first (recommended)
TWINE_PASSWORD=pypi-xxx ./publish.sh test

# Publish to PyPI
TWINE_PASSWORD=pypi-xxx ./publish.sh
```
