Skip to content

Config#

This page documents the typed service configurations in OpenDAL.

Each service exposes a TypedDict keyed on a scheme discriminant. Build one and pass it to Operator.from_config / AsyncOperator.from_config:

1
2
3
4
from opendal import Operator
from opendal.config import S3Config

op = Operator.from_config(S3Config(scheme="s3", bucket="my-bucket"))

Typed service configurations.

Each *Config is a TypedDict describing one OpenDAL service. The scheme key is a Literal that binds the dict to its service, so a static type checker rejects a wrong scheme, a missing required key, an unknown/misspelled key, and a wrong value type.

Build a config with the call form or an annotated variable, then pass it to Operator.from_config / AsyncOperator.from_config:

1
2
3
4
5
6
7
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 every *Config; from_config accepts it, so a single signature type-checks every service.

ServiceConfig = AliyunDriveConfig | AlluxioConfig | AzblobConfig | AzdlsConfig | AzfileConfig | B2Config | CacacheConfig | CloudflareKvConfig | CosConfig | DashmapConfig | DropboxConfig | FsConfig | FtpConfig | GcsConfig | GdriveConfig | GhacConfig | GridfsConfig | HdfsNativeConfig | HfConfig | HttpConfig | IpfsConfig | IpmfsConfig | KoofrConfig | MemcachedConfig | MemoryConfig | MiniMokaConfig | MokaConfig | MongodbConfig | MysqlConfig | ObsConfig | OnedriveConfig | OssConfig | PersyConfig | PostgresqlConfig | RedbConfig | RedisConfig | S3Config | SeafileConfig | SftpConfig | SledConfig | SqliteConfig | SwiftConfig | TosConfig | UpyunConfig | VercelArtifactsConfig | VercelBlobConfig | WebdavConfig | WebhdfsConfig | YandexDiskConfig module-attribute #

Discriminated union of every service configuration, keyed on scheme.

AliyunDriveConfig #

Bases: TypedDict

Configuration for the aliyun-drive service.

access_token instance-attribute #

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 instance-attribute #

The client_id of this backend. Required if no access_token is provided.

client_secret instance-attribute #

The client_secret of this backend. Required if no access_token is provided.

drive_type instance-attribute #

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 instance-attribute #

The refresh_token of this backend. Required if no access_token is provided.

root instance-attribute #

The Root of this backend. All operations will happen under this root. Default to / if not set.

scheme instance-attribute #

The service scheme; fixed to "aliyun-drive".

AlluxioConfig #

Bases: TypedDict

Configuration for the alluxio service.

endpoint instance-attribute #

endpoint of this backend. Endpoint must be full uri, mostly like http://127.0.0.1:39999.

root instance-attribute #

root of this backend. All operations will happen under this root. default to / if not set.

scheme instance-attribute #

The service scheme; fixed to "alluxio".

AzblobConfig #

Bases: TypedDict

Configuration for the azblob service.

account_key instance-attribute #

The account key of Azblob service backend.

account_name instance-attribute #

The account name of Azblob service backend.

batch_max_operations instance-attribute #

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.

container instance-attribute #

The container name of Azblob service backend.

encryption_algorithm instance-attribute #

The encryption algorithm of Azblob service backend.

encryption_key instance-attribute #

The encryption key of Azblob service backend.

encryption_key_sha256 instance-attribute #

The encryption key sha256 of Azblob service backend.

endpoint instance-attribute #

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 instance-attribute #

The root of Azblob service backend. All operations will happen under this root.

sas_token instance-attribute #

The sas token of Azblob service backend.

scheme instance-attribute #

The service scheme; fixed to "azblob".

skip_signature instance-attribute #

Skip signature will skip loading credentials and signing requests.

AzdlsConfig #

Bases: TypedDict

Configuration for the azdls service.

account_key instance-attribute #

Account key of this backend. - required for shared_key authentication

account_name instance-attribute #

Account name of this backend.

authority_host instance-attribute #

authority_host The authority host of the service principal. - required for client_credentials authentication - default value: https://login.microsoftonline.com

client_id instance-attribute #

client_id The client id of the service principal. - required for client_credentials authentication

client_secret instance-attribute #

