Pragmatic functional programming for Python 3.13+
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
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)
| File | Size | Uploaded | |
|---|---|---|---|
| fptk-1.2.0.tar.gz | 16.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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