# Remedapy

Data-first and data-last utility library for python.

A port of [Remeda.js](https://github.com/remeda/remeda).

## Features

- As typed as possible with current python typing system.
- Supports data-first (`R.filter(array, fn)`) and data-last (`R.filter(fn)(array)`) approaches.
- Lazy evaluation support with functions returning iterables.
- Fully documented with [numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html), supports in-editor function documentation.
- 100% code coverage.
- Typing passes on basedpyright.
- Docstring examples tested with doctest.
- Zero runtime dependencies.

## Getting started

### Installation

```bash
pip install remedapy # pip
uv add remedapy # uv
```

### Usage

```python
import remedapy as R

R.pipe(
    [1, 2, 2, 3, 3, 4, 5, 6],
    R.for_each(print),
    R.unique(),
    R.take(3),
    list
)
# Returns [1, 2, 3]
# Prints:
# 1
# 2
# 2
# 3
```

## Function catalogue

{{groupings}}

## Documentation

{{#groups}}
### {{name}}

{{#functions}}
#### {{name}}

{{summary}}

Examples:

```pycon
{{{examples}}}
```
Parameters:
```plaintext
{{parameters}}
```

{{#returns}}
Returns:
```plaintext
{{returns}}
```
{{/returns}}

{{#yields}}
Yields:
```plaintext
{{yields}}
```
{{/yields}}

{{#see_also}}
See Also:
{{/see_also}}
{{#see_also}}
- [{{.}}](#{{.}})
{{/see_also}}

{{/functions}}

{{/groups}}