Metadata-Version: 2.1
Name: sspipe
Version: 0.0.5
Summary: Stupid Simple Pipe
Home-page: https://github.com/sspipe/sspipe.git
Author: Mohammad Hossein Sekhavat
Author-email: sekhavat17@gmail.com
License: UNKNOWN
Keywords: pipe helper tool magrittr data science
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
Provides-Extra: dev
Provides-Extra: test
Requires-Dist: toolz (==0.9.0)
Provides-Extra: dev
Requires-Dist: check-manifest; extra == 'dev'
Provides-Extra: test
Requires-Dist: coverage; extra == 'test'

# Stupid Simple Pipe

`pip install sspipe` then:

* `x | p(f)` is equal to `f(x)`
* `x | p(f).attr[item](arg) + 2 | p(g)` is equal to `g( f(x).attr[item](arg) + 2 )`
* `(x | p(f)) | p(g)` is equal to `x | (p(f) | p(g))`
* `px` is equal to `p(lambda x: x)`

Now, instead of

```python
from pathlib import Path

print(' '.join(list(map(str, filter((lambda x: x.is_dir()), Path('/etc').glob('*'))))))
```

Write:

```python
from sspipe import p, px
from pathlib import Path

Path('/etc').glob('*') | p.filter(px.is_dir()) | p.map(str) | p(list) | p(' '.join) | p(print)
```