client_secret The client secret of the service principal. - required for client_credentials authentication

enable_hns instance-attribute #

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

endpoint instance-attribute #

Endpoint of this backend.

filesystem instance-attribute #

Filesystem name of this backend.

root instance-attribute #

Root of this backend.

sas_token instance-attribute #

sas_token The shared access signature token. - required for sas authentication

scheme instance-attribute #

The service scheme; fixed to "azdls".

tenant_id instance-attribute #

tenant_id The tenant id of the service principal. - required for client_credentials authentication

AzfileConfig #

Bases: TypedDict

Configuration for the azfile service.

account_key instance-attribute #

The account key for azfile.

account_name instance-attribute #

The account name for azfile.

endpoint instance-attribute #

The endpoint for azfile.

root instance-attribute #

The root path for azfile.

sas_token instance-attribute #

The sas token for azfile.

scheme instance-attribute #

The service scheme; fixed to "azfile".

share_name instance-attribute #

The share name for azfile.

B2Config #

Bases: TypedDict

Configuration for the b2 service.

application_key instance-attribute #

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 instance-attribute #

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.

bucket instance-attribute #

bucket of this backend. required.

bucket_id instance-attribute #

bucket id of this backend. required.

root instance-attribute #

root of this backend. All operations will happen under this root.

scheme instance-attribute #

The service scheme; fixed to "b2".

CacacheConfig #

Bases: TypedDict

Configuration for the cacache service.

datadir instance-attribute #

That path to the cacache data directory.

scheme instance-attribute #

The service scheme; fixed to "cacache".

CloudflareKvConfig #

Bases: TypedDict

Configuration for the cloudflare-kv service.

account_id instance-attribute #

The account ID used to authenticate with CloudFlare. Used as URI path parameter.

api_token instance-attribute #

The token used to authenticate with CloudFlare.

default_ttl instance-attribute #

The default ttl for write operations. A human readable duration string, e.g. "5s" (see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html).

namespace_id instance-attribute #

The namespace ID. Used as URI path parameter.

root instance-attribute #

Root within this backend.

scheme instance-attribute #

The service scheme; fixed to "cloudflare-kv".

CosConfig #

Bases: TypedDict

Configuration for the cos service.

bucket instance-attribute #

Bucket of this backend.

disable_config_load instance-attribute #

Disable config load so that opendal will not load config from

enable_versioning instance-attribute #

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.

endpoint instance-attribute #

Endpoint of this backend.

root instance-attribute #

Root of this backend.

scheme instance-attribute #

The service scheme; fixed to "cos".

secret_id instance-attribute #

Secret ID of this backend.

secret_key instance-attribute #

Secret key of this backend.

security_token instance-attribute #

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).

DashmapConfig #

Bases: TypedDict

Configuration for the dashmap service.

root instance-attribute #

root path of this backend

scheme instance-attribute #

The service scheme; fixed to "dashmap".

DropboxConfig #

Bases: TypedDict

Configuration for the dropbox service.

access_token instance-attribute #

access token for dropbox.

client_id instance-attribute #

client_id for dropbox.

client_secret instance-attribute #

client_secret for dropbox.

refresh_token instance-attribute #

refresh_token for dropbox.

root instance-attribute #

root path for dropbox.

scheme instance-attribute #

The service scheme; fixed to "dropbox".

FsConfig #

Bases: TypedDict

Configuration for the fs service.

atomic_write_dir instance-attribute #

tmp dir for atomic write

root instance-attribute #

root dir for backend

scheme instance-attribute #

The service scheme; fixed to "fs".

FtpConfig #

Bases: TypedDict

Configuration for the ftp service.

endpoint instance-attribute #

endpoint of this backend

password instance-attribute #

password of this backend

root instance-attribute #

root of this backend

scheme instance-attribute #

The service scheme; fixed to "ftp".

user instance-attribute #

user of this backend

GcsConfig #

Bases: TypedDict

Configuration for the gcs service.

allow_anonymous instance-attribute #

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

bucket instance-attribute #

bucket name

credential instance-attribute #

Credentials string for GCS service OAuth2 authentication.

credential_path instance-attribute #

Local path to credentials file for GCS service OAuth2 authentication.

