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


Download files

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

Source Distribution

kiseru-0.0.1.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file kiseru-0.0.1.tar.gz.

File metadata

  • Download URL: kiseru-0.0.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kiseru-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d60c3af7c529987a0302cdd4f690a7f71cb4219ffe74e2464d7281ea8f026dc8
MD5 54b13ca1a61942c1cf64b4b036383b13
BLAKE2b-256 68f72585672eb4860a306390ffb0fb3d59ec326a0bd8924dae0db161c4091e3b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page