$npx skillfedfor your agent

result

A Rust-like result type for Python

With conditionsPyPI Software DevelopmentReleased Jun 20242.5M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — result-0.17.0-py3-none-any.whl
v0.17.0 · released 2024-06-02 · Python >=3.8 · 1 runtime deps: typing-extensions

Yes, if you prefer explicit error handling and type safety over exceptions. The package is stable, has low install friction, and is widely used (top 5000 PyPI). However, note that the repository is archived and abandoned—while the code is mature and unlikely to need updates, you will not receive maintenance or security patches. Use it for new projects only if your team is comfortable with that trade-off.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with a single lightweight dependency (typing-extensions).
  • Repository is archived and maintenance is abandoned as of 803 days since last release, though the package remains stable and widely used.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2024-06-02 (803 days) · last repo commit 2026-06-25 · 1,680 stars · archived

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,520,319 downloads/mo, #3,024 on PyPI

Verify before relying

pip install result

from result import Ok, Err, Result

def divide(a: int, b: int) -> Result[int, str]:
    if b == 0:
        return Err("Cannot divide by zero")
    return Ok(a // b)

result = divide(10, 2)
if isinstance(result, Ok):
    print(result.ok_value)  # 5
else:
    print(result.err_value)
  • Whether the archived repository status affects long-term security patch availability or community support for edge cases.
  • Performance characteristics when used in high-throughput or latency-sensitive code paths compared to exception-based patterns.
Same gist for agents: .md · .json

What it is and what it does

Result is a type-safe container for representing success or failure outcomes without relying on exceptions. It provides Ok and Err classes that wrap values, letting you encode success or error states directly in function return types. The package is inspired by Rust's Result enum and fully type-annotated, making it compatible with MyPy and other type checkers for compile-time safety.

You use it by returning Ok(value) for success or Err(error) for failure, then checking the result with isinstance, is_ok/is_err functions, or Python 3.10+ match statements. It includes utility methods like map, unwrap, expect, and unwrap_or to transform and extract values. The design encourages explicit error handling at call sites rather than implicit exception propagation, making error paths visible in code.

Use it for

  • Building APIs or functions where error cases are part of the normal control flow and should be handled explicitly rather than caught.
  • Type-checking error handling with MyPy by narrowing result types through isinstance checks to ensure all branches are covered.
  • Replacing tuple-based error returns (like returning (value, error_msg)) with a clearer, type-safe Result[T, E] signature.
  • Chaining operations on results using map and map_err to transform values or errors without nested conditionals.
  • Porting Rust code to Python while preserving the Result pattern for consistency and familiar error semantics.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you prefer explicit error handling and type safety over exceptions.

The package is stable, has low install friction, and is widely used (top 5000 PyPI). However, note that the repository is archived and abandoned—while the code is mature and unlikely to need updates, you will not receive maintenance or security patches. Use it for new projects only if your team is comfortable with that trade-off.

Install

result on PyPI

Before you install

Low install friction with a single lightweight dependency (typing-extensions). Repository is archived and maintenance is abandoned as of 803 days since last release, though the package remains stable and widely used.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install result

from result import Ok, Err, Result

def divide(a: int, b: int) -> Result[int, str]:
    if b == 0:
        return Err("Cannot divide by zero")
    return Ok(a // b)

result = divide(10, 2)
if isinstance(result, Ok):
    print(result.ok_value)  # 5
else:
    print(result.err_value)

Verify before relying

  • Whether the archived repository status affects long-term security patch availability or community support for edge cases.
  • Performance characteristics when used in high-throughput or latency-sensitive code paths compared to exception-based patterns.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
typing-extensions
MaintenanceAbandoned 803 days since the last release
Last repo commit repository archived
First released
Downloads2,520,319 / month, #3,024 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: result-0.17.0-py3-none-any.whl

Tags

Capabilities
rust result type pythonok err error handlingexplicit error return valuesresult enum pythontype-safe error handlingfunctional error handlingok err pattern
Topics
error-handlingtype-safetyrust-inspired
PyPI keywords
rustresultenum

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 › “rust result type python”

  • resultProvides a Rust-inspired Result type for Python that represents…
  • sccachesccache is a compiler caching wrapper that stores compilation results…
  • pyxirrPyXIRR is a Rust-backed library that computes financial functions…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also setuptools-rust · regress · msgfy · python-status · pyre-extensions · better-exceptions · cargo-lambda · numerary · infinity · tree-sitter-rust