Skip to main content

fptk

Pragmatic functional programming for Python 3.13+

PyPI Python CI License


Install

pip install fptk

Quick Example

from fptk.core.func import pipe
from fptk.adt.option import Some, NOTHING
from fptk.adt.result import Ok, Err

# Compose transformations
result = pipe(5, lambda x: x + 1, lambda x: x * 2)  # 12

# Handle absence explicitly
name = Some("alice").map(str.upper).unwrap_or("anonymous")  # "ALICE"

# Type-safe error handling
def parse(s: str) -> Result[int, str]:
    try:
        return Ok(int(s))
    except ValueError:
        return Err(f"invalid: {s}")

parse("42").map(lambda x: x * 2)  # Ok(84)

Documentation

mhbxyz.github.io/fptk

License

MIT

Metadata

Release files for fptk 1.2.0

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

Source distribution (sdist)

Source distribution for fptk 1.2.0
File Size Uploaded
fptk-1.2.0.tar.gz 16.7 kB Details

Built distribution (wheel)

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

Total release size: 37.7 kB

Release files / fptk-1.2.0.tar.gz

Download URL fptk-1.2.0.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9ac0450c5f695ff3eb3698ae910f975d28782dcfe5eba9ca48982e1ed18573f1
BLAKE2b-256 checksum
How to use checksums
c0b818c3245830c4cc36a146a14edf68b3713f629b164f14735ee3f1dd36a789
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 24, 2026.

Transparency log

Release files / fptk-1.2.0-py3-none-any.whl

Download URL fptk-1.2.0-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
860951fd8c57f2a0ac6141d3d93502d32b49f1e15d648c624d68a16ec913c283
BLAKE2b-256 checksum
How to use checksums
cfccba1f313aa64ec276e3e3780897ea85837631afc4efc1bb1d7b9d7ea69977
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.0

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