Option and Result types for Python.
Project description
isos
isos is a Python library that introduces Option and Result types to implement the "result pattern" in your code.
Why Use This Pattern?
In traditional Python, errors are handled with exceptions. The result pattern takes a different approach by treating errors as values that can be:
- Passed between functions
- Transformed
- Chained together
- Explicitly handled at the appropriate point
This forces developers to consciously handle non-existent values and error conditions, leading to more robust and predictable code.
Core Features
- Option Type: Explicitly represents the presence or absence of a value
- Result Type: Represents either a successful value or an error value
- Custom Errors: Create your own error types by subclassing the
Errorclass
By making errors first-class citizens in your code, isos helps prevent bugs that might occur from unhandled edge cases and makes your error handling strategy more transparent and systematic.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isos-0.1.1.tar.gz.
File metadata
- Download URL: isos-0.1.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b0c72e1ec473eca59ce5c515dd0db2b0b5e1c1dbd3ccf27ab521f63c203b54b
|
|
| MD5 |
3125831b2b997cece4a257eaf104a33a
|
|
| BLAKE2b-256 |
3af363bfaae71581862e96d070000adc74dc85db1d83f1708b5b1d4878beb733
|
Provenance
The following attestation bundles were made for isos-0.1.1.tar.gz:
Publisher:
release.yaml on gsmyridis/isos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
isos-0.1.1.tar.gz -
Subject digest:
9b0c72e1ec473eca59ce5c515dd0db2b0b5e1c1dbd3ccf27ab521f63c203b54b - Sigstore transparency entry: 191713678
- Sigstore integration time:
-
Permalink:
gsmyridis/isos@3aa1b0ceb63affeeebcde087569aa2c4849ed550 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/gsmyridis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@3aa1b0ceb63affeeebcde087569aa2c4849ed550 -
Trigger Event:
push
-
Statement type:
File details
Details for the file isos-0.1.1-py3-none-any.whl.
File metadata
- Download URL: isos-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8462503529fa924ab504486c14a6f16b3f3431103a3e40fc0814d1656892960
|
|
| MD5 |
9c935069d80c2e479bf1d016bf317e2e
|
|
| BLAKE2b-256 |
15bd56841a99478ac56184f9bad1a15aafd36d88144efa762b13cc1934174c70
|
Provenance
The following attestation bundles were made for isos-0.1.1-py3-none-any.whl:
Publisher:
release.yaml on gsmyridis/isos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
isos-0.1.1-py3-none-any.whl -
Subject digest:
e8462503529fa924ab504486c14a6f16b3f3431103a3e40fc0814d1656892960 - Sigstore transparency entry: 191713679
- Sigstore integration time:
-
Permalink:
gsmyridis/isos@3aa1b0ceb63affeeebcde087569aa2c4849ed550 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/gsmyridis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@3aa1b0ceb63affeeebcde087569aa2c4849ed550 -
Trigger Event:
push
-
Statement type: