Skip to main content

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 Error class

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

isos-0.2.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isos-0.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file isos-0.2.0.tar.gz.

File metadata

  • Download URL: isos-0.2.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for isos-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9cfe86938cb30367797e3467df0085d99edb29c3303a21ccaa12db99d3b39e88
MD5 7209f691f268d315833863ad4a26ce60
BLAKE2b-256 80a20cee3a6b52b0ebe9230c080bf2ce6b1b82a24703d36c41bcc1df8b2a4414

See more details on using hashes here.

Provenance

The following attestation bundles were made for isos-0.2.0.tar.gz:

Publisher: release.yaml on gsmyridis/isos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file isos-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: isos-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for isos-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d189efb859edaf2dbce3f6eb9b35fff486ff4c9068760d420a4f1eda363a40d
MD5 e98db603dfc8cfacc1df06f6eb092a9c
BLAKE2b-256 20238832b035165f2094c2eba7a76ab0ddee54a894da7286f29674813f9aa95f

See more details on using hashes here.

Provenance

The following attestation bundles were made for isos-0.2.0-py3-none-any.whl:

Publisher: release.yaml on gsmyridis/isos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page