Metadata-Version: 2.4
Name: nv-dfm-lib-common
Version: 3.1.27
Summary: Common utilities for DFM adapter libraries
Author: NVIDIA
Requires-Python: <3.13,>=3.10
Requires-Dist: nv-dfm-core<3.2.0,>=3.1.0
Description-Content-Type: text/markdown

<!--
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# nv-dfm-lib-common

Shared schemas and utilities for DFM adapter libraries.

## Overview

nv-dfm-lib-common provides common building blocks used across DFM adapter libraries such as `nv-dfm-lib-weather`:

| Component | Description |
|-----------|-------------|
| **Output Schemas** | Pydantic models for adapter return types: `GeoJsonFile`, `TextureFile`, `TextureFileList` |
| **XArray Schemas** | Schema definitions and validation for xarray Datasets (`XArraySchema`, coordinate/variable checks) |

## Installation

This package is typically installed as a dependency of other `nv-dfm-lib-*` packages:

```bash
pip install nv-dfm-lib-common
```

Or with `uv` in the monorepo:

```bash
uv sync --package nv-dfm-lib-common
```

## Usage

```python
from nv_dfm_lib_common.schemas import GeoJsonFile, TextureFile, TextureFileList
from nv_dfm_lib_common.schemas.xarray import XArraySchema, check_dims, check_dtype
```

## Documentation

- [DFM Documentation](https://nvidia.github.io/data-federation-mesh/index.html)
- [Tutorials](../../tutorials/README.md)

## License

Apache License 2.0. See the [LICENSE](../../LICENSE) file for details.
