{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/5"},{"label":"JSON Schema","url":"https://skillfed.io/packages/category/file-formats-json-json-schema"}],"enrichment":{"capability":"Numpydantic adds type annotations and validation for arrays with shape and dtype constraints in pydantic models, supporting numpy, dask, zarr, hdf5, and video files through a pluggable interface.","skillfed_tags":["array-validation","type-checking","data-science"],"use_cases":["Validate image or video data in pydantic models with exact shape and dtype requirements before processing.","Define reusable array type aliases (e.g., GRAYSCALE) and catch shape mismatches at type-check time with mypy.","Accept arrays from multiple backends (numpy, dask, zarr) in the same model without writing separate validators.","Serialize array-containing models to JSON with metadata sufficient to reconstruct them in their native format.","Lazy-load large arrays from hdf5 or zarr without full validation overhead by leveraging backend metadata."],"what_it_does":"Numpydantic bridges the gap between pydantic's data validation and array libraries by letting you specify arrays with precise shape and dtype constraints in type annotations. It solves the problem that pydantic cannot natively validate numpy arrays or other array types without workarounds\u2014numpydantic provides an NDArray type that works seamlessly in pydantic models while also supporting static type checking via a mypy plugin.\n\nThe package works with multiple array backends (numpy, dask, zarr, hdf5, video files) through a pluggable interface, so the same type annotation can validate arrays from different libraries. You can use NDArray outside pydantic too, for isinstance checks or as a callable validator. Serialization to JSON-compatible formats is built in, and the package generates correct JSON Schema for your models, making them interoperable.","worth_installing":"Yes. Numpydantic is actively maintained, has no known vulnerabilities, and solves a real problem\u2014pydantic's inability to validate arrays with shape and dtype constraints. Low install friction, permissive license, and support for multiple array backends make it a practical choice for data science and scientific computing workflows that use pydantic for validation."},"id":"numpydantic","links":{"html":"https://skillfed.io/packages/numpydantic","md":"https://skillfed.io/packages/numpydantic.md","pypi":"https://pypi.org/project/numpydantic/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-22","license_spdx":null,"license_treatment":"permissive","name":"numpydantic","python_support":"supports_current","summary":"Type and shape validation and serialization for arbitrary array types in pydantic models"},"popularity":{"monthly_downloads":602059,"position":5817,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.10.0"}
