ObjectStore¶
obstore.store.from_url ¶
from_url(
url: str,
*,
config: S3Config | S3ConfigInput | None = None,
client_options: ClientConfig | None = None,
retry_config: RetryConfig | None = None,
**kwargs: Unpack[S3ConfigInput],
) -> ObjectStore
from_url(
url: str,
*,
config: GCSConfig | GCSConfigInput | None = None,
client_options: ClientConfig | None = None,
retry_config: RetryConfig | None = None,
**kwargs: Unpack[GCSConfigInput],
) -> ObjectStore
from_url(
url: str,
*,
config: AzureConfig | AzureConfigInput | None = None,
client_options: ClientConfig | None = None,
retry_config: RetryConfig | None = None,
**kwargs: Unpack[AzureConfigInput],
) -> ObjectStore
from_url(
url: str,
*,
config: None = None,
client_options: None = None,
retry_config: None = None,
automatic_cleanup: bool = False,
mkdir: bool = False,
) -> ObjectStore
from_url(
url: str,
*,
config: S3ConfigInput | GCSConfigInput | AzureConfigInput | None = None,
client_options: ClientConfig | None = None,
retry_config: RetryConfig | None = None,
**kwargs: Any,
) -> ObjectStore
Easy construction of store by URL, identifying the relevant store.
This will defer to a store-specific from_url
constructor based on the provided
url
. E.g. passing "s3://bucket/path"
will defer to
S3Store.from_url
.
Supported formats:
file:///path/to/my/file
->LocalStore
memory:///
->MemoryStore
s3://bucket/path
->S3Store
(also supportss3a
)gs://bucket/path
->GCSStore
az://account/container/path
->AzureStore
(also supportsadl
,azure
,abfs
,abfss
)http://mydomain/path
->HTTPStore
https://mydomain/path
->HTTPStore
There are also special cases for AWS and Azure for https://{host?}/path
paths:
dfs.core.windows.net
,blob.core.windows.net
,dfs.fabric.microsoft.com
,blob.fabric.microsoft.com
->AzureStore
amazonaws.com
->S3Store
r2.cloudflarestorage.com
->S3Store
Note
For best static typing, use the constructors on individual store classes directly.
Parameters:
-
url
(str
) –well-known storage URL.
Other Parameters:
-
config
(S3ConfigInput | GCSConfigInput | AzureConfigInput | None
) –per-store Configuration. Values in this config will override values inferred from the url. Defaults to None.
-
client_options
(ClientConfig | None
) –HTTP Client options. Defaults to None.
-
retry_config
(RetryConfig | None
) –Retry configuration. Defaults to None.
obstore.store.ObjectStore
module-attribute
¶
ObjectStore = (
AzureStore | GCSStore | HTTPStore | S3Store | LocalStore | MemoryStore
)
All supported ObjectStore implementations.