--- id: oslash version: "2.0.0" license: Copyright 2020 Dag Brattli Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software… (full text in the JSON record) license_treatment: permissive maintenance: aging --- # oslash — Functional library for Functors, Applicatives, and Monads in Python 3.12+ License: permissive · Maintenance: aging · Downloads: 121.9K/mo ## What it is and what it does OSlash is a Python library that teaches and demonstrates functional programming by implementing Haskell-style abstractions—Functor, Applicative, Monad, and concrete monads like Maybe, Either, IO, Writer, Reader, and State. It uses Python 3.12's modern type system (PEP 695 syntax) and is fully type-checked with Pyright in strict mode, making it a learning tool rather than a production framework. The library unifies functional and object-oriented paradigms by wrapping functions in classes and avoiding mutable state; data lives only in function closures. It provides monadic sequencing operators, lifting, composition, and utility functions. The author explicitly recommends Expression for production functional programming; OSlash is designed as a tutorial implementation to understand how these concepts work. Use it for: - Learning functional programming concepts by studying and experimenting with Haskell-style abstractions in Python. - Understanding how Maybe and Either monads handle optional values and error cases without exceptions. - Exploring IO monads and Reader/Writer patterns for managing side effects and logging in a functional style. - Teaching functional programming principles to Python developers using a type-safe, well-documented codebase. - Prototyping functional algorithms and compositions before porting to a production functional library. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. OSlash implements functional programming abstractions—functors, applicatives, and monads—in Python 3.12+ with modern type annotations, providing educational implementations of concepts from Haskell. Yes, if your goal is learning functional programming concepts or teaching them to others. The modern type system, strict Pyright checking, and educational focus make it a solid learning resource. No, if you need production-grade functional programming—use Expression instead. The aging maintenance status is not a blocker for a stable educational library, but verify that tutorials and examples match version 2.0.0. ## Install pip install oslash uv add oslash poetry add oslash ## Installing oslash Before you install: Low friction: pure Python wheel with no runtime dependencies. Maintenance is aging—last release 270 days old—but the repo remains active and the package is marked Production/Stable. License in practice: MIT license (permissive). You can use, modify, and distribute OSlash freely in commercial or private projects with minimal restrictions. Quickstart: pip install oslash from oslash import Just result = Just(2).map(lambda x: x + 3) print(result) # Just 5 Requires Python 3.12 or later; earlier versions are not supported. Verify before relying: - Whether the library is actively maintained beyond the aging maintenance status signal—last commit date suggests recent activity but release cadence is unclear. - Performance characteristics and whether OSlash is suitable for computationally intensive functional workflows beyond educational use. ## Package facts - License: Copyright 2020 Dag Brattli Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 121.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags functional programming monads python, haskell concepts python, functor applicative monad, python type-safe functional library, learn functional programming python, maybe either monad python, functional composition python, functional-programming, educational, type-safe [View on SkillFed](https://skillfed.io/packages/oslash) · [View on PyPI](https://pypi.org/project/oslash/)