Config#
Use a typed configuration to construct an Operator or AsyncOperator. The
service config’s scheme selects the storage service. Use context for
per-operator HTTP settings and layers to apply declarative layers in order.
from datetime import timedelta
from opendal import Operator
from opendal.config import ContextConfig, HttpContextConfig, RetryLayerConfig, S3Config
op = Operator.from_config(
S3Config(scheme="s3", bucket="my-bucket"),
context=ContextConfig(http=HttpContextConfig(connect_timeout=timedelta(seconds=5))),
layers=[RetryLayerConfig(name="retry", max_times=3)],
)
Typed operator configurations.
Each service configuration is a TypedDict with a Literal scheme key. A static type checker detects an incorrect scheme, missing required keys, unknown keys, and incorrect value types.
Build a config with the call form or an annotated variable, then pass it to Operator.from_config / AsyncOperator.from_config:
from opendal import Operator
from opendal.config import S3Config
op = Operator.from_config(S3Config(scheme="s3", bucket="b"))
config: S3Config = {"scheme": "s3", "bucket": "b"}
op = Operator.from_config(config)
ServiceConfig is the discriminated union of all service config dictionaries.
Use context=ContextConfig(http=HttpContextConfig(…)) for per-operator HTTP settings and layers= for a sequence of LayerConfig dictionaries applied in the given order.
- class opendal.config.AkamaiConfig#
Bases:
TypedDictConfiguration for the akamai service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['akamai']]#
The service scheme; fixed to “akamai”.
- class opendal.config.AliyunDriveConfig#
Bases:
TypedDictConfiguration for the aliyun-drive service.
- access_token: NotRequired[str]#
The access_token of this backend. Solution for client-only purpose. #4733 Required if no client_id, client_secret and refresh_token are provided.
- client_id: NotRequired[str]#
The client_id of this backend. Required if no access_token is provided.
- client_secret: NotRequired[str]#
The client_secret of this backend. Required if no access_token is provided.
- drive_type: Required[str]#
The drive_type of this backend. All operations will happen under this type of drive. Available values are default, backup and resource. Fallback to default if not set or no other drives can be found.
- refresh_token: NotRequired[str]#
The refresh_token of this backend. Required if no access_token is provided.
- root: NotRequired[str | os.PathLike[str]]#
The Root of this backend. All operations will happen under this root. Default to / if not set.
- scheme: Required[Literal['aliyun-drive']]#
The service scheme; fixed to “aliyun-drive”.
- class opendal.config.AlluxioConfig#
Bases:
TypedDictConfiguration for the alluxio service.
- endpoint: NotRequired[str]#
endpoint of this backend. Endpoint must be full uri, mostly like http://127.0.0.1:39999.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend. All operations will happen under this root. default to / if not set.
- scheme: Required[Literal['alluxio']]#
The service scheme; fixed to “alluxio”.
- class opendal.config.AzblobConfig#
Bases:
TypedDictConfiguration for the azblob service.
- authority_host: NotRequired[str]#
The authority host of the service principal for Microsoft Entra ID authentication. Defaults to https://login.microsoftonline.com.
- batch_max_operations: NotRequired[int]#
Deprecated: Azblob delete batch capability is enabled by default with Azure Blob’s 256-operation batch limit. [Deprecated since 0.57.0] Azblob delete batch capability is enabled by default with Azure Blob’s 256-operation batch limit. Use CapabilityOverrideLayer to override delete_max_size for specific endpoints.
- client_id: NotRequired[str]#
The client id of the service principal for Microsoft Entra ID authentication.
- client_secret: NotRequired[str]#
The client secret of the service principal for Microsoft Entra ID authentication.
- encryption_key: NotRequired[str]#
The Base64-encoded AES-256 customer-provided encryption key. The key must decode to exactly 32 bytes. Building an operator returns ConfigInvalid for invalid Base64 or a different decoded length.
- endpoint: NotRequired[str]#
The endpoint of Azblob service backend. Endpoint must be full uri, e.g. - Azblob: https://accountname.blob.core.windows.net - Azurite: http://127.0.0.1:10000/devstoreaccount1
- root: NotRequired[str | os.PathLike[str]]#
The root of Azblob service backend. All operations will happen under this root.
- scheme: Required[Literal['azblob']]#
The service scheme; fixed to “azblob”.
- class opendal.config.AzdlsConfig#
Bases:
TypedDictConfiguration for the azdls service.
- account_key: NotRequired[str]#
Account key of this backend. - required for shared_key authentication
- authority_host: NotRequired[str]#
authority_host The authority host of the service principal. - required for client_credentials authentication - default value: https://login.microsoftonline.com
- client_id: NotRequired[str]#
client_id The client id of the service principal. - required for client_credentials authentication
- client_secret: NotRequired[str]#
client_secret The client secret of the service principal. - required for client_credentials authentication
- enable_hns: NotRequired[bool]#
Whether hierarchical namespace (HNS) is enabled for the storage account. When enabled, recursive deletion can use pagination to avoid timeouts on large directories. - default value: false
- root: NotRequired[str | os.PathLike[str]]#
Root of this backend.
- sas_token: NotRequired[str]#
sas_token The shared access signature token. - required for sas authentication
- scheme: Required[Literal['azdls']]#
The service scheme; fixed to “azdls”.
- class opendal.config.AzfileConfig#
Bases:
TypedDictConfiguration for the azfile service.
- authority_host: NotRequired[str]#
The authority host of the service principal for Microsoft Entra ID authentication. Defaults to https://login.microsoftonline.com.
- client_id: NotRequired[str]#
The client id of the service principal for Microsoft Entra ID authentication.
- client_secret: NotRequired[str]#
The client secret of the service principal for Microsoft Entra ID authentication.
- root: NotRequired[str | os.PathLike[str]]#
The root path for azfile.
- scheme: Required[Literal['azfile']]#
The service scheme; fixed to “azfile”.
The share name for azfile.
- class opendal.config.B2Config#
Bases:
TypedDictConfiguration for the b2 service.
- application_key: NotRequired[str]#
applicationKey of this backend. - If application_key is set, we will take user’s input first. - If not, we will try to load it from environment.
- application_key_id: NotRequired[str]#
keyID of this backend. - If application_key_id is set, we will take user’s input first. - If not, we will try to load it from environment.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend. All operations will happen under this root.
- scheme: Required[Literal['b2']]#
The service scheme; fixed to “b2”.
- class opendal.config.B2S3Config#
Bases:
TypedDictConfiguration for the b2-s3 service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['b2-s3']]#
The service scheme; fixed to “b2-s3”.
- class opendal.config.CacacheConfig#
Bases:
TypedDictConfiguration for the cacache service.
- scheme: Required[Literal['cacache']]#
The service scheme; fixed to “cacache”.
- class opendal.config.CephRgwConfig#
Bases:
TypedDictConfiguration for the ceph-rgw service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- enable_virtual_host_style: NotRequired[bool]#
Use virtual-hosted-style addressing when the gateway has a matching rgw_dns_name or zonegroup hostname.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['ceph-rgw']]#
The service scheme; fixed to “ceph-rgw”.
- class opendal.config.ConcurrentLimitLayerConfig#
Bases:
TypedDictConfiguration for the concurrent_limit layer.
- name: Required[Literal['concurrent_limit']]#
The layer name, fixed to
concurrent_limit.
- class opendal.config.ContextConfig#
Bases:
TypedDictRuntime settings for an operator.
- http: HttpContextConfig#
Settings for this operator’s HTTP transport.
- class opendal.config.CosConfig#
Bases:
TypedDictConfiguration for the cos service.
- disable_config_load: NotRequired[bool]#
Disable config load so that opendal will not load config from
- enable_versioning: NotRequired[bool]#
Deprecated: COS versioning capability is enabled by default. [Deprecated since 0.57.0] COS versioning capability is enabled by default and this option is no longer needed.
- root: NotRequired[str | os.PathLike[str]]#
Root of this backend.
- scheme: Required[Literal['cos']]#
The service scheme; fixed to “cos”.
- security_token: NotRequired[str]#
Security token (a.k.a. session token) of this backend. This is used for temporary credentials issued by Tencent Cloud STS (e.g. GetFederationToken / AssumeRole). When security_token is provided, it will be used together with secret_id and secret_key to sign requests, and the x-cos-security-token header will be attached automatically by the signer. If this field is not set, OpenDAL will also fall back to reading the token from environment variables TENCENTCLOUD_TOKEN, TENCENTCLOUD_SECURITY_TOKEN or QCLOUD_SECRET_TOKEN (unless disable_config_load is enabled).
- class opendal.config.CosS3Config#
Bases:
TypedDictConfiguration for the cos-s3 service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['cos-s3']]#
The service scheme; fixed to “cos-s3”.
- class opendal.config.DashmapConfig#
Bases:
TypedDictConfiguration for the dashmap service.
- root: NotRequired[str | os.PathLike[str]]#
root path of this backend
- scheme: Required[Literal['dashmap']]#
The service scheme; fixed to “dashmap”.
- class opendal.config.DropboxConfig#
Bases:
TypedDictConfiguration for the dropbox service.
- root: NotRequired[str | os.PathLike[str]]#
root path for dropbox.
- scheme: Required[Literal['dropbox']]#
The service scheme; fixed to “dropbox”.
- class opendal.config.ExoscaleConfig#
Bases:
TypedDictConfiguration for the exoscale service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
Explicit HTTP(S) base endpoint. The default is https://sos-<zone>.exo.io.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['exoscale']]#
The service scheme; fixed to “exoscale”.
- class opendal.config.FoyerConfig#
Bases:
TypedDictConfiguration for the foyer service.
- disk_capacity: NotRequired[int]#
Disk cache total capacity in bytes. Only used when disk_path is set.
- disk_file_size: NotRequired[int]#
Individual cache file size in bytes. Default is 1 MiB. Only used when disk_path is set.
- disk_path: NotRequired[str]#
Disk cache directory path. If set, enables hybrid cache with disk storage. Data will be persisted to this directory when memory cache is full.
- recover_mode: NotRequired[str]#
Recovery mode when starting the cache. Valid values: “none” (default), “quiet”, “strict”. - “none”: Don’t recover from disk - “quiet”: Recover and skip errors - “strict”: Recover and panic on errors
- root: NotRequired[str | os.PathLike[str]]#
Root path of this backend.
- scheme: Required[Literal['foyer']]#
The service scheme; fixed to “foyer”.
- class opendal.config.FsConfig#
Bases:
TypedDictConfiguration for the fs service.
- atomic_write_dir: NotRequired[str | os.PathLike[str]]#
tmp dir for atomic write
- direct_io: NotRequired[bool]#
Bypass the page cache for file reads and writes on Linux. Defaults to false.
- root: NotRequired[str | os.PathLike[str]]#
root dir for backend
- scheme: Required[Literal['fs']]#
The service scheme; fixed to “fs”.
- class opendal.config.FtpConfig#
Bases:
TypedDictConfiguration for the ftp service.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend
- scheme: Required[Literal['ftp']]#
The service scheme; fixed to “ftp”.
- class opendal.config.GarageConfig#
Bases:
TypedDictConfiguration for the garage service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- enable_virtual_host_style: NotRequired[bool]#
Use virtual-hosted-style addressing when the cluster has a matching root_domain.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['garage']]#
The service scheme; fixed to “garage”.
- class opendal.config.GcsConfig#
Bases:
TypedDictConfiguration for the gcs service.
- allow_anonymous: NotRequired[bool]#
Allow opendal to send requests without signing when credentials are not loaded. [Deprecated since 0.57.0] Please use skip_signature instead of allow_anonymous
- credential_path: NotRequired[str]#
Local path to credentials file for GCS service OAuth2 authentication.
- disable_vm_metadata: NotRequired[bool]#
Disable attempting to load credentials from the GCE metadata server when running within Google Cloud.
- root: NotRequired[str | os.PathLike[str]]#
root URI, all operations happens under root
- scheme: Required[Literal['gcs']]#
The service scheme; fixed to “gcs”.
- class opendal.config.GcsGrpcConfig#
Bases:
TypedDictConfiguration for the gcs-grpc service.
- root: NotRequired[str | os.PathLike[str]]#
Root path for all operations.
- scheme: Required[Literal['gcs-grpc']]#
The service scheme; fixed to “gcs-grpc”.
- class opendal.config.GcsS3Config#
Bases:
TypedDictConfiguration for the gcs-s3 service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- enable_virtual_host_style: NotRequired[bool]#
Use virtual-hosted-style addressing for DNS-compatible buckets without dots.
- endpoint: NotRequired[str]#
HTTP(S) XML API base endpoint. Defaults to https://storage.googleapis.com.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['gcs-s3']]#
The service scheme; fixed to “gcs-s3”.
- class opendal.config.GdriveConfig#
Bases:
TypedDictConfiguration for the gdrive service.
- drive_id: NotRequired[str]#
Shared drive (formerly Team Drive) id for gdrive. When set, gdrive resolves root inside this shared drive instead of the user’s My Drive.
- root: NotRequired[str | os.PathLike[str]]#
The root for gdrive
- scheme: Required[Literal['gdrive']]#
The service scheme; fixed to “gdrive”.
- class opendal.config.GhacConfig#
Bases:
TypedDictConfiguration for the ghac service.
- root: NotRequired[str | os.PathLike[str]]#
The root path for ghac.
- scheme: Required[Literal['ghac']]#
The service scheme; fixed to “ghac”.
- class opendal.config.GithubConfig#
Bases:
TypedDictConfiguration for the github service.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend. All operations will happen under this root.
- scheme: Required[Literal['github']]#
The service scheme; fixed to “github”.
- class opendal.config.GridfsConfig#
Bases:
TypedDictConfiguration for the gridfs service.
- chunk_size: NotRequired[int]#
The chunk size of the MongoDB GridFs service used to break the user file into chunks.
- root: NotRequired[str | os.PathLike[str]]#
The working directory, all operations will be performed under it.
- scheme: Required[Literal['gridfs']]#
The service scheme; fixed to “gridfs”.
- class opendal.config.HdfsNativeConfig#
Bases:
TypedDictConfiguration for the hdfs-native service.
- enable_append: NotRequired[bool]#
Deprecated: HDFS Native append capability is enabled by default. [Deprecated since 0.57.0] HDFS Native append capability is enabled by default and this option is no longer needed.
- root: NotRequired[str | os.PathLike[str]]#
work dir of this backend
- scheme: Required[Literal['hdfs-native']]#
The service scheme; fixed to “hdfs-native”.
- class opendal.config.HetznerConfig#
Bases:
TypedDictConfiguration for the hetzner service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
Explicit HTTP(S) base endpoint. The default is https://<location>.your-objectstorage.com.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['hetzner']]#
The service scheme; fixed to “hetzner”.
- class opendal.config.HfConfig#
Bases:
TypedDictConfiguration for the hf service.
- disable_config_load: NotRequired[bool]#
Disable loading config from the environment. When set, the service ignores HF_ENDPOINT, HF_HUB_DISABLE_XET, HF_TOKEN, HF_TOKEN_PATH, and the token file under HF_HOME, $XDG_CACHE_HOME/huggingface or ~/.cache/huggingface.
- download_mode: NotRequired[str]#
Download mode. Either xet (default) or http. When unset, the mode is resolved from the HF_HUB_DISABLE_XET environment variable: a non-empty value forces http, otherwise it defaults to xet. An explicit value here takes precedence. See <https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfhubdisablexet>.
- enable_resolve_cache: NotRequired[bool]#
Enable caching of resolved HTTP download addresses and XET file metadata. Defaults to false. Set to true to share resolve results across readers on the same backend. Changed files may remain invisible while cached results are reused. A reader retains XET metadata from its first read for its lifetime. Create a new reader to resolve the path again when this option is disabled. See [HfBuilder::enable_resolve_cache] for freshness semantics.
- endpoint: NotRequired[str]#
Endpoint of the Hugging Face Hub. The default is https://huggingface.co.
- root: NotRequired[str | os.PathLike[str]]#
Root of this backend. Can be “/path/to/dir”. Default is “/”.
- scheme: Required[Literal['hf']]#
The service scheme; fixed to “hf”.
- class opendal.config.HttpConfig#
Bases:
TypedDictConfiguration for the http service.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend
- scheme: Required[Literal['http']]#
The service scheme; fixed to “http”.
- class opendal.config.HttpContextConfig#
Bases:
TypedDictPer-operator settings for requests using the HTTP transport.
Supply positive durations for the timeouts.
- class opendal.config.IbmCosConfig#
Bases:
TypedDictConfiguration for the ibm-cos service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: Required[str]#
HTTPS S3 base URL for the bucket’s storage location and network access type.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['ibm-cos']]#
The service scheme; fixed to “ibm-cos”.
- class opendal.config.IdriveE2Config#
Bases:
TypedDictConfiguration for the idrive-e2 service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['idrive-e2']]#
The service scheme; fixed to “idrive-e2”.
- class opendal.config.IonosConfig#
Bases:
TypedDictConfiguration for the ionos service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
Explicit HTTP(S) S3 base endpoint. By default, OpenDAL selects the endpoint from the bucket’s region.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['ionos']]#
The service scheme; fixed to “ionos”.
- class opendal.config.IpfsConfig#
Bases:
TypedDictConfiguration for the ipfs service.
- root: NotRequired[str | os.PathLike[str]]#
IPFS root.
- scheme: Required[Literal['ipfs']]#
The service scheme; fixed to “ipfs”.
- class opendal.config.IpmfsConfig#
Bases:
TypedDictConfiguration for the ipmfs service.
- root: NotRequired[str | os.PathLike[str]]#
Root for ipfs.
- scheme: Required[Literal['ipmfs']]#
The service scheme; fixed to “ipmfs”.
- class opendal.config.KoofrConfig#
Bases:
TypedDictConfiguration for the koofr service.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend. All operations will happen under this root.
- scheme: Required[Literal['koofr']]#
The service scheme; fixed to “koofr”.
- class opendal.config.LakefsS3Config#
Bases:
TypedDictConfiguration for the lakefs-s3 service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- enable_virtual_host_style: NotRequired[bool]#
Use virtual-hosted-style addressing when the gateway is configured for it.
- root: Required[str | os.PathLike[str]]#
S3 key prefix starting with a branch or other lakeFS reference.
- scheme: Required[Literal['lakefs-s3']]#
The service scheme; fixed to “lakefs-s3”.
- opendal.config.LayerConfig = opendal.config.ConcurrentLimitLayerConfig | opendal.config.LoggingLayerConfig | opendal.config.MimeGuessLayerConfig | opendal.config.RetryLayerConfig | opendal.config.TimeoutLayerConfig#
Discriminated union of supported declarative layer configs, keyed on name.
- class opendal.config.LoggingLayerConfig#
Bases:
TypedDictConfiguration for the logging layer.
- name: Required[Literal['logging']]#
The layer name, fixed to
logging.
- class opendal.config.MemcachedConfig#
Bases:
TypedDictConfiguration for the memcached service.
- connection_pool_max_size: NotRequired[int]#
The maximum number of connections allowed. default is 10
- default_ttl: NotRequired[str | timedelta]#
The default ttl for put operations. A datetime.timedelta or human readable duration string, e.g. “5s” (see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html).
- enable_tls: NotRequired[bool]#
Enable TLS for TCP connections. Defaults to false. The server certificate must match the endpoint host and a native trust root.
- endpoint: NotRequired[str]#
network address of the memcached service. For example: “tcp://localhost:11211”
- root: NotRequired[str | os.PathLike[str]]#
the working directory of the service. Can be “/path/to/dir” default is “/”
- scheme: Required[Literal['memcached']]#
The service scheme; fixed to “memcached”.
- class opendal.config.MemoryConfig#
Bases:
TypedDictConfiguration for the memory service.
- root: NotRequired[str | os.PathLike[str]]#
root of the backend.
- scheme: Required[Literal['memory']]#
The service scheme; fixed to “memory”.
- class opendal.config.MimeGuessLayerConfig#
Bases:
TypedDictConfiguration for the mime_guess layer.
- name: Required[Literal['mime_guess']]#
The layer name, fixed to
mime_guess.
- class opendal.config.MiniMokaConfig#
Bases:
TypedDictConfiguration for the mini-moka service.
- max_capacity: NotRequired[int]#
Sets the max capacity of the cache. Refer to [mini-moka::sync::CacheBuilder::max_capacity](https://docs.rs/mini-moka/latest/mini_moka/sync/struct.CacheBuilder.html#method.max_capacity)
- root: NotRequired[str | os.PathLike[str]]#
root path of this backend
- scheme: Required[Literal['mini-moka']]#
The service scheme; fixed to “mini-moka”.
- time_to_idle: NotRequired[str | timedelta]#
Sets the time to idle of the cache. Refer to [mini-moka::sync::CacheBuilder::time_to_idle](https://docs.rs/mini-moka/latest/mini_moka/sync/struct.CacheBuilder.html#method.time_to_idle) A datetime.timedelta or human readable duration string, e.g. “5s” (see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html).
- time_to_live: NotRequired[str | timedelta]#
Sets the time to live of the cache. Refer to [mini-moka::sync::CacheBuilder::time_to_live](https://docs.rs/mini-moka/latest/mini_moka/sync/struct.CacheBuilder.html#method.time_to_live) A datetime.timedelta or human readable duration string, e.g. “5s” (see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html).
- class opendal.config.MinioConfig#
Bases:
TypedDictConfiguration for the minio service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. When enabled, signing requires both access_key_id and secret_access_key.
- endpoint: Required[str]#
MinIO endpoint. This field is required because MinIO deployments do not share a universal endpoint.
- region: NotRequired[str]#
Signing region. The default is auto. Set this field when the deployment requires a configured region.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. All operations happen under this root. The default is /.
- scheme: Required[Literal['minio']]#
The service scheme; fixed to “minio”.
- class opendal.config.MokaConfig#
Bases:
TypedDictConfiguration for the moka service.
- max_capacity: NotRequired[int]#
Sets the max capacity of the cache. Refer to [moka::future::CacheBuilder::max_capacity](https://docs.rs/moka/latest/moka/future/struct.CacheBuilder.html#method.max_capacity)
- root: NotRequired[str | os.PathLike[str]]#
root path of this backend
- scheme: Required[Literal['moka']]#
The service scheme; fixed to “moka”.
- time_to_idle: NotRequired[str | timedelta]#
Sets the time to idle of the cache. Refer to [moka::future::CacheBuilder::time_to_idle](https://docs.rs/moka/latest/moka/future/struct.CacheBuilder.html#method.time_to_idle) A datetime.timedelta or human readable duration string, e.g. “5s” (see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html).
- time_to_live: NotRequired[str | timedelta]#
Sets the time to live of the cache. Refer to [moka::future::CacheBuilder::time_to_live](https://docs.rs/moka/latest/moka/future/struct.CacheBuilder.html#method.time_to_live) A datetime.timedelta or human readable duration string, e.g. “5s” (see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html).
- class opendal.config.MongodbConfig#
Bases:
TypedDictConfiguration for the mongodb service.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend
- scheme: Required[Literal['mongodb']]#
The service scheme; fixed to “mongodb”.
- class opendal.config.MysqlConfig#
Bases:
TypedDictConfiguration for the mysql service.
- connection_string: NotRequired[str]#
This connection string is used to connect to the mysql service. There are url based formats. The format of connect string resembles the url format of the mysql client. The format is: [scheme://][user[:[password]]@]host[:port][/schema][?attribute1=value1&attribute2=value2… - mysql://user@localhost - mysql://user:password@localhost - mysql://user:password@localhost:3306 - mysql://user:password@localhost:3306/db For more information, please refer to <https://docs.rs/sqlx/latest/sqlx/mysql/struct.MySqlConnectOptions.html>.
- root: NotRequired[str | os.PathLike[str]]#
The root for mysql.
- scheme: Required[Literal['mysql']]#
The service scheme; fixed to “mysql”.
- class opendal.config.NeonConfig#
Bases:
TypedDictConfiguration for the neon service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- region: NotRequired[str]#
Signing region. Defaults to the project region in a standard Neon branch URL. Required with a custom endpoint.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['neon']]#
The service scheme; fixed to “neon”.
- class opendal.config.ObsConfig#
Bases:
TypedDictConfiguration for the obs service.
- disable_config_load: NotRequired[bool]#
Disable config load so that opendal will not load config from environment. For examples: - envs like HUAWEI_CLOUD_ACCESS_KEY_ID
- enable_versioning: NotRequired[bool]#
Deprecated: OBS versioning capability is not controlled by service config. [Deprecated since 0.57.0] OBS versioning capability is not controlled by this option and this option is no longer needed.
- root: NotRequired[str | os.PathLike[str]]#
Root for obs.
- scheme: Required[Literal['obs']]#
The service scheme; fixed to “obs”.
- security_token: NotRequired[str]#
Security token (a.k.a. session token) for obs. Temporary credentials sign with access_key_id, secret_access_key and this token, and the signer attaches the token as the x-obs-security-token header. If this field is not set, OpenDAL reads the token from the environment variable HUAWEI_CLOUD_SECURITY_TOKEN (unless disable_config_load is enabled).
- class opendal.config.ObsS3Config#
Bases:
TypedDictConfiguration for the obs-s3 service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
HTTP(S) base endpoint override. OpenDAL prepends the bucket to the host.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['obs-s3']]#
The service scheme; fixed to “obs-s3”.
- class opendal.config.OciConfig#
Bases:
TypedDictConfiguration for the oci service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
Explicit HTTP(S) base endpoint. The default is https://<namespace>.compat.objectstorage.<region>.oci.customer-oci.com.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['oci']]#
The service scheme; fixed to “oci”.
- class opendal.config.OnedriveConfig#
Bases:
TypedDictConfiguration for the onedrive service.
- client_id: NotRequired[str]#
Microsoft Graph API Application (client) ID that is in the Azure’s app registration portal
- client_secret: NotRequired[str]#
Microsoft Graph API Application client secret that is in the Azure’s app registration portal
- enable_versioning: NotRequired[bool]#
Deprecated: OneDrive supports version listing without this option. [Deprecated since 0.57.0] OneDrive supports version listing without this option.
- root: NotRequired[str | os.PathLike[str]]#
The root path for the OneDrive service for the file access
- scheme: Required[Literal['onedrive']]#
The service scheme; fixed to “onedrive”.
- class opendal.config.OssConfig#
Bases:
TypedDictConfiguration for the oss service.
- access_key_id: NotRequired[str]#
Access key id for oss. - this field if it’s is_some - env value: ALIBABA_CLOUD_ACCESS_KEY_ID
- access_key_secret: NotRequired[str]#
Access key secret for oss. - this field if it’s is_some - env value: ALIBABA_CLOUD_ACCESS_KEY_SECRET
- allow_anonymous: NotRequired[bool]#
Allow anonymous for oss. [Deprecated since 0.57.0] Please use skip_signature instead of allow_anonymous
- batch_max_operations: NotRequired[int]#
Deprecated: OSS delete batch capability is enabled by default. [Deprecated since 0.57.0] OSS delete batch capability is enabled by default. Use CapabilityOverrideLayer to override delete_max_size for specific endpoints.
- delete_max_size: NotRequired[int]#
Deprecated: OSS delete batch capability is enabled by default. [Deprecated since 0.57.0] OSS delete batch capability is enabled by default. Use CapabilityOverrideLayer to override delete_max_size for specific endpoints.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from ambient sources. This removes the environment provider and the OSS profile, Alibaba Cloud shared credentials, Alibaba Cloud CLI config, and ALIBABA_CLOUD_CREDENTIALS_URI sources. Explicit access keys, OIDC options that are all set on the builder, and the role_arn AssumeRole flow remain enabled, and ECS instance RAM role credentials keep loading from instance metadata.
- enable_versioning: NotRequired[bool]#
Deprecated: OSS versioning capability is enabled by default. [Deprecated since 0.57.0] OSS versioning capability is enabled by default and this option is no longer needed.
- oidc_provider_arn: NotRequired[str]#
oidc_provider_arn will be loaded from - this field if it’s is_some - env value: ALIBABA_CLOUD_OIDC_PROVIDER_ARN
- oidc_token_file: NotRequired[str]#
oidc_token_file will be loaded from - this field if it’s is_some - env value: ALIBABA_CLOUD_OIDC_TOKEN_FILE
- role_arn: NotRequired[str]#
If role_arn is set, we will use already known config as source credential to assume role with role_arn. - this field if it’s is_some - env value: ALIBABA_CLOUD_ROLE_ARN
- root: NotRequired[str | os.PathLike[str]]#
Root for oss.
- scheme: Required[Literal['oss']]#
The service scheme; fixed to “oss”.
- security_token: NotRequired[str]#
security_token will be loaded from - this field if it’s is_some - env value: ALIBABA_CLOUD_SECURITY_TOKEN
- class opendal.config.OssS3Config#
Bases:
TypedDictConfiguration for the oss-s3 service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['oss-s3']]#
The service scheme; fixed to “oss-s3”.
- class opendal.config.OvhcloudConfig#
Bases:
TypedDictConfiguration for the ovhcloud service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
Explicit HTTP(S) base endpoint. The default is https://s3.<region>.io.cloud.ovh.net.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['ovhcloud']]#
The service scheme; fixed to “ovhcloud”.
- class opendal.config.PersyConfig#
Bases:
TypedDictConfiguration for the persy service.
- datafile: NotRequired[str]#
That path to the persy data file. The directory in the path must already exist.
- scheme: Required[Literal['persy']]#
The service scheme; fixed to “persy”.
- class opendal.config.PostgresqlConfig#
Bases:
TypedDictConfiguration for the postgresql service.
- connection_string: NotRequired[str]#
The URL should be with a scheme of either postgres:// or postgresql://. - postgresql://user@localhost - postgresql://user:password@%2Fvar%2Flib%2Fpostgresql/mydb?connect_timeout=10 - postgresql://user@host1:1234,host2,host3:5678?target_session_attrs=read-write - postgresql:///mydb?user=user&host=/var/lib/postgresql For more information, please visit <https://docs.rs/sqlx/latest/sqlx/postgres/struct.PgConnectOptions.html>.
- root: NotRequired[str | os.PathLike[str]]#
Root of this backend. All operations will happen under this root. Default to / if not set.
- scheme: Required[Literal['postgresql']]#
The service scheme; fixed to “postgresql”.
- class opendal.config.QingstorConfig#
Bases:
TypedDictConfiguration for the qingstor service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
Explicit HTTP(S) base endpoint. The default is https://s3.<zone>.qsstor.com.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['qingstor']]#
The service scheme; fixed to “qingstor”.
- class opendal.config.R2Config#
Bases:
TypedDictConfiguration for the r2 service.
- account_id: NotRequired[str]#
Cloudflare account ID used to derive the R2 endpoint. Set exactly one of account_id and endpoint.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
Explicit R2-compatible endpoint. Use this field for a proxy, gateway, or test server. Set exactly one of endpoint and account_id.
- jurisdiction: NotRequired[str]#
R2 jurisdiction. Supported values are eu, fedramp, and us. This field requires account_id and cannot be used with endpoint.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. All operations happen under this root. The default is /.
- scheme: Required[Literal['r2']]#
The service scheme; fixed to “r2”.
- class opendal.config.RedbConfig#
Bases:
TypedDictConfiguration for the redb service.
- root: NotRequired[str | os.PathLike[str]]#
The root for redb.
- scheme: Required[Literal['redb']]#
The service scheme; fixed to “redb”.
- class opendal.config.RedisConfig#
Bases:
TypedDictConfiguration for the redis service.
- cluster_endpoints: NotRequired[str]#
network address of the Redis cluster service. Can be “tcp://127.0.0.1:6379,tcp://127.0.0.1:6380,tcp://127.0.0.1:6381”, e.g. default is None
- connection_pool_max_size: NotRequired[int]#
The maximum number of connections allowed. default is 10
- default_ttl: NotRequired[str | timedelta]#
The default ttl for put operations. A datetime.timedelta or human readable duration string, e.g. “5s” (see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html).
- endpoint: NotRequired[str]#
network address of the Redis service. Can be “tcp://127.0.0.1:6379”, e.g. default is “tcp://127.0.0.1:6379”
- read_from_replicas: NotRequired[bool]#
Route read-only commands for read and stat to Redis Cluster replicas when available. Defaults to false. Enabling this option requires cluster_endpoints. Replication lag can cause stale results. For example, read or stat can briefly return ErrorKind::NotFound for a just-written key. OpenDAL returns a replica miss without retrying on the primary.
- root: NotRequired[str | os.PathLike[str]]#
the working directory of the Redis service. Can be “/path/to/dir” default is “/”
- scheme: Required[Literal['redis']]#
The service scheme; fixed to “redis”.
- class opendal.config.RetryLayerConfig#
Bases:
TypedDictConfiguration for the retry layer.
- name: Required[Literal['retry']]#
The layer name, fixed to
retry.
- class opendal.config.RustfsConfig#
Bases:
TypedDictConfiguration for the rustfs service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- enable_virtual_host_style: NotRequired[bool]#
Use virtual-hosted-style addressing when the deployment has a matching RUSTFS_SERVER_DOMAINS.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['rustfs']]#
The service scheme; fixed to “rustfs”.
- class opendal.config.S3Config#
Bases:
TypedDictConfiguration for the s3 service.
- access_key_id: NotRequired[str]#
access_key_id of this backend. - If access_key_id is set, we will take user’s input first. - If not, we will try to load it from environment.
- allow_anonymous: NotRequired[bool]#
Allow anonymous will allow opendal to send request without signing when credential is not loaded. [Deprecated since 0.57.0] Please use skip_signature instead of allow_anonymous
- batch_max_operations: NotRequired[int]#
Deprecated: S3 delete batch capability is enabled by default. [Deprecated since 0.57.0] S3 delete batch capability is enabled by default. Use CapabilityOverrideLayer to override delete_max_size for specific endpoints.
- checksum_algorithm: NotRequired[str]#
Checksum Algorithm to use when sending checksums in HTTP headers. This is necessary when writing to AWS S3 Buckets with Object Lock enabled for example. Available options: - “crc32c” - “md5”
- container_authorization_token: NotRequired[str]#
Authorization token sent to the AWS container credential endpoint. This token takes precedence over the configured token file and the ambient direct and file token forms.
- container_authorization_token_file: NotRequired[str]#
File containing the authorization token sent to the AWS container credential endpoint. This file takes precedence over both ambient token forms. The credential provider trims surrounding whitespace after reading the file.
- container_credentials_endpoint: NotRequired[str]#
Full URI for AWS container credential metadata. This endpoint takes precedence over the relative container credential URI and both ambient container credential URI forms. It does not change the position or priority of the default ECS credential provider.
- container_credentials_relative_uri: NotRequired[str]#
Relative URI for AWS container credential metadata. An explicit full endpoint takes precedence over this value. This value takes precedence over the ambient full and relative container credential URIs. OpenDAL joins it to container_metadata_uri_override when set, otherwise to http://169.254.170.2. Setting any container credential field replaces the ECS slot in the default credential chain. It does not move that slot ahead of earlier default providers.
- container_metadata_uri_override: NotRequired[str]#
Base URI used to resolve a relative AWS container credential URI. This override affects relative URIs only. It does not alter a configured or ambient full URI. The override alone does not select an endpoint.
- default_acl: NotRequired[str]#
Default ACL for new objects. Note that some s3 services like minio do not support this option.
- default_region: NotRequired[str]#
Fallback signing region when neither region, AWS_REGION, nor AWS_DEFAULT_REGION supplies one.
- default_storage_class: NotRequired[str]#
default storage_class for this backend. Available values: - DEEP_ARCHIVE - GLACIER - GLACIER_IR - INTELLIGENT_TIERING - ONEZONE_IA - EXPRESS_ONEZONE - OUTPOSTS - REDUCED_REDUNDANCY - STANDARD - STANDARD_IA S3 compatible services don’t support all of them
- delete_max_size: NotRequired[int]#
Deprecated: S3 delete batch capability is enabled by default. [Deprecated since 0.57.0] S3 delete batch capability is enabled by default. Use CapabilityOverrideLayer to override delete_max_size for specific endpoints.
- disable_config_load: NotRequired[bool]#
Disable automatic endpoint loading and ambient environment/profile credential providers. This skips endpoint environment variables and removes the static environment, shared-profile, SSO, web-identity, and external process credential slots. Region environment lookup and compute metadata credential providers, including AWS container credentials and EC2 instance metadata, remain enabled.
- disable_ec2_metadata: NotRequired[bool]#
Disable load credential from ec2 metadata. This option is used to disable the default behavior of opendal to load credential from ec2 metadata, a.k.a., IMDSv2
- disable_list_objects_v2: NotRequired[bool]#
OpenDAL uses List Objects V2 by default to list objects. However, some legacy services do not yet support V2. This option allows users to switch back to the older List Objects V1.
- disable_stat_with_override: NotRequired[bool]#
Deprecated: S3 stat override capabilities are enabled by default. [Deprecated since 0.57.0] S3 stat override capabilities are enabled by default. Use CapabilityOverrideLayer to override them for specific endpoints.
- disable_write_with_if_match: NotRequired[bool]#
Deprecated: S3 write with If-Match capability is enabled by default. [Deprecated since 0.57.0] S3 write with If-Match capability is enabled by default and this option is no longer needed.
- enable_request_payer: NotRequired[bool]#
Indicates whether the client agrees to pay for the requests made to the S3 bucket.
- enable_versioning: NotRequired[bool]#
Deprecated: S3 versioning capability is enabled by default. [Deprecated since 0.57.0] S3 versioning capability is enabled by default and this option is no longer needed.
- enable_virtual_host_style: NotRequired[bool]#
Enable virtual host style so that opendal will send API requests in virtual host style instead of path style. - By default, opendal will send API to https://s3.us-east-1.amazonaws.com/bucket_name - Enabled, opendal will send API to https://bucket_name.s3.us-east-1.amazonaws.com
- enable_write_with_append: NotRequired[bool]#
Deprecated: S3 append capability is enabled by default. [Deprecated since 0.57.0] S3 append capability is enabled by default and this option is no longer needed.
- endpoint: NotRequired[str]#
endpoint of this backend. Endpoint must be full uri, e.g. - AWS S3: https://s3.amazonaws.com or https://s3.{region}.amazonaws.com - Cloudflare R2: https://<ACCOUNT_ID>.r2.cloudflarestorage.com - Aliyun OSS: https://{region}.aliyuncs.com - Tencent COS: https://cos.{region}.myqcloud.com - Minio: http://127.0.0.1:9000 If user inputs endpoint without scheme like “s3.amazonaws.com”, we will prepend “https://” before it. - If endpoint is set, we will take user’s input first. - If not, we will try to load it from environment. - If still not set, default to https://s3.amazonaws.com.
- profile: NotRequired[str]#
AWS profile. By default, reqsign which is the default credential provider, supplies profile in order: - explicit option - AWS_PROFILE environment variable, from which reqsign reads profile from: - ~/.aws/credentials (or the path specified by AWS_SHARED_CREDENTIALS_FILE) - ~/.aws/config (or the path specified by AWS_CONFIG_FILE)
- region: NotRequired[str]#
Region represent the signing region of this endpoint. This is required if you are using the default AWS S3 endpoint. If using a custom endpoint, - If region is set, we will take user’s input first. - If not, we will try to load it from environment.
- role_arn: NotRequired[str]#
role_arn for this backend. If role_arn is set, we will use already known config as source credential to assume role with role_arn.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend. All operations will happen under this root. default to / if not set.
- scheme: Required[Literal['s3']]#
The service scheme; fixed to “s3”.
- secret_access_key: NotRequired[str]#
secret_access_key of this backend. - If secret_access_key is set, we will take user’s input first. - If not, we will try to load it from environment.
- server_side_encryption: NotRequired[str]#
server_side_encryption for this backend. Available values: AES256, aws:kms.
- server_side_encryption_aws_kms_key_id: NotRequired[str]#
server_side_encryption_aws_kms_key_id for this backend - If server_side_encryption set to aws:kms, and server_side_encryption_aws_kms_key_id is not set, S3 will use aws managed kms key to encrypt data. - If server_side_encryption set to aws:kms, and server_side_encryption_aws_kms_key_id is a valid kms key id, S3 will use the provided kms key to encrypt data. - If the server_side_encryption_aws_kms_key_id is invalid or not found, an error will be returned. - If server_side_encryption is not aws:kms, setting server_side_encryption_aws_kms_key_id is a noop.
- server_side_encryption_bucket_key_enabled: NotRequired[bool]#
Control S3 Bucket Keys for SSE-KMS writes and copies. Omit this option to inherit the bucket setting. false disables Bucket Keys for destination objects, and true enables them.
- server_side_encryption_customer_algorithm: NotRequired[str]#
server_side_encryption_customer_algorithm for this backend. Available values: AES256.
- server_side_encryption_customer_key: NotRequired[str]#
server_side_encryption_customer_key for this backend. Value: BASE64-encoded key that matches algorithm specified in server_side_encryption_customer_algorithm.
- server_side_encryption_customer_key_md5: NotRequired[str]#
Set server_side_encryption_customer_key_md5 for this backend. Value: MD5 digest of key specified in server_side_encryption_customer_key.
- class opendal.config.ScalewayConfig#
Bases:
TypedDictConfiguration for the scaleway service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
Explicit HTTP(S) base endpoint. The default is https://s3.<region>.scw.cloud.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['scaleway']]#
The service scheme; fixed to “scaleway”.
- class opendal.config.SeafileConfig#
Bases:
TypedDictConfiguration for the seafile service.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend. All operations will happen under this root.
- scheme: Required[Literal['seafile']]#
The service scheme; fixed to “seafile”.
- class opendal.config.SeaweedfsConfig#
Bases:
TypedDictConfiguration for the seaweedfs service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- enable_virtual_host_style: NotRequired[bool]#
Use virtual-hosted-style addressing when the gateway has a matching domainName.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['seaweedfs']]#
The service scheme; fixed to “seaweedfs”.
- opendal.config.ServiceConfig = opendal.config.AkamaiConfig | opendal.config.AliyunDriveConfig | opendal.config.AlluxioConfig | opendal.config.AzblobConfig | opendal.config.AzdlsConfig | opendal.config.AzfileConfig | opendal.config.B2Config | opendal.config.B2S3Config | opendal.config.CacacheConfig | opendal.config.CephRgwConfig | opendal.config.CosConfig | opendal.config.CosS3Config | opendal.config.DashmapConfig | opendal.config.DropboxConfig | opendal.config.ExoscaleConfig | opendal.config.FoyerConfig | opendal.config.FsConfig | opendal.config.FtpConfig | opendal.config.GarageConfig | opendal.config.GcsConfig | opendal.config.GcsGrpcConfig | opendal.config.GcsS3Config | opendal.config.GdriveConfig | opendal.config.GhacConfig | opendal.config.GithubConfig | opendal.config.GridfsConfig | opendal.config.HdfsNativeConfig | opendal.config.HetznerConfig | opendal.config.HfConfig | opendal.config.HttpConfig | opendal.config.IbmCosConfig | opendal.config.IdriveE2Config | opendal.config.IonosConfig | opendal.config.IpfsConfig | opendal.config.IpmfsConfig | opendal.config.KoofrConfig | opendal.config.LakefsS3Config | opendal.config.MemcachedConfig | opendal.config.MemoryConfig | opendal.config.MiniMokaConfig | opendal.config.MinioConfig | opendal.config.MokaConfig | opendal.config.MongodbConfig | opendal.config.MysqlConfig | opendal.config.NeonConfig | opendal.config.ObsConfig | opendal.config.ObsS3Config | opendal.config.OciConfig | opendal.config.OnedriveConfig | opendal.config.OssConfig | opendal.config.OssS3Config | opendal.config.OvhcloudConfig | opendal.config.PersyConfig | opendal.config.PostgresqlConfig | opendal.config.QingstorConfig | opendal.config.R2Config | opendal.config.RedbConfig | opendal.config.RedisConfig | opendal.config.RustfsConfig | opendal.config.S3Config | opendal.config.ScalewayConfig | opendal.config.SeafileConfig | opendal.config.SeaweedfsConfig | opendal.config.SftpConfig | opendal.config.SledConfig | opendal.config.SpacesConfig | opendal.config.SqliteConfig | opendal.config.StorjConfig | opendal.config.SupabaseConfig | opendal.config.SwiftConfig | opendal.config.SwiftS3apiConfig | opendal.config.TigrisConfig | opendal.config.TosConfig | opendal.config.TosS3Config | opendal.config.UpyunConfig | opendal.config.VercelArtifactsConfig | opendal.config.WasabiConfig | opendal.config.WebdavConfig | opendal.config.WebhdfsConfig | opendal.config.YandexDiskConfig#
Discriminated union of every service configuration, keyed on scheme.
- class opendal.config.SftpConfig#
Bases:
TypedDictConfiguration for the sftp service.
- acquire_timeout: NotRequired[str | timedelta]#
Time limit for waiting for an SFTP connection pool slot. Defaults to 10 seconds. Zero disables the limit. A datetime.timedelta or human readable duration string, e.g. “5s” (see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html).
- connect_timeout: NotRequired[str | timedelta]#
Time limit for each SFTP connection setup stage and each pooled connection health check. Defaults to 10 seconds. Zero disables the limit. A datetime.timedelta or human readable duration string, e.g. “5s” (see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html).
- control_directory: NotRequired[str]#
Directory for the SSH control socket. The SSH client creates a temporary directory holding the control socket here. Defaults to $XDG_STATE_HOME or $HOME/.local/state, falling back to the current directory.
- enable_copy: NotRequired[bool]#
Deprecated: SFTP copy capability is enabled by default. [Deprecated since 0.57.0] SFTP copy capability is enabled by default and this option is no longer needed.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend
- scheme: Required[Literal['sftp']]#
The service scheme; fixed to “sftp”.
- class opendal.config.SledConfig#
Bases:
TypedDictConfiguration for the sled service.
- root: NotRequired[str | os.PathLike[str]]#
The root for sled.
- scheme: Required[Literal['sled']]#
The service scheme; fixed to “sled”.
- class opendal.config.SpacesConfig#
Bases:
TypedDictConfiguration for the spaces service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
Explicit HTTP(S) base endpoint. The default is https://<datacenter>.digitaloceanspaces.com.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['spaces']]#
The service scheme; fixed to “spaces”.
- class opendal.config.SqliteConfig#
Bases:
TypedDictConfiguration for the sqlite service.
- connection_string: NotRequired[str]#
Set the connection_string of the sqlite service. This connection string is used to connect to the sqlite service. The format of connect string resembles the url format of the sqlite client: - sqlite::memory: - sqlite:data.db - sqlite://data.db For more information, please visit <https://docs.rs/sqlx/latest/sqlx/sqlite/struct.SqliteConnectOptions.html>.
- key_field: NotRequired[str]#
Set the key field name of the sqlite service to read/write. Default to key if not specified.
- root: NotRequired[str | os.PathLike[str]]#
set the working directory, all operations will be performed under it. default: “/”
- scheme: Required[Literal['sqlite']]#
The service scheme; fixed to “sqlite”.
- class opendal.config.StorjConfig#
Bases:
TypedDictConfiguration for the storj service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['storj']]#
The service scheme; fixed to “storj”.
- class opendal.config.SupabaseConfig#
Bases:
TypedDictConfiguration for the supabase service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
Explicit HTTP(S) base endpoint. The default is https://<project_ref>.storage.supabase.co/storage/v1/s3.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['supabase']]#
The service scheme; fixed to “supabase”.
- class opendal.config.SwiftConfig#
Bases:
TypedDictConfiguration for the swift service.
- root: NotRequired[str | os.PathLike[str]]#
The root for Swift.
- scheme: Required[Literal['swift']]#
The service scheme; fixed to “swift”.
- temp_url_hash_algorithm: NotRequired[str]#
The hash algorithm for TempURL signing. Supported values: sha1, sha256, sha512. Defaults to sha256. The cluster must have the chosen algorithm in its tempurl.allowed_digests (check GET /info).
- class opendal.config.SwiftS3apiConfig#
Bases:
TypedDictConfiguration for the swift-s3api service.
- access_key_id: NotRequired[str]#
S3 access key ID, such as the access key from a Keystone EC2 credential.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- enable_virtual_host_style: NotRequired[bool]#
Use virtual-hosted-style addressing when the proxy defines a matching storage_domain.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['swift-s3api']]#
The service scheme; fixed to “swift-s3api”.
- class opendal.config.TigrisConfig#
Bases:
TypedDictConfiguration for the tigris service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['tigris']]#
The service scheme; fixed to “tigris”.
- class opendal.config.TimeoutLayerConfig#
Bases:
TypedDictConfiguration for the timeout layer.
- name: Required[Literal['timeout']]#
The layer name, fixed to
timeout.
- class opendal.config.TosConfig#
Bases:
TypedDictConfiguration for the tos service.
- access_key_id: NotRequired[str]#
access_key_id of this backend. - If access_key_id is set, we will take user’s input first. - If not, we will try to load it from environment.
- disable_config_load: NotRequired[bool]#
Disable config load so that opendal will not load config from environment. For examples: - envs like VOLCENGINE_ACCESS_KEY_ID
- endpoint: NotRequired[str]#
endpoint of this backend. Endpoint must be full uri, e.g. - TOS: https://tos-cn-beijing.volces.com - TOS with region: https://tos-{region}.volces.com If user inputs endpoint without scheme like “tos-cn-beijing.volces.com”, we will prepend “https://” before it.
- region: NotRequired[str]#
Region represent the signing region of this endpoint. Required if endpoint is not provided. - If region is set, we will take user’s input first. - If not, we will try to load it from environment. - If still not set, default to cn-beijing.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend. All operations will happen under this root. default to / if not set.
- scheme: Required[Literal['tos']]#
The service scheme; fixed to “tos”.
- secret_access_key: NotRequired[str]#
secret_access_key of this backend. - If secret_access_key is set, we will take user’s input first. - If not, we will try to load it from environment.
- class opendal.config.TosS3Config#
Bases:
TypedDictConfiguration for the tos-s3 service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: Required[str]#
HTTP(S) S3-compatible base endpoint for the selected TOS product and region.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['tos-s3']]#
The service scheme; fixed to “tos-s3”.
- class opendal.config.UpyunConfig#
Bases:
TypedDictConfiguration for the upyun service.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend. All operations will happen under this root.
- scheme: Required[Literal['upyun']]#
The service scheme; fixed to “upyun”.
- class opendal.config.VercelArtifactsConfig#
Bases:
TypedDictConfiguration for the vercel-artifacts service.
- endpoint: NotRequired[str]#
The endpoint for the Vercel artifacts API. Defaults to https://api.vercel.com.
- scheme: Required[Literal['vercel-artifacts']]#
The service scheme; fixed to “vercel-artifacts”.
- class opendal.config.WasabiConfig#
Bases:
TypedDictConfiguration for the wasabi service.
- disable_config_load: NotRequired[bool]#
Disable loading credentials from AWS environment variables and shared profile files. Set both access_key_id and secret_access_key when enabled.
- endpoint: NotRequired[str]#
Explicit HTTP(S) base endpoint. The default is the published service URL for the bucket region.
- root: NotRequired[str | os.PathLike[str]]#
Root within the bucket. The default is /.
- scheme: Required[Literal['wasabi']]#
The service scheme; fixed to “wasabi”.
- class opendal.config.WebdavConfig#
Bases:
TypedDictConfiguration for the webdav service.
- disable_copy: NotRequired[bool]#
Deprecated: WebDAV copy capability is enabled by default. [Deprecated since 0.57.0] WebDAV copy capability is enabled by default and this option is no longer needed.
- disable_create_dir: NotRequired[bool]#
Disable automatic parent directory creation before writing files. By default, OpenDAL checks for parent directories using PROPFIND and creates missing directories using MKCOL before writing files. Enable this option to skip those checks and MKCOL calls for servers such as bazel-remote. Explicit create_dir calls are unaffected. Default: false
- disable_depth_infinity: NotRequired[bool]#
Disable native recursive listing with WebDAV’s Depth: infinity. Set this to true for servers that reject or ignore infinity depth. With capability simulation enabled, OpenDAL walks the directory tree using Depth: 1 requests instead. The default is false.
- enable_conditional_read: NotRequired[bool]#
Deprecated: WebDAV conditional read capabilities are enabled by default. [Deprecated since 0.60.0] WebDAV conditional read capabilities are enabled by default. Use CapabilityOverrideLayer to override read_with_if_match, read_with_if_none_match, read_with_if_modified_since and read_with_if_unmodified_since for endpoints without ETag support.
- enable_user_metadata: NotRequired[bool]#
Deprecated: WebDAV user metadata capability is enabled by default. [Deprecated since 0.57.0] WebDAV user metadata capability is enabled by default. Use CapabilityOverrideLayer to override write_with_user_metadata for endpoints without PROPPATCH support.
- root: NotRequired[str | os.PathLike[str]]#
root of this backend
- scheme: Required[Literal['webdav']]#
The service scheme; fixed to “webdav”.
- user_metadata_prefix: NotRequired[str]#
The XML namespace prefix for user metadata properties. This prefix is used in PROPPATCH/PROPFIND XML requests. Different servers may require different prefixes. Default: “opendal”
- user_metadata_uri: NotRequired[str]#
The XML namespace URI for user metadata properties. This URI uniquely identifies the namespace for custom properties. Different servers may require different namespace URIs. For example, Nextcloud might work better with its own namespace. Default: https://opendal.apache.org/ns
- class opendal.config.WebhdfsConfig#
Bases:
TypedDictConfiguration for the webhdfs service.
- atomic_write_dir: NotRequired[str | os.PathLike[str]]#
atomic_write_dir of this backend
- root: NotRequired[str | os.PathLike[str]]#
Root for webhdfs.
- scheme: Required[Literal['webhdfs']]#
The service scheme; fixed to “webhdfs”.