Skip to main content

⚡ Strongpy

A simple runtime type checker for Python functions.

Version License Downloads

It validates function arguments and return values using type annotations.


🚀 Features

  • Runtime type checking for function arguments
  • Return type validation
  • Supports modern Python typing:
    • list[T]
    • dict[K, V]
    • tuple
    • set, frozenset
    • Union (|)
    • Literal

📦 Installation

pip install strongpy

or (using uv)

uv add strongpy

🧪 Usage

>>> from strongpy import strong

>>> @strong
... def add(x: int, y: int) -> int:
...     return x + y

>>> add(1, 2)
3

>>> add("1", 2)
Traceback (most recent call last):
  File "example.py", line 10, in <module>
    add("1", 2)
TypeError: argument 'x' expected int, got str

🧠 Supported types

  • int, str, float, bool
  • list[T]
  • dict[K, V]
  • tuple[T, ...]
  • set[T]
  • frozenset[T]
  • Union (int | str)
  • Literal
  • Any
  • Never
  • NoReturn

⚙️ Philosophy

Strong is designed to be:

  • simple
  • explicit
  • predictable

No magic, no runtime inference — only annotations.


🐍 Requirements

  • Python ≥ 3.13

📌 License

MIT

Metadata

Release files for strongpy 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for strongpy 0.1.5
File Size Uploaded Provenance
strongpy-0.1.5.tar.gz 7.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for strongpy 0.1.5
File Interpreter ABI Platform
strongpy-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / strongpy-0.1.5.tar.gz

Download URL strongpy-0.1.5.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3b8a0d3db27bdb966a77f1ac48b5819b322d59ff1718154d6c212f73bc3d1e41
BLAKE2b-256 checksum
How to use checksums
1c64f0a7234af471949e05b3216456fb5c127ca157873dae9b3f326820de5853
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / strongpy-0.1.5-py3-none-any.whl

Download URL strongpy-0.1.5-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8de4d1d69ef2697719d7d1ae812c1060030091d3562b3ac77d20fb85965b9aed
BLAKE2b-256 checksum
How to use checksums
def1fa7ea5b65f49d50f47222886e6984120c84665f492d68fe07ad90ed34756
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for strongpy 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page