Skip to main content

Make any your functions pipable.

Project description

Kiseru is Japanese pipe. That's all.


# Install

`pip install kiseru` or `git clone git@github.com:mtwtkman/kiseru`


# Usage

You can choice `class-based` or `decorator` style.

# class-based-style

```python
from kiseru import Kiseru


doggy = Kiseru(lambda: 'inu is dog')
split = Kiseru(lambda x: x.split())
capitalize = Kiseru(lambda x: [i[0].upper() + i[1:] for i in x])
join = Kiseru(lambda x: ' '.join(x))

doggy() | split | capitalize | join
# => 'Inu Is Dog'
```

# decorator-style

This is just a syntax sugar.

```python
from kiseru import kiseru


@kiseru
def kitten():
return 'neko is cat'

@kiseru
def kebab(x):
return '-'.join(x.split())

@kiseru
def does_cat_hide(x):
return 'cat' in x

kitten() | kebab | does_cat_hide
# => True
```

Project details


Release history Release notifications

This version
History Node

0.0.1

History Node

0.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
kiseru-0.0.1.tar.gz (1.6 kB) Copy SHA256 hash SHA256 Source None Apr 15, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page