$npx skillfedfor your agent

numerary

Python hacks for type-checking numbers

Worth itPyPI Python ModulesReleased Aug 202380.3K downloads / moMIT LicensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — numerary-0.4.4-py3-none-any.whl
v0.4.4 · released 2023-08-03 · Python >=3.8 · 1 runtime deps: beartype

Yes. If you write numeric code or libraries that need to accept diverse numeric types while maintaining type safety, numerary solves a real gap in Python's type system. It has low install friction, active maintenance, no known vulnerabilities, and a permissive license. The trade-off is that it's still marked Beta and requires deliberate use of its protocols—it won't magically fix existing code, but it will let you write new numeric interfaces correctly.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later; best used with a type checker like mypy to catch incompatibilities at development time.
  • Low friction: pure-Python wheel with a single runtime dependency on beartype.
  • Actively maintained with a recent commit on 2026-02-27 and no known vulnerabilities.

License · maintenance · safety

MIT License (permissive) — MIT License permits commercial and private use with minimal restrictions, requiring only license and copyright notice retention.

last release 2023-08-03 (1107 days) · last repo commit 2026-02-27 · 49 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 80,333 downloads/mo, #14,298 on PyPI

Verify before relying

pip install numerary

from numerary import RealLike, IntegralLike

def process(arg: RealLike) -> IntegralLike:
    return int(arg // 1)
  • Whether protocol implementations remain compatible with latest versions of third-party numeric libraries.
  • Performance characteristics when composing multiple protocols or checking isinstance at runtime.
Same gist for agents: .md · .json

What it is and what it does

numerary solves the problem of type-checking numeric interfaces that need to work with more than just int and float. Python's numeric tower and standard library types like Decimal and Fraction lack proper integration with the type system, leaving developers unable to write functions that accept arbitrary numeric types without breaking type-checking or resorting to overly broad annotations. numerary provides composable, runtime-checkable Protocol definitions—such as RealLike, IntegralLike, SupportsIntegralOps, and SupportsAbs—that let you declare numeric requirements precisely and have them work correctly with both type checkers and runtime isinstance checks.

The package is built on the Supports pattern from the standard library's typing module, extended with a caching protocol metaclass to handle edge cases where standard library types have inconsistent operator definitions. It targets developers writing numeric libraries, scientific code, or domain-specific interfaces that need to accept diverse numeric types while maintaining type safety. The single runtime dependency is beartype, and the package supports Python 3.8 through 3.11 on both CPython and PyPy.

Use it for

  • Define a function that accepts any real number type and type-check it correctly without forcing callers to convert.
  • Build a numeric library that works with standard library numbers and third-party types, catching operator incompatibilities.
  • Compose custom protocols by mixing SupportsAbs, SupportsDivmod, and other operator protocols to express precise requirements.
  • Validate at runtime that an object truly supports the numeric operations your code needs, catching silent failures.
  • Document numeric interfaces for scientific or financial code where type distinctions matter for correctness.

Worth the install?

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

Worth it

Yes.

If you write numeric code or libraries that need to accept diverse numeric types while maintaining type safety, numerary solves a real gap in Python's type system. It has low install friction, active maintenance, no known vulnerabilities, and a permissive license. The trade-off is that it's still marked Beta and requires deliberate use of its protocols—it won't magically fix existing code, but it will let you write new numeric interfaces correctly.

Install

numerary on PyPI

Before you install

Low friction: pure-Python wheel with a single runtime dependency on beartype. Actively maintained with a recent commit on 2026-02-27 and no known vulnerabilities.

Requires Python 3.8 or later; best used with a type checker like mypy to catch incompatibilities at development time.

License in practice

MIT License permits commercial and private use with minimal restrictions, requiring only license and copyright notice retention.

Quickstart

pip install numerary

from numerary import RealLike, IntegralLike

def process(arg: RealLike) -> IntegralLike:
    return int(arg // 1)

Verify before relying

  • Whether protocol implementations remain compatible with latest versions of third-party numeric libraries.
  • Performance characteristics when composing multiple protocols or checking isinstance at runtime.

Package facts

LicenseMIT License permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
beartype
MaintenanceActively maintained 1,107 days since the last release
Last repo commit
First released
Downloads80,333 / month, #14,298 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: EducationTopic :: Scientific/Engineering :: MathematicsTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: numerary-0.4.4-py3-none-any.whl

Tags

Capabilities
numeric type protocolstype checking numbersnumeric tower typingprotocol-based numeric typesruntime checkable number typesnumeric interface typingcustom numeric type hints
Topics
numeric-typingprotocol-basedtype-safety

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 › “numeric type protocols”

  • numeraryProvides runtime-checkable protocols and type hints for working with…
  • optypeoptype provides single-method protocols and typed operators for…
  • fastnumbersConverts strings and other inputs to numbers (int, float, or real)…

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

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

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.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

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.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

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.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

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…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also typing-json · jaxtyping · sumtypes · omnibase_spi · nptyping · optype · typish · useful-types · infinity · number-parser