Metadata-Version: 2.1
Name: pipe-utils
Version: 0.2.1
Summary: Python with pipes, utils, and pipe utils
License: MIT License
        
        Copyright (c) 2023 James Finnie-Ansley
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: repository, https://github.com/James-Ansley/pipe-utils
Project-URL: documentation, https://pipe-utils.rtfd.io/
Classifier: Development Status :: 5 - Production/Stable
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE

# Pipe Utils

Python with pipes, utils, and pipe utils.

## Install

```
pip install pipe-utils
```

## Docs

https://pipe-utils.rtfd.io

## Example

```python
from pipe_utils import Pipe
from pipe_utils.iterables import *
from pipe_utils.mappings import *

words = "I just think pipes are neat"

result = (
        Pipe(words)
        | str.lower
        | str.split
        | group_by(len)
        | sorted_dict
).get()

print(result)
#  {1: ['i'], 3: ['are'], 4: ['just', 'neat'], 5: ['think', 'pipes']}
```

And, if you're feeling dangerous, override the builtin `filter`, `map`,
and `all` functions:

```python
from pipe_utils.override import *

data = [[1, -3, 4], [1, 2, 3], [2, 3, 4], [5, -1, 4]]

result = (
        Pipe(data)
        | filter(all(it >= 0))
        | map(sum_by(it * it))
        | list
).get()

print(result)  # [14, 29]
```
