fntypes
Functional typing in Python!
See examples
See documentation
fntypes is based on the belief that raising exceptions should be avoided. Therefore, it offers a set of functional types needed to write better code. This type strategy grants your project with higher control over type system - improves control flow
Contributions are welcome
@unwrapping
def send_funds(
sender_id: int,
receiver_id: int,
amount: decimal.Decimal,
) -> Result[TransactionID, str]:
sender = get_user(sender_id).expect("Sender is undefined")
receiver = get_user(receiver_id).expect("Receiver is undefined")
if sender.get_balance().unwrap() < amount:
return Error("Sender has not enough funds to complete transaction")
return Ok(
create_transaction(sender, receiver, amount)
.unwrap()
.transaction_id
)
Metadata
Release files for funtypes 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| funtypes-0.2.1.tar.gz | 8.0 kB | Without provenance | Details for funtypes-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| funtypes-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for funtypes-0.2.1-py3-none-any.whl |
Total release size: 21.3 kB
Release files / funtypes-0.2.1.tar.gz
| Download URL | funtypes-0.2.1.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1b35a355c52193c4dfd6a06b39cbbb07125be3d5331ebc0aac9c3d2b3e5c193
|
|
BLAKE2b-256 checksum How to use checksums |
a259dc2bcf2bdacbd45b964bc8f588c87c8684f7d1828251eaaa46248b78bbc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.3 Windows/11
|
Release files / funtypes-0.2.1-py3-none-any.whl
| Download URL | funtypes-0.2.1-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
878129ec67117cad9719579897bd4cd7c35a332972bc226c860f7fc39336a658
|
|
BLAKE2b-256 checksum How to use checksums |
10d42c623f3aa7336f7347d07c92a419eb9450fd517c9b20e7624637e5f7dc3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.3 Windows/11
|
Security for funtypes 0.2.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.