Skip to main content

A small library providing functional wrappers over Optional and Iterable

Project description

When coming from a functional background, it is normal to miss common chainable combinators for container types, namely:

  • map|fmap
  • filter|where
  • flatMap|bind|collect

This library contains simple wrappers for Optional and Iterable Python values which provide just that.

The library is currently in very experimental stage, use at your own risk.

An example:

  from fpiper import pipe, pipeOpt

  x = pipe(myList).filter(lambda x: x > 0).flatMap(lambda x: x*2).run()
  y = pipeOpt(loadCustomer).flatMap(validateCustomer).map(submitCustomer).run()

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

fpiper-0.0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fpiper-0.0.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fpiper-0.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.2 Darwin/20.5.0

File hashes

Hashes for fpiper-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3872aa98314a1d7d5559d431284ad47d35efa7cb93247ec0d2149066ea34687c
MD5 1dc9a8a06fa2b99b964b4d5ce9fba1aa
BLAKE2b-256 c64e66c1899375502e9ac3028adce8c6ed8c4e4861761a1ed9ac300dbd667a1b

See more details on using hashes here.

File details

Details for the file fpiper-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: fpiper-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.2 Darwin/20.5.0

File hashes

Hashes for fpiper-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1384a7ce786988689c5c8b126273ff7faaf6e4e5240eb8d44bf029f32dbeb2b7
MD5 b87572c70679bef1aa6c77b9ded4ef43
BLAKE2b-256 df3a0d9bb2e10f343485a0553f97eeefcb25ff524da470effe4c8e779ee01aca

See more details on using hashes here.

Supported by

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