Skip to main content

Compose: No frills Python function composition.

Important If you prefer to write Python code in a more functional style you may find the toolz package to be more useful, it includes a compose function as well as several functions conducive to writing functional code in Python.

No magic operators or special objects just a function with unit tests. Here is a wonderfully contrived example to whet your appetite:

>>> import json
>>> from compose import compose
>>> from operator import itemgetter
>>> compose((3).__mul__, next, iter, itemgetter('b'), json.loads)('{"a": 1, "b": [2, 3]}')
6

Contribute

See http://github.com/jonathanj/compose for development.

Installation

$ pip install compose-func

Metadata

Release files for compose-func 1.0.1

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

Source distribution (sdist)

Source distribution for compose-func 1.0.1
File Size Uploaded Provenance Actions
compose-func-1.0.1.tar.gz 1.7 kB Without provenance Details for compose-func-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for compose-func 1.0.1
File Interpreter ABI Platform Actions
compose_func-1.0.1-py2-none-any.whl Python 2 none any Details for compose_func-1.0.1-py2-none-any.whl

Total release size: 4.2 kB

Release files / compose-func-1.0.1.tar.gz

Download URL compose-func-1.0.1.tar.gz
Size 1.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b0d46485c826d3a7a1d589d492c42786aa975e5035abceeb478dcf540535741d
BLAKE2b-256 checksum
How to use checksums
4b8fcbd1f8570d2a552409656d748fd2bb68151e87504c89c733d64e44e59e30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / compose_func-1.0.1-py2-none-any.whl

Download URL compose_func-1.0.1-py2-none-any.whl
Size 2.5 kB
Tags Python 2
SHA-256 checksum
How to use checksums
68e0c64687b3d5afe2b3c094de5565d6d0aa93f2106023769ba56a8f5c430725
BLAKE2b-256 checksum
How to use checksums
8339a789c2e1a1bf79ae5f993ff047b550cbc3a31a844ed4ab21ebcaa95b8ce7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for compose-func 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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