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.1.1.tar.gz (7.5 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.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

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

Hashes for isos-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9b0c72e1ec473eca59ce5c515dd0db2b0b5e1c1dbd3ccf27ab521f63c203b54b
MD5 3125831b2b997cece4a257eaf104a33a
BLAKE2b-256 3af363bfaae71581862e96d070000adc74dc85db1d83f1708b5b1d4878beb733

See more details on using hashes here.

Provenance

The following attestation bundles were made for isos-0.1.1.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.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

Hashes for isos-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8462503529fa924ab504486c14a6f16b3f3431103a3e40fc0814d1656892960
MD5 9c935069d80c2e479bf1d016bf317e2e
BLAKE2b-256 15bd56841a99478ac56184f9bad1a15aafd36d88144efa762b13cc1934174c70

See more details on using hashes here.

Provenance

The following attestation bundles were made for isos-0.1.1-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