default_storage_class instance-attribute #

The default storage class used by gcs.

disable_config_load instance-attribute #

Disable loading configuration from the environment.

disable_vm_metadata instance-attribute #

Disable attempting to load credentials from the GCE metadata server when running within Google Cloud.

endpoint instance-attribute #

endpoint URI of GCS service, default is https://storage.googleapis.com

predefined_acl instance-attribute #

The predefined acl for GCS.

root instance-attribute #

root URI, all operations happens under root

scheme instance-attribute #

The service scheme; fixed to "gcs".

scope instance-attribute #

Scope for gcs.

service_account instance-attribute #

Service Account for gcs.

skip_signature instance-attribute #

Skip signature will skip loading credentials and signing requests.

token instance-attribute #

A Google Cloud OAuth2 token. Takes precedence over credential and credential_path.

GdriveConfig #

Bases: TypedDict

Configuration for the gdrive service.

access_token instance-attribute #

Access token for gdrive.

client_id instance-attribute #

Client id for gdrive.

client_secret instance-attribute #

Client secret for gdrive.

refresh_token instance-attribute #

Refresh token for gdrive.

root instance-attribute #

The root for gdrive

scheme instance-attribute #

The service scheme; fixed to "gdrive".

GhacConfig #

Bases: TypedDict

Configuration for the ghac service.

endpoint instance-attribute #

The endpoint for ghac service.

root instance-attribute #

The root path for ghac.

runtime_token instance-attribute #

The runtime token for ghac service.

scheme instance-attribute #

The service scheme; fixed to "ghac".

version instance-attribute #

The version that used by cache.

GridfsConfig #

Bases: TypedDict

Configuration for the gridfs service.

bucket instance-attribute #

The bucket name of the MongoDB GridFs service to read/write.

chunk_size instance-attribute #

The chunk size of the MongoDB GridFs service used to break the user file into chunks.

connection_string instance-attribute #

The connection string of the MongoDB service.

database instance-attribute #

The database name of the MongoDB GridFs service to read/write.

root instance-attribute #

The working directory, all operations will be performed under it.

scheme instance-attribute #

The service scheme; fixed to "gridfs".

HdfsNativeConfig #

Bases: TypedDict

Configuration for the hdfs-native service.

enable_append instance-attribute #

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.

name_node instance-attribute #

name_node of this backend

options instance-attribute #

other options for hdfs client

root instance-attribute #

work dir of this backend

scheme instance-attribute #

The service scheme; fixed to "hdfs-native".

HfConfig #

Bases: TypedDict

Configuration for the hf service.

download_mode instance-attribute #

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.

endpoint instance-attribute #

Endpoint of the Hugging Face Hub. Default is "https://huggingface.co".

repo_id instance-attribute #

Repo id of this backend. This is required.

repo_type instance-attribute #

Repo type of this backend. Required.

revision instance-attribute #

Revision of this backend. Default is main.

root instance-attribute #

Root of this backend. Can be "/path/to/dir". Default is "/".

scheme instance-attribute #

The service scheme; fixed to "hf".

token instance-attribute #

Token of this backend. This is optional.

HttpConfig #

Bases: TypedDict

Configuration for the http service.

endpoint instance-attribute #

endpoint of this backend

password instance-attribute #

password of this backend

root instance-attribute #

root of this backend

scheme instance-attribute #

The service scheme; fixed to "http".

token instance-attribute #

token of this backend

username instance-attribute #

username of this backend

IpfsConfig #

Bases: TypedDict

Configuration for the ipfs service.

endpoint instance-attribute #

IPFS gateway endpoint.

root instance-attribute #

IPFS root.

scheme instance-attribute #

The service scheme; fixed to "ipfs".

IpmfsConfig #

Bases: TypedDict

Configuration for the ipmfs service.

endpoint instance-attribute #

Endpoint for ipfs.

root instance-attribute #

Root for ipfs.

scheme instance-attribute #

The service scheme; fixed to "ipmfs".

KoofrConfig #

Bases: TypedDict

Configuration for the koofr service.

email instance-attribute #

Koofr email.

endpoint instance-attribute #

Koofr endpoint.

password instance-attribute #

