--- id: pyre-extensions version: "0.0.32" license: unclear license_treatment: permissive maintenance: dormant --- # pyre-extensions — Type system extensions for use with the pyre type checker License: permissive · Maintenance: dormant · Downloads: 1.7M/mo ## What it is and what it does Pyre Extensions is a companion library to the Pyre type checker that adds three main capabilities to Python's typing system. It defines ParameterSpecification, a special type variable that captures callable parameter specifications (argument names, types, and whether they're required) rather than just types—useful for typing decorators that preserve a function's signature while transforming its return type. It provides none_throws, a utility function that asserts an Optional value is not None and returns it, making assumptions about Optional types explicit in code. It also includes safe_json, a drop-in replacement for the standard json module that validates parsed JSON against a specified type schema (using TypedDict for complex structures) and raises InvalidJson if the data doesn't match. The package is designed as a lightweight companion to Pyre, with minimal dependencies (only typing-inspect and typing-extensions). It has been dormant for 630 days, suggesting the API is stable but no longer under active development. The library is classified as Alpha and intended for developers using Pyre for static type checking who need these specific typing patterns. Use it for: - Type decorators that preserve function signatures while changing return types using ParameterSpecification - Validating JSON API responses against a TypedDict schema before processing - Making Optional type handling explicit by asserting non-None values with none_throws - Parsing configuration files with known structure and enforcing type safety at load time - Catching JSON schema mismatches early in development rather than at runtime ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides typing extensions for the Pyre type checker, including ParameterSpecification for decorator typing, none_throws for explicit Optional handling, and safe_json for type-safe JSON parsing. Yes, if you use Pyre for type checking and need ParameterSpecification or type-safe JSON parsing. The low install friction and permissive license make it a low-risk addition. However, dormant maintenance (630 days since last release) means no active bug fixes or feature development; evaluate whether your use case requires these features and whether safe_json meets your performance and validation needs. ## Install pip install pyre-extensions uv add pyre-extensions poetry add pyre-extensions ## Installing pyre-extensions Before you install: Low install friction with only two runtime dependencies (typing-inspect and typing-extensions). Dormant maintenance status—last release 630 days ago—suggests stability but no active development. License in practice: MIT license (permissive) imposes no restrictions on use, modification, or redistribution in proprietary or open-source projects. Quickstart: pip install pyre-extensions from pyre_extensions import safe_json from typing import List result = safe_json.loads('[1, 2, 3]', List[int]) print(result) # [1, 2, 3] Verify before relying: - Whether ParameterSpecification remains necessary given native ParamSpec support in recent Python versions - Current compatibility with modern Python versions and Pyre's latest releases - Whether safe_json validation performance is suitable for large or streaming JSON ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 1.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pyre type checker extensions, parametric type variables decorators, type-safe json parsing, optional type assertions, typing module extensions, pyre typechecker support, safe json validation, type-checking, pyre-companion, json-validation [View on SkillFed](https://skillfed.io/packages/pyre-extensions) · [View on PyPI](https://pypi.org/project/pyre-extensions/)