Metadata-Version: 2.4
Name: lidb
Version: 2026.7.31.1
Summary: Light database for quantor
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: dynaconf>=3.2.11
Requires-Dist: polars>=1.35.1
Requires-Dist: sqlparse>=0.5.3
Requires-Dist: logair>=1.0.8
Requires-Dist: clickhouse-df>=0.1.5
Requires-Dist: connectorx>=0.4.3
Requires-Dist: pymysql>=1.1.2
Requires-Dist: xcals>=0.1.5
Requires-Dist: ygo>=2026.5.14.1
Requires-Dist: lark>=1.3.1
Requires-Dist: tqdm>=4.67.1
Requires-Dist: varname>=0.15.1

# lidb

`lidb` is a lightweight quant data processing library (Light Database for Quantor), providing dataset management with dependency tracking, topological scheduling, and partitioned parquet storage.

## Features

- Dataset management with dependency tracking and automatic backfill
- Topological DAG scheduler — dependency graph → layer-parallel execution
- Full-cache fast path — scan-only when all dates cached, skip scheduler
- `@dataset()` decorator — convert functions to Dataset objects
- Hive-style partition storage (date=xxx/asset=xxx/data.parquet)
- Expression engine (QDF) for factor computation

## Installation

```bash
# PyPI（发布版本）
pip install lidb

# GitHub（最新开发版本）
pip install -e "lidb @ git+ssh://git@github.com/link-yundi/lidb.git"
```

## Documentation

See [API Documentation](docs/index.md) for detailed usage.

## Quick Start

```python
import lidb
import polars as pl

# Define a dataset via @dataset() decorator
@lidb.dataset(update_time="15:00:00")
def my_dataset(date: str):
    return pl.DataFrame(
        {"date": [date], "time": ["15:00:00"], "asset": ["000001"], "value": [1.0]}
    )

# Get data
data = my_dataset.get_value("2024-01-01")

# Load datasets into a new Zoo workspace
zoo = lidb.load(
    beg_date="2024-01-01",
    end_date="2024-01-31",
    times=["15:00:00"],
    ds_list=[my_dataset],
)
```

## License

MIT License
