Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 1 KB

README.md

File metadata and controls

56 lines (41 loc) · 1 KB

Grid Data Model's System Loader

A light weight package to load Grid Data Model's systems from remote location.

Installation

pip install gdmloader

Usage

Construct a loader and add a source.

from gdmloader.source import SystemLoader
from from gdmloader.constants import GDM_CASE_SOURCE

loader = SystemLoader()
loader.add_source(GDM_CASE_SOURCE)

Show sources.

loader.show_sources()

Show dataset by sources.

loader.show_dataset_by_source("gdm-cases")

Load dataset.

from gdm import DistributionSystem
loader.load_dataset(
    system_type=DistributionSystem,
    source_name="gdm-cases",
    dataset_name="testcasev1"
)

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

from gdm import DistributionSystem
loader.load_dataset(
    system_type=DistributionSystem,
    source_name="gdm-cases",
    dataset_name="testcasev1",
    version="1_2_0"
)