Skip to content

Home / icechunk-python / configuration

Configuration

When creating and opening Icechunk repositories, there are many configuration options available to control the behavior of the repository and the storage backend. This page will guide you through the available options and how to use them.

RepositoryConfig

Separate from the storage config, the Repository can also be configured with options which control its runtime behavior.

Note

This section is under construction and coming soon.

Creating and Opening Repos

Now we can now create or open an Icechunk repo using our config.

Creating a new repo

Note

Icechunk repos cannot be created in the same location where another store already exists.

storage = icechunk.s3_storage(
    bucket='earthmover-sample-data',
    prefix='icechunk/oisst.2020-2024/',
    region='us-east-1',
    from_env=True,
)

repo = icechunk.Repository.create(
    storage=storage,
)
storage = icechunk.gcs_storage(
    bucket='earthmover-sample-data',
    prefix='icechunk/oisst.2020-2024/',
    from_env=True,
)

repo = icechunk.Repository.create(
    storage=storage,
)
storage = icechunk.azure_storage(
    container='earthmover-sample-data',
    prefix='icechunk/oisst.2020-2024/',
    from_env=True,
)

repo = icechunk.Repository.create(
    storage=storage,
)
repo = icechunk.Repository.create(
    storage=icechunk.local_filesystem_storage("/path/to/my/dataset"),
)

If you are not sure if the repo exists yet, an icechunk Repository can created or opened if it already exists:

storage = icechunk.s3_storage(
    bucket='earthmover-sample-data',
    prefix='icechunk/oisst.2020-2024/',
    region='us-east-1',
    from_env=True,
)

repo = icechunk.Repository.open_or_create(
    storage=storage,
)
storage = icechunk.gcs_storage(
    bucket='earthmover-sample-data',
    prefix='icechunk/oisst.2020-2024/',
    from_env=True,
)

repo = icechunk.Repository.open_or_create(
    storage=storage,
)
storage = icechunk.azure_storage(
    container='earthmover-sample-data',
    prefix='icechunk/oisst.2020-2024/',
    from_env=True,
)

repo = icechunk.Repository.open_or_create(
    storage=storage,
)
repo = icechunk.Repository.open_or_create(
    storage=icechunk.local_filesystem_storage("/path/to/my/dataset"),
)

Opening an existing repo

storage = icechunk.s3_storage(
    bucket='earthmover-sample-data',
    prefix='icechunk/oisst.2020-2024/',
    region='us-east-1',
    from_env=True,
)

repo = icechunk.Repository.open(
    storage=storage,
)
storage = icechunk.gcs_storage(
    bucket='earthmover-sample-data',
    prefix='icechunk/oisst.2020-2024/',
    from_env=True,
)

repo = icechunk.Repository.open(
    storage=storage,
)
storage = icechunk.azure_storage(
    container='earthmover-sample-data',
    prefix='icechunk/oisst.2020-2024/',
    from_env=True,
)

repo = icechunk.Repository.open(
    storage=storage,
)
storage = icechunk.local_filesystem_storage("/path/to/my/dataset")
store = icechunk.IcechunkStore.open(
    storage=storage,
)