Skip to main content


Sayori

Sayori is a tiny library for composing pure functions using pipeline notation. If f and g are functions then f | g is a function such that (f | g)(x) = g(f(x)).

Installation

pip install sayori

Usage

Sayori exports a simple decorator called Composable which implements the pipe operator. It can be used as follows:

from sayori import Composable

Create two composable functions...

f = Composable(lambda x: x + 1)

g = Composable(lambda x: x * 2)

Compose them...

h = f | g

Apply the composite...

h(2)  # returns 6

Release files for sayori 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sayori 1.0.6
File Size Uploaded
sayori-1.0.6.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sayori 1.0.6
File Interpreter ABI Platform
sayori-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 5.4 kB

Release files / sayori-1.0.6.tar.gz

Download URL sayori-1.0.6.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
12aece4a53056c019f24c00b63bf83d0720ae49b842c60264c530380bd61e378
BLAKE2b-256 checksum
How to use checksums
099d40482445a6270c37a14426edd76ce3988948a78f1ae47dedf4e7db6ac4b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.0

Release files / sayori-1.0.6-py3-none-any.whl

Download URL sayori-1.0.6-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f77775a884919cd04143b2534a85d771b0ed3f9a160cbb7afdc52457e69a185
BLAKE2b-256 checksum
How to use checksums
6e3a377d64cd850b5a78639f51d97bbc0ba0b020be52dc93c7dc71aaa0554be5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.0

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page