Metadata-Version: 2.4
Name: gdmloader
Version: 0.0.4
Project-URL: Documentation, https://github.com/NREL-Distribution-Suites/gdmloader#readme
Project-URL: Issues, https://github.com/NREL-Distribution-Suites/gdmloader/issues
Project-URL: Source, https://github.com/NREL-Distribution-Suites/gdmloader
Author-email: Kapil Duwadi <Kapil.Duwadi@nrel.gov>, Aadil Latif <Aadil.Latif@nrel.gov>
License-Expression: BSD-3-Clause
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.11
Requires-Dist: fsspec~=2025.3.2
Requires-Dist: gcsfs~=2025.3.2
Requires-Dist: grid-data-models
Requires-Dist: requests~=2.32.3
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# Grid Data Model's System Loader

A lightweight package to load [Grid Data Model's](https://github.com/NREL-Distribution-Suites/grid-data-models) systems from a remote location.

## Installation

```bash
pip install gdmloader
```

## Usage

Construct a loader and add a source.

```python
from gdmloader.source import SystemLoader
from from gdmloader.constants import GCS_CASE_SOURCE

loader = SystemLoader()
loader.add_source(GCS_CASE_SOURCE)
```

Show sources.

```python
loader.show_sources()
```

Show the dataset by sources.

```python
loader.show_dataset_by_source(GCS_CASE_SOURCE.name)
```

Load the dataset.

```python
from gdm import DistributionSystem
loader.load_dataset(
    system_type=DistributionSystem,
    source_name=GCS_CASE_SOURCE.name,
    dataset_name="testcasev1"
)
```

If you want to force download a specific version, then you can do this.

```python
from gdm import DistributionSystem
loader.load_dataset(
    system_type=DistributionSystem,
    source_name=GCS_CASE_SOURCE.name,
    dataset_name="testcasev1",
    version="2_0_0"
)
```
