Expression
Practical functional programming for Python 3.10+
Decision gist · record as of 2026-08-14
Yes, with conditions. Expression is worth installing if you want to adopt functional programming patterns in Python and are willing to require Python 3.10+. The library is stable (Production/Stable status) and permissively licensed. However, the aging maintenance status (541 days since last release) means you should verify that the library's feature set and bug-fix pace meet your project's needs before committing to it as a core dependency.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; earlier Python versions are not supported.
- Low install friction with a single lightweight dependency (typing-extensions).
- Maintenance status is aging—last release was 541 days ago, though the repository remains active with a recent commit on 2025-03-11 and 766 stars.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects.
last release 2025-02-19 (541 days) · last repo commit 2025-03-11 · 766 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,652,649 downloads/mo, #2,062 on PyPI
Alternatives
Verify before relying
pip install expression
from expression import pipe, Some
from expression.collections import Seq, seq
v = Some(1)
result = v.pipe(lambda x: x.map(lambda y: y + 1))
xs = Seq.of(1, 2, 3)
ys = xs.pipe(seq.map(lambda x: x * 2))- Whether the library's type inference works reliably with mypy or Pylance in practice for complex pipelines.
- Performance characteristics compared to native Python iteration for large sequences.
- Adoption and community support beyond the 766 GitHub stars.
What it is and what it does
Expression is a functional programming library for Python 3.10+ that brings F#-inspired abstractions to Python while staying pragmatic and Pythonic. It provides tools for pipelining (composing functions into workflows), error handling via Option and Result types (enabling railway-oriented programming), immutable collections (Seq, Block, Map), pattern matching, and computational expressions—all with full type hints for static type checking.
The library aims to make functional programming accessible to Python developers without requiring purely functional style or heavy abstraction. It supports both fluent (dot-chaining) and functional (pipe) syntax, allowing developers to choose their preferred style. Core use cases include building composable data transformations, handling optional and error values safely, and structuring workflows with predictable error propagation.
Use it for
- Build data transformation pipelines by chaining map, filter, and fold operations on sequences.
- Handle optional values and errors safely using Option and Result types instead of None checks and exceptions.
- Compose reusable functions into custom operators for complex workflows.
- Use pattern matching as an alternative to if-elif-else for cleaner control flow.
- Integrate functional types with Pydantic models for type-safe data serialization.
- Implement actor-model concurrency using the Mailbox Processor for lock-free programming.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Expression is worth installing if you want to adopt functional programming patterns in Python and are willing to require Python 3.10+. The library is stable (Production/Stable status) and permissively licensed. However, the aging maintenance status (541 days since last release) means you should verify that the library's feature set and bug-fix pace meet your project's needs before committing to it as a core dependency.
Install
expression on PyPI
Before you install
Low install friction with a single lightweight dependency (typing-extensions). Maintenance status is aging—last release was 541 days ago, though the repository remains active with a recent commit on 2025-03-11 and 766 stars.
Requires Python 3.10 or later; earlier Python versions are not supported.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects.
Quickstart
pip install expression
from expression import pipe, Some
from expression.collections import Seq, seq
v = Some(1)
result = v.pipe(lambda x: x.map(lambda y: y + 1))
xs = Seq.of(1, 2, 3)
ys = xs.pipe(seq.map(lambda x: x * 2))
Verify before relying
- Whether the library's type inference works reliably with mypy or Pylance in practice for complex pipelines.
- Performance characteristics compared to native Python iteration for large sequences.
- Adoption and community support beyond the 766 GitHub stars.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping-extensions |
| Maintenance | Aging 541 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,652,649 / month, #2,062 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Other EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Libraries :: Python Modules |
Evidence: expression-5.6.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “railway oriented programming”
- ExpressionExpression provides functional programming abstractions for Python,…
- agnoctlagnoctl is a command-line interface for creating and managing AgentOS…
- pytrafikverketAsync Python client for querying Sweden's Trafikverket public API to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also oslash · pyfunctional · wraps · pipe · pampy · sumtypes · lenses · funcy · common-expression-language · firebird-base