{"categories":[{"label":"Scientific/Engineering","url":"https://skillfed.io/packages/category/scientific-engineering/9"}],"enrichment":{"capability":"Defines typed xarray DataArray and Dataset objects using Python dataclasses, with fixed dimensions, data types, coordinates, and attributes enforced at the class level.","skillfed_tags":["type-safety","scientific-computing","data-structures"],"use_cases":["Define reusable typed templates for multidimensional scientific data (e.g., images, time series, gridded fields) with fixed dimensions and dtypes.","Create xarray DataArrays or Datasets with static type checking to catch dimension/dtype mismatches at development time.","Build batch processing pipelines where all inputs must conform to a declared schema (e.g., all images must be 2D float arrays with x and y coordinates).","Attach metadata (attributes, coordinate names) to xarray objects declaratively rather than imperatively after creation.","Generate xarray objects with NumPy-like constructors (zeros, ones) while enforcing the declared structure."],"what_it_does":"xarray-dataclass wraps xarray's DataArray and Dataset objects in a dataclass-based interface, letting you declare typed multidimensional data structures with fixed dimensions, coordinates, and attributes at definition time. Instead of building xarray objects imperatively with method calls, you define a dataclass using special type hints (Data, Coord, Attr, Name) that encode the structure, then instantiate it with `.new()` or NumPy-like factory methods (`.zeros()`, `.ones()`). The package validates that your data matches the declared schema and provides static type checking support through Pyright.\n\nIt is primarily useful for scientific and data-analysis workflows where you want to enforce a consistent structure across xarray objects\u2014for example, ensuring all images in a batch have the same dimensions and dtype, or defining reusable templates for multidimensional datasets. The package depends on numpy, xarray, and typing-extensions; it is actively maintained and supports Python 3.9 through 3.13.","worth_installing":"Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and solves a real problem for teams working with xarray who want type safety and schema enforcement. It is well-suited for scientific computing and data-analysis workflows where consistency and static checking add value. No known vulnerabilities."},"id":"xarray-dataclass","links":{"html":"https://skillfed.io/packages/xarray-dataclass","md":"https://skillfed.io/packages/xarray-dataclass.md","pypi":"https://pypi.org/project/xarray-dataclass/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-07-30","license_spdx":null,"license_treatment":"permissive","name":"xarray-dataclass","python_support":"supports_current","summary":"xarray data creation by data classes"},"popularity":{"monthly_downloads":78169,"position":14465,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"3.0.0"}
