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. |
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 Tigris 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 icechunk-python/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 icechunk-python/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 icechunk-python/python/icechunk/_icechunk_python.pyi
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 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 | |
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 icechunk-python/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 icechunk-python/python/icechunk/_icechunk_python.pyi
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 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 | |
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 icechunk-python/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 icechunk-python/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 icechunk-python/python/icechunk/_icechunk_python.pyi
1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 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 | |
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 icechunk-python/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 icechunk-python/python/icechunk/_icechunk_python.pyi
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 1227 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 | |
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 icechunk-python/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 icechunk-python/python/icechunk/_icechunk_python.pyi
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 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 | |
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. Currently not supported in GCS. Example: STANDARD_IA Default: None | None |
metadata_storage_class | str | None | Store metadata objects using this object store storage class. Currently not supported in GCS. Default: None (falls back to | None |
chunks_storage_class | str | None | Store chunk objects using this object store storage class. Currently not supported in GCS. 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 icechunk-python/python/icechunk/_icechunk_python.pyi
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 | |
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 icechunk-python/python/icechunk/_icechunk_python.pyi
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 1319 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 | |
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 icechunk-python/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 | 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 icechunk-python/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 icechunk-python/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,
)
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 | 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 |
Source code in icechunk-python/python/icechunk/storage.py
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 icechunk-python/python/icechunk/storage.py
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 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 |
Source code in icechunk-python/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 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 |
Source code in icechunk-python/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 icechunk-python/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
Source code in icechunk-python/python/icechunk/storage.py
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 icechunk-python/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,
)
Create a Storage instance that saves data in Tigris 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 | 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 |
Source code in icechunk-python/python/icechunk/storage.py
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 462 463 464 465 466 467 468 469 470 471 472 473 | |
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 icechunk-python/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,
)
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 | 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 |
Source code in icechunk-python/python/icechunk/storage.py
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 250 251 252 253 254 255 256 257 258 | |
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 icechunk-python/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,
)
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 | 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 |
Source code in icechunk-python/python/icechunk/storage.py
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 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 | |