password of this backend. (Must be the application password)

root instance-attribute #

root of this backend. All operations will happen under this root.

scheme instance-attribute #

The service scheme; fixed to "koofr".

MemcachedConfig #

Bases: TypedDict

Configuration for the memcached service.

connection_pool_max_size instance-attribute #

The maximum number of connections allowed. default is 10

default_ttl instance-attribute #

The default ttl for put operations. A human readable duration string, e.g. "5s" (see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html).

endpoint instance-attribute #

network address of the memcached service. For example: "tcp://localhost:11211"

password instance-attribute #

Memcached password, optional.

root instance-attribute #

the working directory of the service. Can be "/path/to/dir" default is "/"

scheme instance-attribute #

The service scheme; fixed to "memcached".

username instance-attribute #

Memcached username, optional.

MemoryConfig #

Bases: TypedDict

Configuration for the memory service.

root instance-attribute #

root of the backend.

scheme instance-attribute #

The service scheme; fixed to "memory".

MiniMokaConfig #

Bases: TypedDict

Configuration for the mini-moka service.

max_capacity instance-attribute #

Sets the max capacity of the cache. Refer to mini-moka::sync::CacheBuilder::max_capacity

root instance-attribute #

root path of this backend

scheme instance-attribute #

The service scheme; fixed to "mini-moka".

time_to_idle instance-attribute #

Sets the time to idle of the cache. Refer to mini-moka::sync::CacheBuilder::time_to_idle

time_to_live instance-attribute #

Sets the time to live of the cache. Refer to mini-moka::sync::CacheBuilder::time_to_live

MokaConfig #

Bases: TypedDict

Configuration for the moka service.

max_capacity instance-attribute #

Sets the max capacity of the cache. Refer to moka::future::CacheBuilder::max_capacity

name instance-attribute #

Name for this cache instance.

root instance-attribute #

root path of this backend

scheme instance-attribute #

The service scheme; fixed to "moka".

time_to_idle instance-attribute #

Sets the time to idle of the cache. Refer to moka::future::CacheBuilder::time_to_idle

time_to_live instance-attribute #

Sets the time to live of the cache. Refer to moka::future::CacheBuilder::time_to_live

MongodbConfig #

Bases: TypedDict

Configuration for the mongodb service.

collection instance-attribute #

collection of this backend

connection_string instance-attribute #

connection string of this backend

database instance-attribute #

database of this backend

key_field instance-attribute #

key field of this backend

root instance-attribute #

root of this backend

scheme instance-attribute #

The service scheme; fixed to "mongodb".

value_field instance-attribute #

value field of this backend

MysqlConfig #

Bases: TypedDict

Configuration for the mysql service.

connection_string instance-attribute #

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.

key_field instance-attribute #

The key field name for mysql.

root instance-attribute #

The root for mysql.

scheme instance-attribute #

The service scheme; fixed to "mysql".

table instance-attribute #

The table name for mysql.

value_field instance-attribute #

The value field name for mysql.

ObsConfig #

Bases: TypedDict

Configuration for the obs service.

access_key_id instance-attribute #

Access key id for obs.

bucket instance-attribute #

Bucket for obs.

enable_versioning instance-attribute #

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.

endpoint instance-attribute #

Endpoint for obs.

root instance-attribute #

Root for obs.

scheme instance-attribute #

The service scheme; fixed to "obs".

secret_access_key instance-attribute #

Secret access key for obs.

OnedriveConfig #

Bases: TypedDict

Configuration for the onedrive service.

access_token instance-attribute #

Microsoft Graph API (also OneDrive API) access token

client_id instance-attribute #

Microsoft Graph API Application (client) ID that is in the Azure's app registration portal

client_secret instance-attribute #

Microsoft Graph API Application client secret that is in the Azure's app registration portal

enable_versioning instance-attribute #

Deprecated: OneDrive versioning capability is enabled by default. [Deprecated since 0.57.0] OneDrive versioning capability is enabled by default and this option is no longer needed.

refresh_token instance-attribute #

Microsoft Graph API (also OneDrive API) refresh token

root instance-attribute #

The root path for the OneDrive service for the file access

scheme instance-attribute #

