Install & Compatibility
Where this runs
tested against v0.6.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.064s · 18.4MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.054s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Maybe
✓ from oslash import Maybe
Direct import from oslash package, no submodule needed.
Either
✓ from oslash import Either
Import Either directly from oslash.
List
✓ from oslash import List
Import List (a monadic list wrapper) directly from oslash.
Basic usage of Maybe monad with map and bind (>>).
from oslash import Maybe, Just, Nothing
result = Just(42).map(lambda x: x * 2)
print(result)
# Output: Just(84)
result2 = Nothing() >> (lambda x: Just(x * 2))
print(result2)
# Output: Nothing()
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'oslash.maybe'
In OSlash v2.0.0, submodules like `oslash.maybe` were removed in favor of direct imports.
fixChange import from `from oslash.maybe import Maybe` to `from oslash import Maybe`.
TypeError: unsupported operand type(s) for >>: 'NoneType' and 'function'
Used `>>` on Python's built-in None instead of OSlash's Nothing() singleton.
fixUse `Nothing()` from oslash instead of plain `None`.
ImportError: cannot import name 'Right' from 'oslash'
`Right` and `Left` constructors are not exported; use `Either.right` and `Either.left` methods or the class constructors.
fixUse `from oslash import Either; value = Either.right(42)` or `Either(42, is_right=True)`.
AttributeError: 'Maybe' object has no attribute 'bind'
The method for monadic bind is `>>` operator, not `.bind()`.
fixUse `>>` operator, e.g., `maybe >> lambda x: Just(x+1)`.
Upgrade
Version history
2.0.0latest on PyPI · released Nov 17, 2025
Audit
Dependencies
No dependency data recorded yet.