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 fntypes 0.1.4.post3
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 |
|---|---|---|---|---|
| fntypes-0.1.4.post3.tar.gz | 5.7 kB | Without provenance | Details for fntypes-0.1.4.post3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fntypes-0.1.4.post3-py3-none-any.whl | Python 3 | none | any | Details for fntypes-0.1.4.post3-py3-none-any.whl |
Total release size: 14.5 kB
Release files / fntypes-0.1.4.post3.tar.gz
| Download URL | fntypes-0.1.4.post3.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da0b40925039ac98bff11b3f902cb1380c32671737ebc42014e26a327bd96811
|
|
BLAKE2b-256 checksum How to use checksums |
0cd020c11b86f20442e64d2dabb9342525a041561130e81ad71cfc309f1d155e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.0 CPython/3.11.9 Darwin/23.6.0
|
Release files / fntypes-0.1.4.post3-py3-none-any.whl
| Download URL | fntypes-0.1.4.post3-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea67b65d1f528de742f91cea433aaccb6f6dabfbe8ea2c579878388e7c1b3b3e
|
|
BLAKE2b-256 checksum How to use checksums |
ed372fb47ec4d531cfca52bf7b18379eee3c418d789b230b0cf182331a30b1c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.0 CPython/3.11.9 Darwin/23.6.0
|
Security for fntypes 0.1.4.post3
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.