The service scheme; fixed to "onedrive".

OssConfig #

Bases: TypedDict

Configuration for the oss service.

access_key_id instance-attribute #

Access key id for oss. - this field if it's is_some - env value: ALIBABA_CLOUD_ACCESS_KEY_ID

access_key_secret instance-attribute #

Access key secret for oss. - this field if it's is_some - env value: ALIBABA_CLOUD_ACCESS_KEY_SECRET

addressing_style instance-attribute #

Addressing style for oss.

allow_anonymous instance-attribute #

Allow anonymous for oss. [Deprecated since 0.57.0] Please use skip_signature instead of allow_anonymous

batch_max_operations instance-attribute #

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.

bucket instance-attribute #

Bucket for oss.

delete_max_size instance-attribute #

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.

enable_versioning instance-attribute #

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.

endpoint instance-attribute #

Endpoint for oss.

external_id instance-attribute #

external_id for this backend.

oidc_provider_arn instance-attribute #

oidc_provider_arn will be loaded from - this field if it's is_some - env value: ALIBABA_CLOUD_OIDC_PROVIDER_ARN

oidc_token_file instance-attribute #

oidc_token_file will be loaded from - this field if it's is_some - env value: ALIBABA_CLOUD_OIDC_TOKEN_FILE

presign_addressing_style instance-attribute #

Pre sign addressing style for oss.

presign_endpoint instance-attribute #

Presign endpoint for oss.

role_arn instance-attribute #

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

role_session_name instance-attribute #

role_session_name for this backend.

root instance-attribute #

Root for oss.

scheme instance-attribute #

The service scheme; fixed to "oss".

security_token instance-attribute #

security_token will be loaded from - this field if it's is_some - env value: ALIBABA_CLOUD_SECURITY_TOKEN

server_side_encryption instance-attribute #

Server side encryption for oss.

server_side_encryption_key_id instance-attribute #

Server side encryption key id for oss.

skip_signature instance-attribute #

Skip signature will skip loading credentials and signing requests.

sts_endpoint instance-attribute #

sts_endpoint will be loaded from - this field if it's is_some - env value: ALIBABA_CLOUD_STS_ENDPOINT

PersyConfig #

Bases: TypedDict

Configuration for the persy service.

datafile instance-attribute #

That path to the persy data file. The directory in the path must already exist.

index instance-attribute #

That name of the persy index.

scheme instance-attribute #

The service scheme; fixed to "persy".

segment instance-attribute #

That name of the persy segment.

PostgresqlConfig #

Bases: TypedDict

Configuration for the postgresql service.

connection_string instance-attribute #

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.

key_field instance-attribute #

the key field of postgresql

root instance-attribute #

Root of this backend. All operations will happen under this root. Default to / if not set.

scheme instance-attribute #

The service scheme; fixed to "postgresql".

table instance-attribute #

the table of postgresql

value_field instance-attribute #

the value field of postgresql

RedbConfig #

Bases: TypedDict

Configuration for the redb service.

datadir instance-attribute #

path to the redb data directory.

root instance-attribute #

The root for redb.

scheme instance-attribute #

The service scheme; fixed to "redb".

table instance-attribute #

The table name for redb.

RedisConfig #

Bases: TypedDict

Configuration for the redis service.

cluster_endpoints instance-attribute #

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 instance-attribute #

The maximum number of connections allowed. default is 10

db instance-attribute #

the number of DBs redis can take is unlimited default is db 0

default_ttl instance-attribute #

The default ttl for put operations. A human readable duration string, e.g. "5s" (see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html).

endpoint instance-attribute #

network address of the Redis service. Can be "tcp://127.0.0.1:6379", e.g. default is "tcp://127.0.0.1:6379"

password instance-attribute #

the password for authentication default is None

root instance-attribute #

the working directory of the Redis service. Can be "/path/to/dir" default is "/"

scheme instance-attribute #

The service scheme; fixed to "redis".

username instance-attribute #

the username to connect redis service. default is None

S3Config #

Bases: TypedDict

Configuration for the s3 service.

access_key_id instance-attribute #

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 instance-attribute #

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

assume_role_duration_seconds instance-attribute #

assume_role_duration_seconds for this backend.

