icechunk.storage#
Storage backends and configuration for S3, GCS, Azure, local filesystem, and more.
icechunk.storage #
Classes:
| Name | Description |
|---|---|
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. |
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
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 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 | |
allow_http property writable #
Whether HTTP requests are allowed for the storage backend.
Returns:
| Type | Description |
|---|---|
bool |
|
anonymous property writable #
Whether to use anonymous credentials (unsigned requests).
Returns:
| Type | Description |
|---|---|
bool |
|
endpoint_url property writable #
Optional endpoint URL for the storage backend.
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.
Returns:
| Type | Description |
|---|---|
bool |
|
network_stream_timeout_seconds property writable #
Timeout in seconds for idle network streams.
Returns:
| Type | Description |
|---|---|
int | None | The timeout duration; |
region property writable #
Optional region to use for the storage backend.
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,
)
Create a new S3Options object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
region | str | None | Optional, the region to use for the storage backend. | None |
endpoint_url | str | None | Optional, the endpoint URL to use for the storage backend. | None |
allow_http | bool | Whether to allow HTTP requests to the storage backend. | 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. | 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. Default: 60. | None |
requester_pays | bool | Enable requester pays for S3 buckets | False |
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
3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 | |
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. |
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
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 | |
ideal_concurrent_request_size property writable #
The ideal concurrent request size.
Returns:
| Type | Description |
|---|---|
int | None | The ideal concurrent request size. |
max_concurrent_requests_for_object property writable #
The maximum number of concurrent requests for an object.
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
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 | |
initial_backoff_ms property writable #
The initial backoff duration in milliseconds.
Returns:
| Type | Description |
|---|---|
int | None | The initial backoff duration in milliseconds. |
max_backoff_ms property writable #
The maximum backoff duration in milliseconds.
Returns:
| Type | Description |
|---|---|
int | None | The maximum backoff duration in milliseconds. |
max_tries property writable #
The maximum number of tries, including the initial one.
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
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 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 1368 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 | |
chunks_storage_class property writable #
Chunk objects in object store will use this storage class or self.storage_class if None
concurrency property writable #
The configuration for how much concurrency Icechunk store uses
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
minimum_size_for_multipart_upload property writable #
Use object store's multipart upload for objects larger than this size in bytes
retries property writable #
The configuration for how Icechunk retries failed requests.
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
timeouts property writable #
The configuration for AWS SDK timeout settings.
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
unsafe_use_conditional_update property writable #
True if Icechunk will use conditional PUT operations for updates in the object store
unsafe_use_metadata property writable #
True if Icechunk will write object metadata in the object store
__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. | None |
retries | StorageRetriesSettings | None | The configuration for how Icechunk retries failed requests. | 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 | None |
metadata_storage_class | str | None | Store metadata objects using this object store storage class. Currently not supported in GCS. Defaults to storage_class. | None |
chunks_storage_class | str | None | Store chunk objects using this object store storage class. Currently not supported in GCS. Defaults to storage_class. | None |
minimum_size_for_multipart_upload | int | None | Use object store's multipart upload for objects larger than this size in bytes. Default: 100 MB if None is passed. | None |
timeouts | StorageTimeoutSettings | None | The configuration for AWS SDK timeout settings. | None |
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
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 | |
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 |
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
__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. | None |
read_timeout_ms | int | None | The timeout for reading a response in milliseconds. | None |
operation_timeout_ms | int | None | The timeout for the entire operation (including retries) in milliseconds. | None |
operation_attempt_timeout_ms | int | None | The timeout for a single attempt of an operation in milliseconds. | 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,
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 |
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,
)
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
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 | |
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,
)
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 |
Source code in icechunk-python/python/icechunk/storage.py
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 | |
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,
)
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,
)
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
289 290 291 292 293 294 295 296 297 298 299 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 | |