Metadata-Version: 2.3
Name: zlinq
Version: 0.1.0
Summary: Python implementation of LINQ to Objects — fluent, lazy, and fully typed
Keywords: linq,enumerable,query,functional,lazy,fluent,iterable
Author: Alexandr
Author-email: Alexandr <alexandr.panteleev2000@gmail.com>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.14
Project-URL: Homepage, https://github.com/oek1ng/zlinq
Project-URL: Repository, https://github.com/oek1ng/zlinq
Project-URL: Documentation, https://github.com/oek1ng/zlinq
Description-Content-Type: text/markdown

# zlinq

**Python reimplementation of LINQ to Objects** — lazy, chainable, fully typed query operators for iterables.

## Install

```shell
uv add zlinq
```

or

```shell
pip install zlinq
```

## Quick example

```python
from zlinq import Enumerable

result = (Enumerable([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
    .where(lambda x: x % 2 == 0)
    .select(lambda x: x * 10)
    .take(3)
    .to_list())

# [20, 40, 60]
```

## Operators

All operators are available both as `Enumerable` methods (method chaining) and as standalone functions imported directly from `zlinq`.

| Category | Operators |
|----------|-----------|
| Generation | `empty`, `range`, `repeat` |
| Filtering | `where`, `of_type` |
| Projection | `select`, `select_many` |
| Partitioning | `take`, `skip`, `take_while`, `skip_while`, `chunk` |
| Element | `first` / `first_or_default`, `last` / `last_or_default`, `single` / `single_or_default`, `element_at` / `element_at_or_default`, `default_if_empty` |
| Aggregation | `count`, `sum`, `min`, `max`, `average`, `aggregate`, `scan`, `min_by`, `max_by` |
| Quantifiers | `any`, `all`, `contains` |
| Set | `distinct`, `distinct_by`, `union`, `union_by`, `intersect`, `intersect_by`, `except_`, `except_by` |
| Ordering | `order_by`, `order_by_descending`, `then_by`, `then_by_descending`, `reverse` |
| Grouping | `group_by`, `to_lookup` |
| Joining | `join`, `group_join` |
| Concatenation | `concat`, `append`, `prepend` |
| Zip | `zip` |
| Conversion | `to_list`, `to_dictionary`, `to_hash_set`, `to_lookup`, `as_enumerable` |
| Equality | `sequence_equal` |

## Documentation

Full API reference and usage guides are available at the [MkDocs site](https://github.com/oek1ng/zlinq) (run `mkdocs serve` locally).

## License

Licensed under the MIT License.