assume_role_session_tags instance-attribute #

assume_role_session_tags for this backend.

batch_max_operations instance-attribute #

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.

bucket instance-attribute #

bucket name of this backend. required.

checksum_algorithm instance-attribute #

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"

default_acl instance-attribute #

Default ACL for new objects. Note that some s3 services like minio do not support this option.

default_storage_class instance-attribute #

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 instance-attribute #

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 instance-attribute #

Disable config load so that opendal will not load config from environment. For examples: - envs like AWS_ACCESS_KEY_ID - files like ~/.aws/config

disable_ec2_metadata instance-attribute #

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 instance-attribute #

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 instance-attribute #

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 instance-attribute #

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 instance-attribute #

Indicates whether the client agrees to pay for the requests made to the S3 bucket.

enable_versioning instance-attribute #

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 instance-attribute #

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 instance-attribute #

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 instance-attribute #

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.

external_id instance-attribute #

external_id for this backend.

region instance-attribute #

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 instance-attribute #

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.

role_session_name instance-attribute #

role_session_name for this backend.

root instance-attribute #

root of this backend. All operations will happen under this root. default to / if not set.

scheme instance-attribute #

The service scheme; fixed to "s3".

secret_access_key instance-attribute #

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 instance-attribute #

server_side_encryption for this backend. Available values: AES256, aws:kms.

server_side_encryption_aws_kms_key_id instance-attribute #

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_customer_algorithm instance-attribute #

server_side_encryption_customer_algorithm for this backend. Available values: AES256.

server_side_encryption_customer_key instance-attribute #

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 instance-attribute #

Set server_side_encryption_customer_key_md5 for this backend. Value: MD5 digest of key specified in server_side_encryption_customer_key.

session_token instance-attribute #

session_token (aka, security token) of this backend. This token will expire after sometime, it's recommended to set session_token by hand.

skip_signature instance-attribute #

Skip signature will skip loading credentials and signing requests.

SeafileConfig #

Bases: TypedDict

Configuration for the seafile service.

endpoint instance-attribute #

endpoint address of this backend.

password instance-attribute #

password of this backend.

repo_name instance-attribute #

repo_name of this backend. required.

root instance-attribute #

root of this backend. All operations will happen under this root.

scheme instance-attribute #

The service scheme; fixed to "seafile".

username instance-attribute #

username of this backend.

SftpConfig #

Bases: TypedDict

Configuration for the sftp service.

enable_copy instance-attribute #

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.

endpoint instance-attribute #

endpoint of this backend

key instance-attribute #

key of this backend

known_hosts_strategy instance-attribute #

known_hosts_strategy of this backend

root instance-attribute #

root of this backend

scheme instance-attribute #

The service scheme; fixed to "sftp".

user instance-attribute #

user of this backend

SledConfig #

Bases: TypedDict

Configuration for the sled service.

datadir instance-attribute #

That path to the sled data directory.

root instance-attribute #

The root for sled.

scheme instance-attribute #

The service scheme; fixed to "sled".

tree instance-attribute #

The tree for sled.

SqliteConfig #

Bases: TypedDict

Configuration for the sqlite service.

connection_string instance-attribute #

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 instance-attribute #

Set the key field name of the sqlite service to read/write. Default to key if not specified.

root instance-attribute #

set the working directory, all operations will be performed under it. default: "/"

scheme instance-attribute #

The service scheme; fixed to "sqlite".

table instance-attribute #

Set the table name of the sqlite service to read/write.

value_field instance-attribute #

Set the value field name of the sqlite service to read/write. Default to value if not specified.

SwiftConfig #

Bases: TypedDict

Configuration for the swift service.

container instance-attribute #

The container for Swift.

endpoint instance-attribute #

The endpoint for Swift.

root instance-attribute #

The root for Swift.

scheme instance-attribute #

The service scheme; fixed to "swift".

temp_url_hash_algorithm instance-attribute #

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).

temp_url_key instance-attribute #

The TempURL key for generating presigned URLs. This corresponds to the X-Account-Meta-Temp-URL-Key or X-Container-Meta-Temp-URL-Key header value configured on the Swift account or container.

token instance-attribute #

