Metadata-Version: 2.4
Name: listele
Version: 2.1.0
Summary: Just a printing listed version function.
Author: Esat Saygın
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# listele

Prints the given iterable in a listed format with columns and spacing.

## Installation

```bash
pip install listele
```

## Usage

```python
from listele import listele

listele(li, column, /, *, spaces=30, find="", regex="", vertical=False, out=stdout, err_out=stderr)
```

| Parameter | Description |
|-----------|-------------|
| `li` | A list or dict to display. Dicts are formatted as "key: value". |
| `column` | Number of columns in output. |
| `spaces` | Minimum width of each column. |
| `find` | Case-insensitive substring filter. |
| `regex` | Regex pattern to filter elements (uses match). |
| `vertical` | If True, fill columns top-to-bottom instead of left-to-right. |
| `out` | Output stream for results. |
| `err_out` | Stream for error and warning messages. |

## Examples

**Basic usage:**

```python
listele(range(1, 13), 4)
```

```
1                             2                             3                             4
5                             6                             7                             8
9                             10                            11                            12
```

**Filtering with `find`:**

```python
li = ['apple', 'apricot', 'banana', 'cherry', 'avocado', 'blueberry']
listele(li, 3, find="a")
```

```
apple                         apricot                       banana
avocado
```

**Filtering with `regex`:**

```python
li = ['file1.txt', 'file2.txt', 'image1.png', 'image2.png', 'data.csv']
listele(li, 3, regex=".*\\.txt$")
```

```
file1.txt                     file2.txt
```

**Vertical (top to bottom):**

```python
listele(range(1, 10), 3, vertical=True)
```

```
1                             4                             7
2                             5                             8
3                             6                             9
```

**Dictionary:**

```python
d = {'name': 'Ali', 'age': 25, 'city': 'Istanbul', 'job': 'dev', 'lang': 'Python', 'tool': 'vim'}
listele(d, 2, spaces=25)
```

```
name: Ali                age: 25
city: Istanbul           job: dev
lang: Python             tool: vim
```
