icechunk.storage#
Storage backends and configuration for S3, GCS, Azure, local filesystem, and more.
icechunk.storage #
Classes:
| Name | Description |
|---|---|
ChecksumAlgorithm | Checksum algorithm to use on S3 write requests. |
ChunkType | Enum for Zarr chunk types |
S3Options | Options for accessing an S3-compatible storage backend |
Storage | Storage configuration for an IcechunkStore |
StorageConcurrencySettings | Configuration for how Icechunk uses its Storage instance |
StorageRetriesSettings | Configuration for how Icechunk retries requests. |
StorageSettings | Configuration for how Icechunk uses its Storage instance |
StorageTimeoutSettings | Configuration for AWS SDK timeout settings. |
Functions:
| Name | Description |
|---|---|
azure_storage | Create a Storage instance that saves data in Azure Blob Storage object store. |
azure_store | Build an ObjectStoreConfig instance for Azure stores. |
gcs_storage | Create a Storage instance that saves data in Google Cloud Storage object store. |
gcs_store | Build an ObjectStoreConfig instance for Google Cloud Storage object stores. |
hf_storage | Create a Storage instance that saves data in a Hugging Face Storage Bucket. |
http_storage | Create a read-only Storage instance that reads data from an HTTP(s) server. |
http_store | Build an ObjectStoreConfig instance for HTTP object stores. |
in_memory_storage | Create a Storage instance that saves data in memory. |
local_filesystem_storage | Create a Storage instance that saves data in the local file system. |
local_filesystem_store | Build an ObjectStoreConfig instance for local file stores. |
r2_storage | Create a Storage instance that saves data in R2 object store. |
redirect_storage | Create a read-only Storage instance that follows HTTP redirects to resolve the underlying storage backend. |
s3_storage | Create a Storage instance that saves data in S3 or S3 compatible object stores. |
s3_store | Build an ObjectStoreConfig instance for S3 or S3 compatible object stores. |
tigris_storage | Create a Storage instance that saves data in Tigris object store. |
ChecksumAlgorithm #
Bases: Enum
Checksum algorithm to use on S3 write requests.
When :attr:S3Options.checksum_algorithm is unset, the AWS SDK picks its own default for the x-amz-checksum-* header on PutObject, UploadPart, and DeleteObjects. Some S3-compatible services only accept a subset of algorithms; set this option to override the SDK's choice.
Attributes:
| Name | Type | Description |
|---|---|---|
Crc32 | int | |
Crc32c | int | |
Crc64Nvme | int | |
Sha1 | int | |
Sha256 | int | |
Source code in python/icechunk/_icechunk_python.pyi
ChunkType #
Bases: Enum
Enum for Zarr chunk types
Attributes:
| Name | Type | Description |
|---|---|---|
Uninitialized | int | Chunk doesn't have a materialized type yet |
Native | int | Regular Zarr chunks |
Virtual | int | Chunk conforming to the VirtualiZarr spec |
Inline | int | Chunk is store inline in the manifest |
Source code in python/icechunk/_icechunk_python.pyi
S3Options #
Options for accessing an S3-compatible storage backend
Methods:
| Name | Description |
|---|---|
__new__ | Create a new |
Attributes:
| Name | Type | Description |
|---|---|---|
allow_http | bool | Whether HTTP requests are allowed for the storage backend. |
anonymous | bool | Whether to use anonymous credentials (unsigned requests). |
endpoint_url | str | None | Optional endpoint URL for the storage backend. |
force_path_style | bool | Whether to force path-style bucket addressing. |
network_stream_timeout_seconds | int | None | Timeout in seconds for idle network streams. |
region | str | None | Optional region to use for the storage backend. |
Source code in python/icechunk/_icechunk_python.pyi
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
allow_http property writable #
Whether HTTP requests are allowed for the storage backend.
Default: False
Returns:
| Type | Description |
|---|---|
bool |
|
anonymous property writable #
Whether to use anonymous credentials (unsigned requests).
Default: False
Returns:
| Type | Description |
|---|---|
bool |
|
endpoint_url property writable #
Optional endpoint URL for the storage backend.
Default: None
Returns:
| Type | Description |
|---|---|
str | None | The endpoint URL configured for the storage backend. |
force_path_style property writable #
Whether to force path-style bucket addressing.
Default: False
Returns:
| Type | Description |
|---|---|
bool |
|
network_stream_timeout_seconds property writable #
Timeout in seconds for idle network streams.
Default: None (AWS SDK default)
Returns:
| Type | Description |
|---|---|
int | None | The timeout duration; |
region property writable #
Optional region to use for the storage backend.
Default: None
Returns:
| Type | Description |
|---|---|
str | None | The region configured for the storage backend. |
__new__ #
__new__(
region=None,
endpoint_url=None,
allow_http=False,
anonymous=False,
force_path_style=False,
network_stream_timeout_seconds=None,
requester_pays=False,
checksum_algorithm=None,
)
Create a new S3Options object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
region | str | None | Optional, the region to use for the storage backend. Default: None | None |
endpoint_url | str | None | Optional, the endpoint URL to use for the storage backend. Default: None | None |
allow_http | bool | Whether to allow HTTP requests to the storage backend. Default: False | False |
anonymous | bool | Whether to use anonymous credentials to the storage backend. When | False |
force_path_style | bool | Whether to force use of path-style addressing for buckets. Default: False | False |
network_stream_timeout_seconds | int | None | Timeout requests if no bytes can be transmitted during this period of time. If set to 0, timeout is disabled. When None, the AWS SDK default applies. Default: None | None |
requester_pays | bool | Enable requester pays for S3 buckets. Default: False | False |
checksum_algorithm | ChecksumAlgorithm | None | Override the checksum algorithm used for write requests. When None, the AWS SDK picks its own default. Set explicitly when targeting an S3-compatible service that rejects the SDK's default. Default: None | None |
Source code in python/icechunk/_icechunk_python.pyi
Storage #
Storage configuration for an IcechunkStore
Currently supports memory, filesystem S3, azure blob, and google cloud storage backends. Use the following methods to create a Storage object with the desired backend.
Ex:
storage = icechunk.in_memory_storage()
storage = icechunk.local_filesystem_storage("/path/to/root")
storage = icechunk.s3_storage("bucket", "prefix", ...)
storage = icechunk.gcs_storage("bucket", "prefix", ...)
storage = icechunk.azure_storage("container", "prefix", ...)
Methods:
| Name | Description |
|---|---|
list_objects | List objects in the storage backend, optionally filtered by a key prefix. |
list_objects_metadata | List objects with full metadata, optionally filtered by a key prefix. |
Source code in python/icechunk/_icechunk_python.pyi
3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 | |
list_objects #
List objects in the storage backend, optionally filtered by a key prefix.
Deprecated: use list_objects_metadata instead, which also returns the created_at timestamp.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings | StorageSettings | None | Optional storage settings to override the defaults (retries, concurrency, etc.). | None |
prefix | str | None | If provided, only objects whose keys start with this prefix are returned. When | None |
Returns:
| Type | Description |
|---|---|
list[tuple[str, int]] | A list of |
Source code in python/icechunk/_icechunk_python.pyi
list_objects_metadata #
List objects with full metadata, optionally filtered by a key prefix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings | StorageSettings | None | Optional storage settings to override the defaults. | None |
prefix | str | None | If provided, only objects whose keys start with this prefix are returned. | None |
Returns:
| Type | Description |
|---|---|
list[StorageObjectInfo] | A list of :class: |
Source code in python/icechunk/_icechunk_python.pyi
StorageConcurrencySettings #
Configuration for how Icechunk uses its Storage instance
Methods:
| Name | Description |
|---|---|
__new__ | Create a new |
Attributes:
| Name | Type | Description |
|---|---|---|
ideal_concurrent_request_size | int | None | The ideal concurrent request size in bytes. |
max_concurrent_requests_for_object | int | None | The maximum number of concurrent requests for an object. |
Source code in python/icechunk/_icechunk_python.pyi
1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 | |
ideal_concurrent_request_size property writable #
The ideal concurrent request size in bytes.
Default: 12,582,912 (12 MB)
Returns:
| Type | Description |
|---|---|
int | None | The ideal concurrent request size in bytes. |
max_concurrent_requests_for_object property writable #
The maximum number of concurrent requests for an object.
Default: 18
Returns:
| Type | Description |
|---|---|
int | None | The maximum number of concurrent requests for an object. |
__new__ #
Create a new StorageConcurrencySettings object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_concurrent_requests_for_object | int | None | The maximum number of concurrent requests for an object. Default: 18 | None |
ideal_concurrent_request_size | int | None | The ideal concurrent request size in bytes. Default: 12,582,912 (12 MB) | None |
Source code in python/icechunk/_icechunk_python.pyi
StorageRetriesSettings #
Configuration for how Icechunk retries requests.
Icechunk retries failed requests with an exponential backoff algorithm.
Methods:
| Name | Description |
|---|---|
__new__ | Create a new |
Attributes:
| Name | Type | Description |
|---|---|---|
initial_backoff_ms | int | None | The initial backoff duration in milliseconds. |
max_backoff_ms | int | None | The maximum backoff duration in milliseconds. |
max_tries | int | None | The maximum number of tries, including the initial one. |
Source code in python/icechunk/_icechunk_python.pyi
1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 | |
initial_backoff_ms property writable #
The initial backoff duration in milliseconds.
Default: 100
Returns:
| Type | Description |
|---|---|
int | None | The initial backoff duration in milliseconds. |
max_backoff_ms property writable #
The maximum backoff duration in milliseconds.
Default: 180,000 (3 minutes)
Returns:
| Type | Description |
|---|---|
int | None | The maximum backoff duration in milliseconds. |
max_tries property writable #
The maximum number of tries, including the initial one.
Default: 10
Returns:
| Type | Description |
|---|---|
int | None | The maximum number of tries. |
__new__ #
Create a new StorageRetriesSettings object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_tries | int | None | The maximum number of tries, including the initial one. Set to 1 to disable retries. Default: 10 | None |
initial_backoff_ms | int | None | The initial backoff duration in milliseconds. Default: 100 | None |
max_backoff_ms | int | None | The limit to backoff duration in milliseconds. Default: 180,000 (3 minutes) | None |
Source code in python/icechunk/_icechunk_python.pyi
StorageSettings #
Configuration for how Icechunk uses its Storage instance
Methods:
| Name | Description |
|---|---|
__new__ | Create a new |
Attributes:
| Name | Type | Description |
|---|---|---|
chunks_storage_class | str | None | Chunk objects in object store will use this storage class or self.storage_class if None. |
concurrency | StorageConcurrencySettings | None | The configuration for how much concurrency Icechunk store uses. |
metadata_storage_class | str | None | Metadata objects in object store will use this storage class or self.storage_class if None. |
minimum_size_for_multipart_upload | int | None | Use object store's multipart upload for objects larger than this size in bytes. |
retries | StorageRetriesSettings | None | The configuration for how Icechunk retries failed requests. |
storage_class | str | None | All objects in object store will use this storage class or the default if None. |
timeouts | StorageTimeoutSettings | None | The configuration for AWS SDK timeout settings. |
unsafe_use_conditional_create | bool | None | True if Icechunk will use conditional PUT operations for creation in the object store. |
unsafe_use_conditional_update | bool | None | True if Icechunk will use conditional PUT operations for updates in the object store. |
unsafe_use_metadata | bool | None | True if Icechunk will write object metadata in the object store. |
Source code in python/icechunk/_icechunk_python.pyi
1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 | |
chunks_storage_class property writable #
Chunk objects in object store will use this storage class or self.storage_class if None.
Default: None (falls back to storage_class)
concurrency property writable #
The configuration for how much concurrency Icechunk store uses.
Default: None (uses the default StorageConcurrencySettings)
Returns:
| Type | Description |
|---|---|
StorageConcurrencySettings | None | The configuration for how Icechunk uses its Storage instance. |
metadata_storage_class property writable #
Metadata objects in object store will use this storage class or self.storage_class if None.
Default: None (falls back to storage_class)
minimum_size_for_multipart_upload property writable #
Use object store's multipart upload for objects larger than this size in bytes.
Default: 104,857,600 (100 MB)
retries property writable #
The configuration for how Icechunk retries failed requests.
Default: None (uses the default StorageRetriesSettings)
Returns:
| Type | Description |
|---|---|
StorageRetriesSettings | None | The configuration for how Icechunk retries failed requests. |
storage_class property writable #
All objects in object store will use this storage class or the default if None.
Default: None
timeouts property writable #
The configuration for AWS SDK timeout settings.
Default: None (all timeouts use the AWS SDK defaults)
Returns:
| Type | Description |
|---|---|
StorageTimeoutSettings | None | The timeout configuration. |
unsafe_use_conditional_create property writable #
True if Icechunk will use conditional PUT operations for creation in the object store.
Default: True
unsafe_use_conditional_update property writable #
True if Icechunk will use conditional PUT operations for updates in the object store.
Default: True
unsafe_use_metadata property writable #
True if Icechunk will write object metadata in the object store.
Default: True
__new__ #
__new__(
concurrency=None,
retries=None,
unsafe_use_conditional_create=None,
unsafe_use_conditional_update=None,
unsafe_use_metadata=None,
storage_class=None,
metadata_storage_class=None,
chunks_storage_class=None,
minimum_size_for_multipart_upload=None,
timeouts=None,
)
Create a new StorageSettings object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
concurrency | StorageConcurrencySettings | None | The configuration for how Icechunk uses its Storage instance. When None, the default | None |
retries | StorageRetriesSettings | None | The configuration for how Icechunk retries failed requests. When None, the default | None |
unsafe_use_conditional_update | bool | None | If set to False, Icechunk loses some of its consistency guarantees. This is only useful in object stores that don't support the feature. Use it at your own risk. Default: True | None |
unsafe_use_conditional_create | bool | None | If set to False, Icechunk loses some of its consistency guarantees. This is only useful in object stores that don't support the feature. Use at your own risk. Default: True | None |
unsafe_use_metadata | bool | None | Don't write metadata fields in Icechunk files. This is only useful in object stores that don't support the feature. Use at your own risk. Default: True | None |
storage_class | str | None | Store all objects using this object store storage class. If None the object store default will be used. The value is passed to the provider as is, so use its own names: for example STANDARD_IA on S3, NEARLINE on GCS, Cool on Azure. Ignored by the local filesystem backend, which has no storage classes. Example: STANDARD_IA Default: None | None |
metadata_storage_class | str | None | Store metadata objects using this object store storage class. Default: None (falls back to | None |
chunks_storage_class | str | None | Store chunk objects using this object store storage class. Default: None (falls back to | None |
minimum_size_for_multipart_upload | int | None | Use object store's multipart upload for objects larger than this size in bytes. Default: 104,857,600 (100 MB) | None |
timeouts | StorageTimeoutSettings | None | The configuration for AWS SDK timeout settings. When None, all timeouts use the AWS SDK defaults. Default: None | None |
Source code in python/icechunk/_icechunk_python.pyi
1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 | |
StorageTimeoutSettings #
Configuration for AWS SDK timeout settings.
Controls connect, read, and operation timeouts for the underlying S3 client.
Methods:
| Name | Description |
|---|---|
__new__ | Create a new |
Attributes:
| Name | Type | Description |
|---|---|---|
connect_timeout_ms | int | None | The timeout for establishing a connection in milliseconds. |
operation_attempt_timeout_ms | int | None | The timeout for a single attempt of an operation in milliseconds. |
operation_timeout_ms | int | None | The timeout for the entire operation (including retries) in milliseconds. |
read_timeout_ms | int | None | The timeout for reading a response in milliseconds. |
Source code in python/icechunk/_icechunk_python.pyi
1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 | |
connect_timeout_ms property writable #
The timeout for establishing a connection in milliseconds.
Default: None (AWS SDK default)
Returns:
| Type | Description |
|---|---|
int | None | The connect timeout in milliseconds. |
operation_attempt_timeout_ms property writable #
The timeout for a single attempt of an operation in milliseconds.
Default: None (AWS SDK default)
Returns:
| Type | Description |
|---|---|
int | None | The per-attempt operation timeout in milliseconds. |
operation_timeout_ms property writable #
The timeout for the entire operation (including retries) in milliseconds.
Default: None (AWS SDK default)
Returns:
| Type | Description |
|---|---|
int | None | The operation timeout in milliseconds. |
read_timeout_ms property writable #
The timeout for reading a response in milliseconds.
Default: None (AWS SDK default)
Returns:
| Type | Description |
|---|---|
int | None | The read timeout in milliseconds. |
__new__ #
__new__(
connect_timeout_ms=None,
read_timeout_ms=None,
operation_timeout_ms=None,
operation_attempt_timeout_ms=None,
)
Create a new StorageTimeoutSettings object
All timeouts default to None, meaning the underlying AWS SDK default <https://docs.aws.amazon.com/sdk-for-rust/latest/dg/timeouts.html>_ is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connect_timeout_ms | int | None | The timeout for establishing a connection in milliseconds. Default: None (AWS SDK default) | None |
read_timeout_ms | int | None | The timeout for reading a response in milliseconds. Default: None (AWS SDK default) | None |
operation_timeout_ms | int | None | The timeout for the entire operation (including retries) in milliseconds. Default: None (AWS SDK default) | None |
operation_attempt_timeout_ms | int | None | The timeout for a single attempt of an operation in milliseconds. Default: None (AWS SDK default) | None |
Source code in python/icechunk/_icechunk_python.pyi
azure_storage #
azure_storage(
*,
account,
container,
prefix,
access_key=None,
sas_token=None,
bearer_token=None,
from_env=None,
anonymous=None,
config=None,
)
Create a Storage instance that saves data in Azure Blob Storage object store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account | str | The account to which the caller must have access privileges | required |
container | str | The container where the repository will store its data | required |
prefix | str | The prefix within the container that is the root directory of the repository. An empty prefix points at the container root. Creating a repository at the container root is not supported in modern Icechunk versions; existing container-root repositories can still be opened and updated. | required |
access_key | str | None | Azure Blob Storage credential access key | None |
sas_token | str | None | Azure Blob Storage credential SAS token | None |
bearer_token | str | None | Azure Blob Storage credential bearer token | None |
from_env | bool | None | Fetch credentials from the operative system environment | None |
anonymous | bool | None | Access a public container anonymously, without credentials | None |
config | dict[str, str] | None | A dictionary of options for the Azure Blob Storage object store. See https://docs.rs/object_store/latest/object_store/azure/enum.AzureConfigKey.html#variants for a list of possible configuration keys. | None |
Source code in python/icechunk/storage.py
azure_store #
Build an ObjectStoreConfig instance for Azure stores.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account | str | The account to which the caller must have access privileges | required |
config | dict[str, str] | None | A dictionary of options for the Azure Blob Storage object store. See https://docs.rs/object_store/latest/object_store/azure/enum.AzureConfigKey.html#variants for a list of possible configuration keys. | None |
Source code in python/icechunk/storage.py
gcs_storage #
gcs_storage(
*,
bucket,
prefix,
service_account_file=None,
service_account_key=None,
application_credentials=None,
bearer_token=None,
anonymous=None,
from_env=None,
config=None,
get_credentials=None,
scatter_initial_credentials=False,
read_headers=None,
write_headers=None,
headers=None,
)
Create a Storage instance that saves data in Google Cloud Storage object store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bucket | str | The bucket where the repository will store its data | required |
prefix | str | None | The prefix within the bucket that is the root directory of the repository. An empty or | required |
service_account_file | str | None | The path to the service account file | None |
service_account_key | str | None | The service account key | None |
application_credentials | str | None | The path to the application credentials file | None |
bearer_token | str | None | The bearer token to use for the object store | None |
anonymous | bool | None | If set to True requests to the object store will not be signed | None |
from_env | bool | None | Fetch credentials from the operative system environment | None |
config | dict[str, str] | None | A dictionary of options for the Google Cloud Storage object store. See https://docs.rs/object_store/latest/object_store/gcp/enum.GoogleConfigKey.html#variants for a list of possible configuration keys. | None |
get_credentials | Callable[[], GcsBearerCredential] | None | Use this function to get and refresh object store credentials | None |
scatter_initial_credentials | bool | Immediately call and store the value returned by get_credentials. This is useful if the repo or session will be pickled to generate many copies. Passing scatter_initial_credentials=True will ensure all those copies don't need to call get_credentials immediately. After the initial set of credentials has expired, the cached value is no longer used. Notice that credentials obtained are stored, and they can be sent over the network if you pickle the session/repo. | False |
read_headers | dict[str, str] | None | Extra HTTP headers to attach to every read request to the object store. | None |
write_headers | dict[str, str] | None | Extra HTTP headers to attach to every write request to the object store, for example | None |
headers | dict[str, str] | None | Extra HTTP headers to attach to both read and write requests. They are merged with | None |
Source code in python/icechunk/storage.py
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 | |
gcs_store #
Build an ObjectStoreConfig instance for Google Cloud Storage object stores.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
opts | dict[str, str] | None | A dictionary of options for the Google Cloud Storage object store. See https://docs.rs/object_store/latest/object_store/gcp/enum.GoogleConfigKey.html#variants for a list of possible configuration keys. | None |
Source code in python/icechunk/storage.py
hf_storage #
hf_storage(
*,
bucket,
prefix,
namespace,
access_key_id=None,
secret_access_key=None,
session_token=None,
expires_after=None,
from_env=None,
get_credentials=None,
scatter_initial_credentials=False,
network_stream_timeout_seconds=60,
legacy_rooted_keys=None,
read_headers=None,
write_headers=None,
headers=None,
)
Create a Storage instance that saves data in a Hugging Face Storage Bucket.
Data goes through Hugging Face's S3-compatible gateway. The credentials are the S3 access key and secret generated from a Hugging Face access token. The token itself is not an S3 credential. See https://huggingface.co/docs/hub/storage-buckets-s3 for how to generate them.
The gateway discards user metadata. Icechunk stores a write id there to tell a lost success response apart from a real conflict. On Hugging Face that recovery is unavailable. The network can lose a conditional write's response on its way back to the client. That is rare. The retry then reports a conflict that never happened. Retry the commit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bucket | str | The bucket name, without the namespace | required |
prefix | str | None | The prefix within the bucket that is the root directory of the repository. An empty or | required |
namespace | str | The bucket owner: a Hugging Face username or organization name | required |
access_key_id | str | None | S3 credential access key. It starts with | None |
secret_access_key | str | None | S3 credential secret access key | None |
session_token | str | None | Optional S3 credential session token | None |
expires_after | datetime | None | Optional expiration for the object store credentials | None |
from_env | bool | None | Fetch credentials from the operative system environment | None |
get_credentials | Callable[[], S3StaticCredentials] | None | Use this function to get and refresh object store credentials | None |
scatter_initial_credentials | bool | Immediately call and store the value returned by get_credentials. This is useful if the repo or session will be pickled to generate many copies. Passing scatter_initial_credentials=True will ensure all those copies don't need to call get_credentials immediately. After the initial set of credentials has expired, the cached value is no longer used. Notice that credentials obtained are stored, and they can be sent over the network if you pickle the session/repo. | False |
network_stream_timeout_seconds | int | Timeout requests if no bytes can be transmitted during this period of time. If set to 0, timeout is disabled. Default: 60. | 60 |
legacy_rooted_keys | bool | None | The object key layout. | None |
read_headers | dict[str, str] | None | Extra HTTP headers to attach to every read request to the object store. | None |
write_headers | dict[str, str] | None | Extra HTTP headers to attach to every write request to the object store. | None |
headers | dict[str, str] | None | Extra HTTP headers to attach to both read and write requests. They are merged with | None |
Source code in python/icechunk/storage.py
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 | |
http_storage #
Create a read-only Storage instance that reads data from an HTTP(s) server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_url | str | The URL path to the root of the repository | required |
opts | dict[str, str] | None | A dictionary of transport options for the HTTP object store. See https://docs.rs/object_store/latest/object_store/client/enum.ClientConfigKey.html#variants for a list of possible keys in snake case format. | None |
headers | dict[str, str] | None | Static HTTP headers injected into every request made by the underlying HTTP client. Useful for authentication, e.g. | None |
Source code in python/icechunk/storage.py
http_store #
Build an ObjectStoreConfig instance for HTTP object stores.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
opts | dict[str, str] | None | A dictionary of transport options for the HTTP object store. See https://docs.rs/object_store/latest/object_store/client/enum.ClientConfigKey.html#variants for a list of possible keys in snake case format. | None |
headers | dict[str, str] | None | Static HTTP headers injected into every request made by the underlying HTTP client. Useful for authentication, e.g. | None |
Source code in python/icechunk/storage.py
in_memory_storage #
Create a Storage instance that saves data in memory.
This Storage implementation is used for tests. Data will be lost after the process finishes, and can only be accesses through the Storage instance returned. Different instances don't share data.
Source code in python/icechunk/storage.py
local_filesystem_storage #
Create a Storage instance that saves data in the local file system.
This Storage instance is not recommended for production data
local_filesystem_store #
Build an ObjectStoreConfig instance for local file stores.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | The root directory for the store. | required |
Source code in python/icechunk/storage.py
r2_storage #
r2_storage(
*,
bucket=None,
prefix=None,
account_id=None,
endpoint_url=None,
region=None,
allow_http=False,
access_key_id=None,
secret_access_key=None,
session_token=None,
expires_after=None,
anonymous=None,
from_env=None,
get_credentials=None,
scatter_initial_credentials=False,
network_stream_timeout_seconds=60,
checksum_algorithm=None,
legacy_rooted_keys=None,
read_headers=None,
write_headers=None,
headers=None,
)
Create a Storage instance that saves data in R2 object store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bucket | str | None | The bucket name | None |
prefix | str | None | The prefix within the bucket that is the root directory of the repository. An empty or | None |
account_id | str | None | Cloudflare account ID. When provided, a default endpoint URL is constructed as | None |
endpoint_url | str | None | Endpoint where the object store serves data, example: | None |
region | str | None | The region to use in the object store, if | None |
allow_http | bool | If the object store can be accessed using http protocol instead of https | False |
access_key_id | str | None | S3 credential access key | None |
secret_access_key | str | None | S3 credential secret access key | None |
session_token | str | None | Optional S3 credential session token | None |
expires_after | datetime | None | Optional expiration for the object store credentials | None |
anonymous | bool | None | If set to True requests to the object store will not be signed | None |
from_env | bool | None | Fetch credentials from the operative system environment | None |
get_credentials | Callable[[], S3StaticCredentials] | None | Use this function to get and refresh object store credentials | None |
scatter_initial_credentials | bool | Immediately call and store the value returned by get_credentials. This is useful if the repo or session will be pickled to generate many copies. Passing scatter_initial_credentials=True will ensure all those copies don't need to call get_credentials immediately. After the initial set of credentials has expired, the cached value is no longer used. Notice that credentials obtained are stored, and they can be sent over the network if you pickle the session/repo. | False |
network_stream_timeout_seconds | int | Timeout requests if no bytes can be transmitted during this period of time. If set to 0, timeout is disabled. Default: 60. | 60 |
legacy_rooted_keys | bool | None | The object key layout. | None |
read_headers | dict[str, str] | None | Extra HTTP headers to attach to every read request to the object store. | None |
write_headers | dict[str, str] | None | Extra HTTP headers to attach to every write request to the object store, for example | None |
headers | dict[str, str] | None | Extra HTTP headers to attach to both read and write requests. They are merged with | None |
Source code in python/icechunk/storage.py
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 | |
redirect_storage #
Create a read-only Storage instance that follows HTTP redirects to resolve the underlying storage backend.
The given URL is expected to return an HTTP redirect (3xx) with a Location header pointing to a supported storage scheme (s3://, gs://, r2://, tigris://, http+icechunk://, etc.). Icechunk will follow redirects until it reaches a recognized scheme and then use that as the actual storage backend.
This is useful when a service controls which bucket or path a repository lives in, so clients don't need to know the final storage location ahead of time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_url | str | The URL that will be followed to discover the actual storage location. | required |
Source code in python/icechunk/storage.py
s3_storage #
s3_storage(
*,
bucket,
prefix,
region=None,
endpoint_url=None,
allow_http=False,
access_key_id=None,
secret_access_key=None,
session_token=None,
expires_after=None,
anonymous=None,
from_env=None,
get_credentials=None,
scatter_initial_credentials=False,
force_path_style=False,
network_stream_timeout_seconds=60,
requester_pays=False,
checksum_algorithm=None,
legacy_rooted_keys=None,
read_headers=None,
write_headers=None,
headers=None,
)
Create a Storage instance that saves data in S3 or S3 compatible object stores.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bucket | str | The bucket where the repository will store its data | required |
prefix | str | None | The prefix within the bucket that is the root directory of the repository. An empty or | required |
region | str | None | The region to use in the object store, if | None |
endpoint_url | str | None | Optional endpoint where the object store serves data, example: http://localhost:4200 | None |
allow_http | bool | If the object store can be accessed using http protocol instead of https | False |
access_key_id | str | None | S3 credential access key | None |
secret_access_key | str | None | S3 credential secret access key | None |
session_token | str | None | Optional S3 credential session token | None |
expires_after | datetime | None | Optional expiration for the object store credentials | None |
anonymous | bool | None | If set to True requests to the object store will not be signed | None |
from_env | bool | None | Fetch credentials from the operative system environment | None |
get_credentials | Callable[[], S3StaticCredentials] | None | Use this function to get and refresh object store credentials | None |
scatter_initial_credentials | bool | Immediately call and store the value returned by get_credentials. This is useful if the repo or session will be pickled to generate many copies. Passing scatter_initial_credentials=True will ensure all those copies don't need to call get_credentials immediately. After the initial set of credentials has expired, the cached value is no longer used. Notice that credentials obtained are stored, and they can be sent over the network if you pickle the session/repo. | False |
force_path_style | bool | Whether to force using path-style addressing for buckets | False |
network_stream_timeout_seconds | int | Timeout requests if no bytes can be transmitted during this period of time. If set to 0, timeout is disabled. Default: 60. | 60 |
requester_pays | bool | Enable requester pays for S3 buckets | False |
checksum_algorithm | ChecksumAlgorithm | None | Override the checksum algorithm used for write requests (PutObject, UploadPart, DeleteObjects). When | None |
legacy_rooted_keys | bool | None | The object key layout. | None |
read_headers | dict[str, str] | None | Extra HTTP headers to attach to every read request to the object store. | None |
write_headers | dict[str, str] | None | Extra HTTP headers to attach to every write request to the object store, for example | None |
headers | dict[str, str] | None | Extra HTTP headers to attach to both read and write requests. They are merged with | None |
Source code in python/icechunk/storage.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
s3_store #
s3_store(
region=None,
endpoint_url=None,
allow_http=False,
anonymous=False,
s3_compatible=False,
force_path_style=False,
network_stream_timeout_seconds=60,
requester_pays=False,
checksum_algorithm=None,
)
Build an ObjectStoreConfig instance for S3 or S3 compatible object stores.
Source code in python/icechunk/storage.py
tigris_storage #
tigris_storage(
*,
bucket,
prefix,
region=None,
endpoint_url=None,
use_weak_consistency=False,
allow_http=False,
access_key_id=None,
secret_access_key=None,
session_token=None,
expires_after=None,
anonymous=None,
from_env=None,
get_credentials=None,
scatter_initial_credentials=False,
network_stream_timeout_seconds=60,
checksum_algorithm=None,
legacy_rooted_keys=None,
read_headers=None,
write_headers=None,
headers=None,
)
Create a Storage instance that saves data in Tigris object store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bucket | str | The bucket where the repository will store its data | required |
prefix | str | None | The prefix within the bucket that is the root directory of the repository. An empty or | required |
region | str | None | The region to use in the object store, if | None |
endpoint_url | str | None | Optional endpoint where the object store serves data, example: http://localhost:4200 | None |
use_weak_consistency | bool | If set to True it will return a Storage instance that is read only, and can read from the the closest Tigris region. Behavior is undefined if objects haven't propagated to the region yet. This option is for experts only. | False |
allow_http | bool | If the object store can be accessed using http protocol instead of https | False |
access_key_id | str | None | S3 credential access key | None |
secret_access_key | str | None | S3 credential secret access key | None |
session_token | str | None | Optional S3 credential session token | None |
expires_after | datetime | None | Optional expiration for the object store credentials | None |
anonymous | bool | None | If set to True requests to the object store will not be signed | None |
from_env | bool | None | Fetch credentials from the operative system environment | None |
get_credentials | Callable[[], S3StaticCredentials] | None | Use this function to get and refresh object store credentials | None |
scatter_initial_credentials | bool | Immediately call and store the value returned by get_credentials. This is useful if the repo or session will be pickled to generate many copies. Passing scatter_initial_credentials=True will ensure all those copies don't need to call get_credentials immediately. After the initial set of credentials has expired, the cached value is no longer used. Notice that credentials obtained are stored, and they can be sent over the network if you pickle the session/repo. | False |
network_stream_timeout_seconds | int | Timeout requests if no bytes can be transmitted during this period of time. If set to 0, timeout is disabled. Default: 60. | 60 |
legacy_rooted_keys | bool | None | The object key layout. | None |
read_headers | dict[str, str] | None | Extra HTTP headers to attach to every read request to the object store. | None |
write_headers | dict[str, str] | None | Extra HTTP headers to attach to every write request to the object store, for example | None |
headers | dict[str, str] | None | Extra HTTP headers to attach to both read and write requests. They are merged with | None |
Source code in python/icechunk/storage.py
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 | |