The token for Swift.

TosConfig #

Bases: TypedDict

Configuration for the tos service.

access_key_id instance-attribute #

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.

bucket instance-attribute #

bucket name of this backend. required.

disable_config_load instance-attribute #

Disable config load so that opendal will not load config from environment. For examples: - envs like TOS_ACCESS_KEY_ID

endpoint instance-attribute #

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 instance-attribute #

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 instance-attribute #

root of this backend. All operations will happen under this root. default to / if not set.

scheme instance-attribute #

The service scheme; fixed to "tos".

secret_access_key instance-attribute #

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.

security_token instance-attribute #

security_token of this backend. This token will expire after sometime, it's recommended to set security_token by hand.

skip_signature instance-attribute #

Skip signature will skip loading credentials and signing requests.

UpyunConfig #

Bases: TypedDict

Configuration for the upyun service.

bucket instance-attribute #

bucket address of this backend.

operator instance-attribute #

username of this backend.

password instance-attribute #

password of this backend.

root instance-attribute #

root of this backend. All operations will happen under this root.

scheme instance-attribute #

The service scheme; fixed to "upyun".

VercelArtifactsConfig #

Bases: TypedDict

Configuration for the vercel-artifacts service.

access_token instance-attribute #

The access token for Vercel.

endpoint instance-attribute #

The endpoint for the Vercel artifacts API. Defaults to https://api.vercel.com.

scheme instance-attribute #

The service scheme; fixed to "vercel-artifacts".

team_id instance-attribute #

The Vercel team ID. When set, the teamId query parameter is appended to all API requests.

team_slug instance-attribute #

The Vercel team slug. When set, the slug query parameter is appended to all API requests.

VercelBlobConfig #

Bases: TypedDict

Configuration for the vercel-blob service.

root instance-attribute #

root of this backend. All operations will happen under this root.

scheme instance-attribute #

The service scheme; fixed to "vercel-blob".

token instance-attribute #

vercel blob token.

WebdavConfig #

Bases: TypedDict

Configuration for the webdav service.

disable_copy instance-attribute #

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 instance-attribute #

Disable automatic parent directory creation before write operations. By default, OpenDAL creates parent directories using MKCOL before writing files. This requires PROPFIND support to check directory existence. Some WebDAV-compatible servers (e.g., bazel-remote) don't support PROPFIND or don't require explicit directory creation. Enable this option to skip the MKCOL calls and write files directly. Default: false

enable_conditional_read instance-attribute #

Enable conditional read support. When enabled (the default), OpenDAL forwards the RFC 7232 headers If-Match, If-None-Match, If-Modified-Since and If-Unmodified-Since to the server when callers provide them. Some WebDAV-compatible servers (e.g., nginx-dav) don't return ETags in PROPFIND or don't honor these headers on GET. Setting this to false drops the four read_with_if_* capabilities, so calls like reader_with(path).if_match(...) return ErrorKind::Unsupported locally instead of being silently ignored by the server. Default: true

enable_user_metadata instance-attribute #

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.

endpoint instance-attribute #

endpoint of this backend

password instance-attribute #

password of this backend

root instance-attribute #

root of this backend

scheme instance-attribute #

The service scheme; fixed to "webdav".

token instance-attribute #

token of this backend

user_metadata_prefix instance-attribute #

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 instance-attribute #

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

username instance-attribute #

username of this backend

WebhdfsConfig #

Bases: TypedDict

Configuration for the webhdfs service.

atomic_write_dir instance-attribute #

atomic_write_dir of this backend

delegation instance-attribute #

Delegation token for webhdfs.

disable_list_batch instance-attribute #

Disable batch listing

endpoint instance-attribute #

Endpoint for webhdfs.

root instance-attribute #

Root for webhdfs.

scheme instance-attribute #

The service scheme; fixed to "webhdfs".

user_name instance-attribute #

Name of the user for webhdfs.

YandexDiskConfig #

Bases: TypedDict

Configuration for the yandex-disk service.

access_token instance-attribute #

yandex disk oauth access_token.

root instance-attribute #

root of this backend. All operations will happen under this root.

scheme instance-attribute #

The service scheme; fixed to "yandex-disk".