Skip to main content

A library of rust-styled monad utils for python.

Project description

Logo

Monad STD

GitHub Workflow Status (with event) python version codecov PyPI - Downloads

monad_std is a library that provides some useful Rust-styled utilities for using monads in Python.

Quick Start

To install this library, simply use your favorite package manager, here we use pure pip.

pip install monad-std

Then, import the library:

>>> from monad_std import *
>>> Ok(2)
Result::Ok(2)

Now you could use the utilities this library provides. For more information and examples, see the documentation above.

For a better guide, see the documentation's quick start guide.

Contribution

Any issue and pull request is welcomed, and you can directly make a pr for new features or open an issue for bug reports.

Future Plan

Until now, this library provides the following features:

  • monad_std.Option: An optional value.
  • monad_std.Result: A structure containing a success value or an error.
    • monad_std.Ok: A successful value.
    • monad_std.Err: An error value.
  • monad_std.std_types: Wrapped api around std types.
  • monad_std.iter: Iterator interface with functors and monads support.

And the following are being developed:

  • monad_std.Either: A structure containing two type of values, but not that specific like monad_std.Result
  • A better entry point for those utilities.

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

monad_std-0.4.0.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

monad_std-0.4.0-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file monad_std-0.4.0.tar.gz.

File metadata

  • Download URL: monad_std-0.4.0.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Windows/10

File hashes

Hashes for monad_std-0.4.0.tar.gz
Algorithm Hash digest
SHA256 335785cd177b113cc35bd65cffce6885aa10cb06bb1f95ee8a9b30b6c52ec790
MD5 cde8e6c5db6ca98dc2742c8dfbc147ca
BLAKE2b-256 6a6359dfefd910bbce109ebecb4a1aaf06e09c008b4b81f3da6b481603f63b5c

See more details on using hashes here.

Provenance

File details

Details for the file monad_std-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: monad_std-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Windows/10

File hashes

Hashes for monad_std-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fa789fe40f1d3e28ac5a822bb2b3bc0ed71e1cb0a332fe292edee4f2ff61799
MD5 ebe5df28bde66e79ffe5302c09e3d9a8
BLAKE2b-256 a058d7601879785f45c26ba2b3b056c6b3a421720a56523a054ad019771ee011

See more details on using hashes here.

Provenance

Supported by

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