diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 9b4ad00b947e..3e2cecf0fca8 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -49,106 +49,135 @@ default = [ # When enable or disable some features, # Also, you need to update the `enabled_service` function in dev/src/generate/python.rs to match it. services-all = [ - "default", - "services-aliyun-drive", - "services-azfile", - "services-cacache", - "services-dashmap", - "services-dropbox", - # FIXME this service need protoc - # "services-etcd", - # FIXME this requires a preinstalled fdb library - # "services-foundationdb", - # "services-ftp", - "services-gdrive", - # FIXME how to support HDFS services in bindings? - # "services-hdfs", - # "services-hdfs-native", - "services-huggingface", - "services-ipfs", - "services-memcached", - "services-mini-moka", - "services-moka", - "services-onedrive", - "services-persy", - "services-postgresql", - "services-mysql", - "services-redb", - "services-redis", - # FIXME how to support rocksdb services in bindings? - # "services-rocksdb", - "services-sled", - "services-swift", - # FIXME this service need protoc - # "services-tikv", - "services-vercel-artifacts", - "services-mongodb", - "services-gridfs", - "services-sqlite", - "services-alluxio", - "services-b2", - "services-seafile", - "services-upyun", - "services-koofr", - "services-yandex-disk", + 'default', + 'services-aliyun-drive', + 'services-alluxio', + 'services-azfile', + 'services-b2', + 'services-cacache', + 'services-dashmap', + 'services-dropbox', + 'services-ftp', + 'services-gdrive', + 'services-gridfs', + 'services-hdfs-native', + 'services-huggingface', + 'services-ipfs', + 'services-koofr', + 'services-memcached', + 'services-mini-moka', + 'services-moka', + 'services-mongodb', + 'services-mysql', + 'services-onedrive', + 'services-persy', + 'services-postgresql', + 'services-redb', + 'services-redis', + 'services-seafile', + 'services-sftp', + 'services-sled', + 'services-sqlite', + 'services-swift', + 'services-upyun', + 'services-vercel-artifacts', + 'services-yandex-disk', ] -# Default services provided by opendal. +# List of feature-flags for all services provided by opendal. services-aliyun-drive = ["opendal/services-aliyun-drive"] +services-alluxio = ["opendal/services-alluxio"] services-azblob = ["opendal/services-azblob"] services-azdls = ["opendal/services-azdls"] -services-cos = ["opendal/services-cos"] -services-fs = ["opendal/services-fs"] -services-gcs = ["opendal/services-gcs"] -services-ghac = ["opendal/services-ghac"] -services-http = ["opendal/services-http"] -services-ipmfs = ["opendal/services-ipmfs"] -services-memory = ["opendal/services-memory"] -services-obs = ["opendal/services-obs"] -services-oss = ["opendal/services-oss"] -services-s3 = ["opendal/services-s3"] -services-webdav = ["opendal/services-webdav"] -services-webhdfs = ["opendal/services-webhdfs"] - -# Optional services provided by opendal. -services-alluxio = ["opendal/services-alluxio"] services-azfile = ["opendal/services-azfile"] services-b2 = ["opendal/services-b2"] services-cacache = ["opendal/services-cacache"] -services-compfs = ["opendal/services-compfs"] +services-cloudflare-kv = [ + "opendal/services-cloudflare-kv", +] # FIXME EXCLUDED: Needs tests/ maintenance +services-compfs = [ + "opendal/services-compfs", +] # FIXME EXCLUDED: Needs tests/ maintenance +services-cos = ["opendal/services-cos"] +services-d1 = ["opendal/services-d1"] # FIXME EXCLUDED: Needs tests/ maintenance services-dashmap = ["opendal/services-dashmap"] +services-dbfs = [ + "opendal/services-dbfs", +] # FIXME EXCLUDED: Needs tests/ maintenance services-dropbox = ["opendal/services-dropbox"] -services-etcd = ["opendal/services-etcd"] -services-foundationdb = ["opendal/services-foundationdb"] +services-etcd = [ + "opendal/services-etcd", +] # FIXME EXCLUDED: this service needs protoc +services-foundationdb = [ + "opendal/services-foundationdb", +] # FIXME EXCLUDED: this service needs preinstalled fdb library +services-fs = ["opendal/services-fs"] services-ftp = ["opendal/services-ftp"] +services-gcs = ["opendal/services-gcs"] services-gdrive = ["opendal/services-gdrive"] +services-ghac = ["opendal/services-ghac"] +services-github = [ + "opendal/services-github", +] # FIXME EXCLUDED: Needs tests/ maintenance services-gridfs = ["opendal/services-gridfs"] -services-hdfs = ["opendal/services-hdfs"] +services-hdfs = [ + "opendal/services-hdfs", +] # FIXME EXCLUDED: how to support HDFS services in bindings? services-hdfs-native = ["opendal/services-hdfs-native"] +services-http = ["opendal/services-http"] services-huggingface = ["opendal/services-huggingface"] services-ipfs = ["opendal/services-ipfs"] +services-ipmfs = ["opendal/services-ipmfs"] services-koofr = ["opendal/services-koofr"] +services-lakefs = [ + "opendal/services-lakefs", +] # FIXME EXCLUDED: Needs tests/ maintenance services-memcached = ["opendal/services-memcached"] +services-memory = ["opendal/services-memory"] services-mini-moka = ["opendal/services-mini-moka"] services-moka = ["opendal/services-moka"] services-mongodb = ["opendal/services-mongodb"] -services-monoiofs = ["opendal/services-monoiofs"] +services-monoiofs = [ + "opendal/services-monoiofs", +] # FIXME EXCLUDED: Needs tests/ maintenance services-mysql = ["opendal/services-mysql"] +services-obs = ["opendal/services-obs"] services-onedrive = ["opendal/services-onedrive"] +services-opfs = [ + "opendal/services-opfs", +] # FIXME EXCLUDED: Needs tests/ maintenance +services-oss = ["opendal/services-oss"] +services-pcloud = [ + "opendal/services-pcloud", +] # FIXME EXCLUDED: Needs tests/ maintenance services-persy = ["opendal/services-persy"] services-postgresql = ["opendal/services-postgresql"] services-redb = ["opendal/services-redb"] -services-redis = ["opendal/services-redis"] -services-rocksdb = ["opendal/services-rocksdb"] +services-redis = ["opendal/services-redis", "opendal/services-redis-native-tls"] +services-rocksdb = [ + "opendal/services-rocksdb", +] # FIXME EXCLUDED: how to support rocksdb services in bindings? +services-s3 = ["opendal/services-s3"] services-seafile = ["opendal/services-seafile"] services-sftp = ["opendal/services-sftp"] services-sled = ["opendal/services-sled"] services-sqlite = ["opendal/services-sqlite"] +services-surrealdb = [ + "opendal/services-surrealdb", +] # FIXME EXCLUDED: Needs tests/ maintenance services-swift = ["opendal/services-swift"] -services-tikv = ["opendal/services-tikv"] +services-tikv = [ + "opendal/services-tikv", +] # FIXME EXCLUDED: this service needs protoc services-upyun = ["opendal/services-upyun"] services-vercel-artifacts = ["opendal/services-vercel-artifacts"] +services-vercel-blob = [ + "opendal/services-vercel-blob", +] # FIXME EXCLUDED: Needs tests/ maintenance +services-webdav = ["opendal/services-webdav"] +services-webhdfs = ["opendal/services-webhdfs"] services-yandex-disk = ["opendal/services-yandex-disk"] + # we build cp311-abi3 and cp310 wheels now, move this to pyo3 after we drop cp310 abi3 = ["pyo3/abi3-py311"] diff --git a/bindings/python/python/opendal/operator.pyi b/bindings/python/python/opendal/operator.pyi index a0259da7f7f7..94b2b6b8b59b 100644 --- a/bindings/python/python/opendal/operator.pyi +++ b/bindings/python/python/opendal/operator.pyi @@ -78,30 +78,30 @@ class AsyncOperator: scheme: opendal.services.Scheme.Webhdfs | typing.Literal["webhdfs"], /, *, - root: builtins.str = ..., - endpoint: builtins.str = ..., - user_name: builtins.str = ..., + atomic_write_dir: builtins.str = ..., delegation: builtins.str = ..., disable_list_batch: builtins.bool = ..., - atomic_write_dir: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., + user_name: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `webhdfs` service. Parameters ---------- - root : builtins.str, optional - Root for webhdfs. - endpoint : builtins.str, optional - Endpoint for webhdfs. - user_name : builtins.str, optional - Name of the user for webhdfs. + atomic_write_dir : builtins.str, optional + atomic_write_dir of this backend delegation : builtins.str, optional Delegation token for webhdfs. disable_list_batch : builtins.bool, optional Disable batch listing - atomic_write_dir : builtins.str, optional - atomic_write_dir of this backend + endpoint : builtins.str, optional + Endpoint for webhdfs. + root : builtins.str, optional + Root for webhdfs. + user_name : builtins.str, optional + Name of the user for webhdfs. Returns ------- @@ -114,30 +114,30 @@ class AsyncOperator: scheme: opendal.services.Scheme.Webdav | typing.Literal["webdav"], /, *, + disable_copy: builtins.bool = ..., endpoint: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., - token: builtins.str = ..., root: builtins.str = ..., - disable_copy: builtins.bool = ..., + token: builtins.str = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `webdav` service. Parameters ---------- + disable_copy : builtins.bool, optional + WebDAV Service doesn't support copy. endpoint : builtins.str, optional endpoint of this backend - username : builtins.str, optional - username of this backend password : builtins.str, optional password of this backend - token : builtins.str, optional - token of this backend root : builtins.str, optional root of this backend - disable_copy : builtins.bool, optional - WebDAV Service doesn't support copy. + token : builtins.str, optional + token of this backend + username : builtins.str, optional + username of this backend Returns ------- @@ -173,9 +173,9 @@ class AsyncOperator: /, *, bucket: builtins.str, - root: builtins.str = ..., operator: builtins.str = ..., password: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `upyun` service. @@ -184,13 +184,13 @@ class AsyncOperator: ---------- bucket : builtins.str bucket address of this backend. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. operator : builtins.str, optional username of this backend. password : builtins.str, optional password of this backend. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. Returns ------- @@ -203,8 +203,8 @@ class AsyncOperator: scheme: opendal.services.Scheme.Swift | typing.Literal["swift"], /, *, - endpoint: builtins.str = ..., container: builtins.str = ..., + endpoint: builtins.str = ..., root: builtins.str = ..., token: builtins.str = ..., ) -> typing_extensions.Self: @@ -213,10 +213,10 @@ class AsyncOperator: Parameters ---------- - endpoint : builtins.str, optional - The endpoint for Swift. container : builtins.str, optional The container for Swift. + endpoint : builtins.str, optional + The endpoint for Swift. root : builtins.str, optional The root for Swift. token : builtins.str, optional @@ -234,10 +234,10 @@ class AsyncOperator: /, *, connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., - value_field: builtins.str = ..., root: builtins.str = ..., + table: builtins.str = ..., + value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `sqlite` service. @@ -253,21 +253,21 @@ class AsyncOperator: `sqlite:data.db` - `sqlite://data.db` For more information, please visit . - table : builtins.str, optional - Set the table name of the sqlite service to - read/write. key_field : builtins.str, optional Set the key field name of the sqlite service to read/write. Default to `key` if not specified. - value_field : builtins.str, optional - Set the value field name of the sqlite service to - read/write. - Default to `value` if not specified. root : builtins.str, optional set the working directory, all operations will be performed under it. default: "/" + table : builtins.str, optional + Set the table name of the sqlite service to + read/write. + value_field : builtins.str, optional + Set the value field name of the sqlite service to + read/write. + Default to `value` if not specified. Returns ------- @@ -302,34 +302,70 @@ class AsyncOperator: The new `AsyncOperator` for `sled` service """ @typing.overload + def __new__( + cls, + scheme: opendal.services.Scheme.Sftp | typing.Literal["sftp"], + /, + *, + enable_copy: builtins.bool = ..., + endpoint: builtins.str = ..., + key: builtins.str = ..., + known_hosts_strategy: builtins.str = ..., + root: builtins.str = ..., + user: builtins.str = ..., + ) -> typing_extensions.Self: + r""" + Create a new `AsyncOperator` for `sftp` service. + + Parameters + ---------- + enable_copy : builtins.bool, optional + enable_copy of this backend + endpoint : builtins.str, optional + endpoint of this backend + key : builtins.str, optional + key of this backend + known_hosts_strategy : builtins.str, optional + known_hosts_strategy of this backend + root : builtins.str, optional + root of this backend + user : builtins.str, optional + user of this backend + + Returns + ------- + AsyncOperator + The new `AsyncOperator` for `sftp` service + """ + @typing.overload def __new__( cls, scheme: opendal.services.Scheme.Seafile | typing.Literal["seafile"], /, *, + endpoint: builtins.str = ..., + password: builtins.str = ..., repo_name: builtins.str, root: builtins.str = ..., - endpoint: builtins.str = ..., username: builtins.str = ..., - password: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `seafile` service. Parameters ---------- + endpoint : builtins.str, optional + endpoint address of this backend. + password : builtins.str, optional + password of this backend. repo_name : builtins.str repo_name of this backend. required. root : builtins.str, optional root of this backend. All operations will happen under this root. - endpoint : builtins.str, optional - endpoint address of this backend. username : builtins.str, optional username of this backend. - password : builtins.str, optional - password of this backend. Returns ------- @@ -342,50 +378,121 @@ class AsyncOperator: scheme: opendal.services.Scheme.S3 | typing.Literal["s3"], /, *, + access_key_id: builtins.str = ..., + allow_anonymous: builtins.bool = ..., + batch_max_operations: builtins.int = ..., bucket: builtins.str, - root: builtins.str = ..., + checksum_algorithm: builtins.str = ..., + default_storage_class: builtins.str = ..., + delete_max_size: builtins.int = ..., + disable_config_load: builtins.bool = ..., + disable_ec2_metadata: builtins.bool = ..., + disable_list_objects_v2: builtins.bool = ..., + disable_stat_with_override: builtins.bool = ..., + disable_write_with_if_match: builtins.bool = ..., + enable_request_payer: builtins.bool = ..., enable_versioning: builtins.bool = ..., + enable_virtual_host_style: builtins.bool = ..., + enable_write_with_append: builtins.bool = ..., endpoint: builtins.str = ..., + external_id: builtins.str = ..., region: builtins.str = ..., - access_key_id: builtins.str = ..., - secret_access_key: builtins.str = ..., - session_token: builtins.str = ..., role_arn: builtins.str = ..., - external_id: builtins.str = ..., role_session_name: builtins.str = ..., - disable_config_load: builtins.bool = ..., - disable_ec2_metadata: builtins.bool = ..., - allow_anonymous: builtins.bool = ..., + root: builtins.str = ..., + secret_access_key: builtins.str = ..., server_side_encryption: builtins.str = ..., server_side_encryption_aws_kms_key_id: builtins.str = ..., server_side_encryption_customer_algorithm: builtins.str = ..., server_side_encryption_customer_key: builtins.str = ..., server_side_encryption_customer_key_md5: builtins.str = ..., - default_storage_class: builtins.str = ..., - enable_virtual_host_style: builtins.bool = ..., - batch_max_operations: builtins.int = ..., - delete_max_size: builtins.int = ..., - disable_stat_with_override: builtins.bool = ..., - checksum_algorithm: builtins.str = ..., - disable_write_with_if_match: builtins.bool = ..., - enable_write_with_append: builtins.bool = ..., - disable_list_objects_v2: builtins.bool = ..., - enable_request_payer: builtins.bool = ..., + session_token: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `s3` service. Parameters ---------- + access_key_id : builtins.str, optional + 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 : builtins.bool, optional + Allow anonymous will allow opendal to send request + without signing when credential is not loaded. + batch_max_operations : builtins.int, optional + Set maximum batch operations of this backend. + Some compatible services have a limit on the number + of operations in a batch request. + For example, R2 could return `Internal Error` while + batch delete 1000 files. + Please tune this value based on services' document. bucket : builtins.str bucket name of this backend. required. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. - default to `/` if not set. + checksum_algorithm : builtins.str, optional + 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" + default_storage_class : builtins.str, optional + 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 : builtins.int, optional + Set the maximum delete size of this backend. + Some compatible services have a limit on the number + of operations in a batch request. + For example, R2 could return `Internal Error` while + batch delete 1000 files. + Please tune this value based on services' document. + disable_config_load : builtins.bool, optional + 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 : builtins.bool, optional + 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 : builtins.bool, optional + 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 : builtins.bool, optional + Disable stat with override so that opendal will not + send stat request with override queries. + For example, R2 doesn't support stat with + `response_content_type` query. + disable_write_with_if_match : builtins.bool, optional + Disable write with if match so that opendal will not + send write request with if match headers. + For example, Ceph RADOS S3 doesn't support write + with if match. + enable_request_payer : builtins.bool, optional + Indicates whether the client agrees to pay for the + requests made to the S3 bucket. enable_versioning : builtins.bool, optional is bucket versioning enabled for this bucket + enable_virtual_host_style : builtins.bool, optional + 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 : builtins.bool, optional + Enable write with append so that opendal will send + write request with append headers. endpoint : builtins.str, optional endpoint of this backend. Endpoint must be full uri, e.g. @@ -402,6 +509,8 @@ class AsyncOperator: - If not, we will try to load it from environment. - If still not set, default to `https://s3.amazonaws.com`. + external_id : builtins.str, optional + external_id for this backend. region : builtins.str, optional Region represent the signing region of this endpoint. @@ -410,45 +519,25 @@ class AsyncOperator: 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. - access_key_id : builtins.str, optional - 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. - secret_access_key : builtins.str, optional - 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. - session_token : builtins.str, optional - session_token (aka, security token) of this backend. - This token will expire after sometime, it's - recommended to set session_token by hand. role_arn : builtins.str, optional 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`. - external_id : builtins.str, optional - external_id for this backend. role_session_name : builtins.str, optional role_session_name for this backend. - disable_config_load : builtins.bool, optional - 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 : builtins.bool, optional - 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 - allow_anonymous : builtins.bool, optional - Allow anonymous will allow opendal to send request - without signing when credential is not loaded. - server_side_encryption : builtins.str, optional - server_side_encryption for this backend. - Available values: `AES256`, `aws:kms`. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. + default to `/` if not set. + secret_access_key : builtins.str, optional + 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 : builtins.str, optional + server_side_encryption for this backend. + Available values: `AES256`, `aws:kms`. server_side_encryption_aws_kms_key_id : builtins.str, optional server_side_encryption_aws_kms_key_id for this backend - If `server_side_encryption` set to @@ -479,63 +568,10 @@ class AsyncOperator: backend. Value: MD5 digest of key specified in `server_side_encryption_customer_key`. - default_storage_class : builtins.str, optional - 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 - enable_virtual_host_style : builtins.bool, optional - 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` - batch_max_operations : builtins.int, optional - Set maximum batch operations of this backend. - Some compatible services have a limit on the number - of operations in a batch request. - For example, R2 could return `Internal Error` while - batch delete 1000 files. - Please tune this value based on services' document. - delete_max_size : builtins.int, optional - Set the maximum delete size of this backend. - Some compatible services have a limit on the number - of operations in a batch request. - For example, R2 could return `Internal Error` while - batch delete 1000 files. - Please tune this value based on services' document. - disable_stat_with_override : builtins.bool, optional - Disable stat with override so that opendal will not - send stat request with override queries. - For example, R2 doesn't support stat with - `response_content_type` query. - checksum_algorithm : builtins.str, optional - 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" - disable_write_with_if_match : builtins.bool, optional - Disable write with if match so that opendal will not - send write request with if match headers. - For example, Ceph RADOS S3 doesn't support write - with if match. - enable_write_with_append : builtins.bool, optional - Enable write with append so that opendal will send - write request with append headers. - disable_list_objects_v2 : builtins.bool, optional - 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. - enable_request_payer : builtins.bool, optional - Indicates whether the client agrees to pay for the - requests made to the S3 bucket. + session_token : builtins.str, optional + session_token (aka, security token) of this backend. + This token will expire after sometime, it's + recommended to set session_token by hand. Returns ------- @@ -548,45 +584,45 @@ class AsyncOperator: scheme: opendal.services.Scheme.Redis | typing.Literal["redis"], /, *, + cluster_endpoints: builtins.str = ..., db: builtins.int, + default_ttl: typing.Any = ..., endpoint: builtins.str = ..., - cluster_endpoints: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., root: builtins.str = ..., - default_ttl: typing.Any = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `redis` service. Parameters ---------- + cluster_endpoints : builtins.str, optional + 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 db : builtins.int the number of DBs redis can take is unlimited default is db 0 + default_ttl : typing.Any, optional + The default ttl for put operations.. + a human readable duration string see + https://docs.rs/humantime/latest/humantime/fn.parse_duration.html + for more details endpoint : builtins.str, optional network address of the Redis service. Can be "tcp://127.0.0.1:6379", e.g. default is "tcp://127.0.0.1:6379" - cluster_endpoints : builtins.str, optional - 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 - username : builtins.str, optional - the username to connect redis service. - default is None password : builtins.str, optional the password for authentication default is None root : builtins.str, optional the working directory of the Redis service. Can be "/path/to/dir" default is "/" - default_ttl : typing.Any, optional - The default ttl for put operations.. - a human readable duration string see - https://docs.rs/humantime/latest/humantime/fn.parse_duration.html - for more details + username : builtins.str, optional + the username to connect redis service. + default is None Returns ------- @@ -626,10 +662,10 @@ class AsyncOperator: scheme: opendal.services.Scheme.Postgresql | typing.Literal["postgresql"], /, *, - root: builtins.str = ..., connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., + root: builtins.str = ..., + table: builtins.str = ..., value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -637,10 +673,6 @@ class AsyncOperator: Parameters ---------- - root : builtins.str, optional - Root of this backend. - All operations will happen under this root. - Default to `/` if not set. connection_string : builtins.str, optional The URL should be with a scheme of either `postgres://` or `postgresql://`. @@ -652,10 +684,14 @@ class AsyncOperator: `postgresql:///mydb?user=user&host=/var/lib/postgresql` For more information, please visit . - table : builtins.str, optional - the table of postgresql key_field : builtins.str, optional the key field of postgresql + root : builtins.str, optional + Root of this backend. + All operations will happen under this root. + Default to `/` if not set. + table : builtins.str, optional + the table of postgresql value_field : builtins.str, optional the value field of postgresql @@ -671,8 +707,8 @@ class AsyncOperator: /, *, datafile: builtins.str = ..., - segment: builtins.str = ..., index: builtins.str = ..., + segment: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `persy` service. @@ -682,10 +718,10 @@ class AsyncOperator: datafile : builtins.str, optional That path to the persy data file. The directory in the path must already exist. - segment : builtins.str, optional - That name of the persy segment. index : builtins.str, optional That name of the persy index. + segment : builtins.str, optional + That name of the persy segment. Returns ------- @@ -698,25 +734,25 @@ class AsyncOperator: scheme: opendal.services.Scheme.Oss | typing.Literal["oss"], /, *, - bucket: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - presign_endpoint: builtins.str = ..., - addressing_style: builtins.str = ..., - presign_addressing_style: builtins.str = ..., - enable_versioning: builtins.bool = ..., - server_side_encryption: builtins.str = ..., - server_side_encryption_key_id: builtins.str = ..., - allow_anonymous: builtins.bool = ..., access_key_id: builtins.str = ..., access_key_secret: builtins.str = ..., - security_token: builtins.str = ..., + addressing_style: builtins.str = ..., + allow_anonymous: builtins.bool = ..., batch_max_operations: builtins.int = ..., + bucket: builtins.str, delete_max_size: builtins.int = ..., - role_arn: builtins.str = ..., - role_session_name: builtins.str = ..., + enable_versioning: builtins.bool = ..., + endpoint: builtins.str = ..., oidc_provider_arn: builtins.str = ..., oidc_token_file: builtins.str = ..., + presign_addressing_style: builtins.str = ..., + presign_endpoint: builtins.str = ..., + role_arn: builtins.str = ..., + role_session_name: builtins.str = ..., + root: builtins.str = ..., + security_token: builtins.str = ..., + server_side_encryption: builtins.str = ..., + server_side_encryption_key_id: builtins.str = ..., sts_endpoint: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -724,26 +760,6 @@ class AsyncOperator: Parameters ---------- - bucket : builtins.str - Bucket for oss. - root : builtins.str, optional - Root for oss. - endpoint : builtins.str, optional - Endpoint for oss. - presign_endpoint : builtins.str, optional - Presign endpoint for oss. - addressing_style : builtins.str, optional - Addressing style for oss. - presign_addressing_style : builtins.str, optional - Pre sign addressing style for oss. - enable_versioning : builtins.bool, optional - is bucket versioning enabled for this bucket - server_side_encryption : builtins.str, optional - Server side encryption for oss. - server_side_encryption_key_id : builtins.str, optional - Server side encryption key id for oss. - allow_anonymous : builtins.bool, optional - Allow anonymous for oss. access_key_id : builtins.str, optional Access key id for oss. - this field if it's `is_some` - env value: @@ -752,22 +768,20 @@ class AsyncOperator: Access key secret for oss. - this field if it's `is_some` - env value: [`ALIBABA_CLOUD_ACCESS_KEY_SECRET`] - security_token : builtins.str, optional - `security_token` will be loaded from - this field if - it's `is_some` - env value: - [`ALIBABA_CLOUD_SECURITY_TOKEN`] + addressing_style : builtins.str, optional + Addressing style for oss. + allow_anonymous : builtins.bool, optional + Allow anonymous for oss. batch_max_operations : builtins.int, optional The size of max batch operations. + bucket : builtins.str + Bucket for oss. delete_max_size : builtins.int, optional The size of max delete operations. - role_arn : builtins.str, optional - 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 : builtins.str, optional - role_session_name for this backend. + enable_versioning : builtins.bool, optional + is bucket versioning enabled for this bucket + endpoint : builtins.str, optional + Endpoint for oss. oidc_provider_arn : builtins.str, optional `oidc_provider_arn` will be loaded from - this field if it's `is_some` - env value: @@ -776,6 +790,28 @@ class AsyncOperator: `oidc_token_file` will be loaded from - this field if it's `is_some` - env value: [`ALIBABA_CLOUD_OIDC_TOKEN_FILE`] + presign_addressing_style : builtins.str, optional + Pre sign addressing style for oss. + presign_endpoint : builtins.str, optional + Presign endpoint for oss. + role_arn : builtins.str, optional + 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 : builtins.str, optional + role_session_name for this backend. + root : builtins.str, optional + Root for oss. + security_token : builtins.str, optional + `security_token` will be loaded from - this field if + it's `is_some` - env value: + [`ALIBABA_CLOUD_SECURITY_TOKEN`] + server_side_encryption : builtins.str, optional + Server side encryption for oss. + server_side_encryption_key_id : builtins.str, optional + Server side encryption key id for oss. sts_endpoint : builtins.str, optional `sts_endpoint` will be loaded from - this field if it's `is_some` - env value: @@ -792,26 +828,20 @@ class AsyncOperator: scheme: opendal.services.Scheme.Onedrive | typing.Literal["onedrive"], /, *, - root: builtins.str = ..., access_token: builtins.str = ..., - refresh_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., enable_versioning: builtins.bool = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `onedrive` service. Parameters ---------- - root : builtins.str, optional - The root path for the OneDrive service for the file - access access_token : builtins.str, optional Microsoft Graph API (also OneDrive API) access token - refresh_token : builtins.str, optional - Microsoft Graph API (also OneDrive API) refresh - token client_id : builtins.str, optional Microsoft Graph API Application (client) ID that is in the Azure's app registration portal @@ -820,6 +850,12 @@ class AsyncOperator: is in the Azure's app registration portal enable_versioning : builtins.bool, optional Enabling version support + refresh_token : builtins.str, optional + Microsoft Graph API (also OneDrive API) refresh + token + root : builtins.str, optional + The root path for the OneDrive service for the file + access Returns ------- @@ -832,30 +868,30 @@ class AsyncOperator: scheme: opendal.services.Scheme.Obs | typing.Literal["obs"], /, *, - root: builtins.str = ..., - endpoint: builtins.str = ..., access_key_id: builtins.str = ..., - secret_access_key: builtins.str = ..., bucket: builtins.str = ..., enable_versioning: builtins.bool = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., + secret_access_key: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `obs` service. Parameters ---------- - root : builtins.str, optional - Root for obs. - endpoint : builtins.str, optional - Endpoint for obs. access_key_id : builtins.str, optional Access key id for obs. - secret_access_key : builtins.str, optional - Secret access key for obs. bucket : builtins.str, optional Bucket for obs. enable_versioning : builtins.bool, optional Is bucket versioning enabled for this bucket + endpoint : builtins.str, optional + Endpoint for obs. + root : builtins.str, optional + Root for obs. + secret_access_key : builtins.str, optional + Secret access key for obs. Returns ------- @@ -869,11 +905,11 @@ class AsyncOperator: /, *, connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., - value_field: builtins.str = ..., root: builtins.str = ..., - ) -> typing_extensions.Self: + table: builtins.str = ..., + value_field: builtins.str = ..., + ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `mysql` service. @@ -893,14 +929,14 @@ class AsyncOperator: `mysql://user:password@localhost:3306/db` For more information, please refer to . - table : builtins.str, optional - The table name for mysql. key_field : builtins.str, optional The key field name for mysql. - value_field : builtins.str, optional - The value field name for mysql. root : builtins.str, optional The root for mysql. + table : builtins.str, optional + The table name for mysql. + value_field : builtins.str, optional + The value field name for mysql. Returns ------- @@ -913,11 +949,11 @@ class AsyncOperator: scheme: opendal.services.Scheme.Mongodb | typing.Literal["mongodb"], /, *, + collection: builtins.str = ..., connection_string: builtins.str = ..., database: builtins.str = ..., - collection: builtins.str = ..., - root: builtins.str = ..., key_field: builtins.str = ..., + root: builtins.str = ..., value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -925,16 +961,16 @@ class AsyncOperator: Parameters ---------- + collection : builtins.str, optional + collection of this backend connection_string : builtins.str, optional connection string of this backend database : builtins.str, optional database of this backend - collection : builtins.str, optional - collection of this backend - root : builtins.str, optional - root of this backend key_field : builtins.str, optional key field of this backend + root : builtins.str, optional + root of this backend value_field : builtins.str, optional value field of this backend @@ -949,33 +985,33 @@ class AsyncOperator: scheme: opendal.services.Scheme.Moka | typing.Literal["moka"], /, *, - name: builtins.str = ..., max_capacity: builtins.int = ..., - time_to_live: builtins.str = ..., - time_to_idle: builtins.str = ..., + name: builtins.str = ..., root: builtins.str = ..., + time_to_idle: builtins.str = ..., + time_to_live: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `moka` service. Parameters ---------- - name : builtins.str, optional - Name for this cache instance. max_capacity : builtins.int, optional 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) - time_to_live : builtins.str, optional - 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) + name : builtins.str, optional + Name for this cache instance. + root : builtins.str, optional + root path of this backend time_to_idle : builtins.str, optional 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) - root : builtins.str, optional - root path of this backend + time_to_live : builtins.str, optional + 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) Returns ------- @@ -989,9 +1025,9 @@ class AsyncOperator: /, *, max_capacity: builtins.int = ..., - time_to_live: builtins.str = ..., - time_to_idle: builtins.str = ..., root: builtins.str = ..., + time_to_idle: builtins.str = ..., + time_to_live: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `mini-moka` service. @@ -1002,16 +1038,16 @@ class AsyncOperator: 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) - time_to_live : builtins.str, optional - 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) + root : builtins.str, optional + root path of this backend time_to_idle : builtins.str, optional 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) - root : builtins.str, optional - root path of this backend + time_to_live : builtins.str, optional + 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) Returns ------- @@ -1045,32 +1081,32 @@ class AsyncOperator: scheme: opendal.services.Scheme.Memcached | typing.Literal["memcached"], /, *, + default_ttl: typing.Any = ..., endpoint: builtins.str = ..., + password: builtins.str = ..., root: builtins.str = ..., username: builtins.str = ..., - password: builtins.str = ..., - default_ttl: typing.Any = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `memcached` service. Parameters ---------- + default_ttl : typing.Any, optional + The default ttl for put operations.. + a human readable duration string see + https://docs.rs/humantime/latest/humantime/fn.parse_duration.html + for more details endpoint : builtins.str, optional network address of the memcached service. For example: "tcp://localhost:11211" + password : builtins.str, optional + Memcached password, optional. root : builtins.str, optional the working directory of the service. Can be "/path/to/dir" default is "/" username : builtins.str, optional Memcached username, optional. - password : builtins.str, optional - Memcached password, optional. - default_ttl : typing.Any, optional - The default ttl for put operations.. - a human readable duration string see - https://docs.rs/humantime/latest/humantime/fn.parse_duration.html - for more details Returns ------- @@ -1083,26 +1119,26 @@ class AsyncOperator: scheme: opendal.services.Scheme.Koofr | typing.Literal["koofr"], /, *, - endpoint: builtins.str, email: builtins.str, - root: builtins.str = ..., + endpoint: builtins.str, password: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `koofr` service. Parameters ---------- - endpoint : builtins.str - Koofr endpoint. email : builtins.str Koofr email. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. + endpoint : builtins.str + Koofr endpoint. password : builtins.str, optional password of this backend. (Must be the application password) + root : builtins.str, optional + root of this backend. + All operations will happen under this root. Returns ------- @@ -1115,18 +1151,18 @@ class AsyncOperator: scheme: opendal.services.Scheme.Ipmfs | typing.Literal["ipmfs"], /, *, - root: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `ipmfs` service. Parameters ---------- - root : builtins.str, optional - Root for ipfs. endpoint : builtins.str, optional Endpoint for ipfs. + root : builtins.str, optional + Root for ipfs. Returns ------- @@ -1163,8 +1199,8 @@ class AsyncOperator: scheme: opendal.services.Scheme.Huggingface | typing.Literal["huggingface"], /, *, - repo_type: builtins.str = ..., repo_id: builtins.str = ..., + repo_type: builtins.str = ..., revision: builtins.str = ..., root: builtins.str = ..., token: builtins.str = ..., @@ -1174,13 +1210,13 @@ class AsyncOperator: Parameters ---------- + repo_id : builtins.str, optional + Repo id of this backend. + This is required. repo_type : builtins.str, optional Repo type of this backend. Default is model. Available values: - model - dataset - repo_id : builtins.str, optional - Repo id of this backend. - This is required. revision : builtins.str, optional Revision of this backend. Default is main. @@ -1204,10 +1240,10 @@ class AsyncOperator: /, *, endpoint: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., - token: builtins.str = ..., root: builtins.str = ..., + token: builtins.str = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `http` service. @@ -1216,14 +1252,14 @@ class AsyncOperator: ---------- endpoint : builtins.str, optional endpoint of this backend - username : builtins.str, optional - username of this backend password : builtins.str, optional password of this backend - token : builtins.str, optional - token of this backend root : builtins.str, optional root of this backend + token : builtins.str, optional + token of this backend + username : builtins.str, optional + username of this backend Returns ------- @@ -1236,21 +1272,21 @@ class AsyncOperator: scheme: opendal.services.Scheme.HdfsNative | typing.Literal["hdfs-native"], /, *, - root: builtins.str = ..., - name_node: builtins.str = ..., enable_append: builtins.bool = ..., + name_node: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `hdfs-native` service. Parameters ---------- - root : builtins.str, optional - work dir of this backend - name_node : builtins.str, optional - name_node of this backend enable_append : builtins.bool, optional enable the append capacity + name_node : builtins.str, optional + name_node of this backend + root : builtins.str, optional + work dir of this backend Returns ------- @@ -1263,10 +1299,10 @@ class AsyncOperator: scheme: opendal.services.Scheme.Gridfs | typing.Literal["gridfs"], /, *, - connection_string: builtins.str = ..., - database: builtins.str = ..., bucket: builtins.str = ..., chunk_size: builtins.int = ..., + connection_string: builtins.str = ..., + database: builtins.str = ..., root: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -1274,17 +1310,17 @@ class AsyncOperator: Parameters ---------- - connection_string : builtins.str, optional - The connection string of the MongoDB service. - database : builtins.str, optional - The database name of the MongoDB GridFs service to - read/write. bucket : builtins.str, optional The bucket name of the MongoDB GridFs service to read/write. chunk_size : builtins.int, optional The chunk size of the MongoDB GridFs service used to break the user file into chunks. + connection_string : builtins.str, optional + The connection string of the MongoDB service. + database : builtins.str, optional + The database name of the MongoDB GridFs service to + read/write. root : builtins.str, optional The working directory, all operations will be performed under it. @@ -1300,24 +1336,24 @@ class AsyncOperator: scheme: opendal.services.Scheme.Ghac | typing.Literal["ghac"], /, *, - root: builtins.str = ..., - version: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., runtime_token: builtins.str = ..., + version: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `ghac` service. Parameters ---------- - root : builtins.str, optional - The root path for ghac. - version : builtins.str, optional - The version that used by cache. endpoint : builtins.str, optional The endpoint for ghac service. + root : builtins.str, optional + The root path for ghac. runtime_token : builtins.str, optional The runtime token for ghac service. + version : builtins.str, optional + The version that used by cache. Returns ------- @@ -1330,27 +1366,27 @@ class AsyncOperator: scheme: opendal.services.Scheme.Gdrive | typing.Literal["gdrive"], /, *, - root: builtins.str = ..., access_token: builtins.str = ..., - refresh_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `gdrive` service. Parameters ---------- - root : builtins.str, optional - The root for gdrive access_token : builtins.str, optional Access token for gdrive. - refresh_token : builtins.str, optional - Refresh token for gdrive. client_id : builtins.str, optional Client id for gdrive. client_secret : builtins.str, optional Client secret for gdrive. + refresh_token : builtins.str, optional + Refresh token for gdrive. + root : builtins.str, optional + The root for gdrive Returns ------- @@ -1363,18 +1399,18 @@ class AsyncOperator: scheme: opendal.services.Scheme.Gcs | typing.Literal["gcs"], /, *, + allow_anonymous: builtins.bool = ..., bucket: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - scope: builtins.str = ..., - service_account: builtins.str = ..., credential: builtins.str = ..., credential_path: builtins.str = ..., - predefined_acl: builtins.str = ..., default_storage_class: builtins.str = ..., - allow_anonymous: builtins.bool = ..., - disable_vm_metadata: builtins.bool = ..., disable_config_load: builtins.bool = ..., + disable_vm_metadata: builtins.bool = ..., + endpoint: builtins.str = ..., + predefined_acl: builtins.str = ..., + root: builtins.str = ..., + scope: builtins.str = ..., + service_account: builtins.str = ..., token: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -1382,35 +1418,35 @@ class AsyncOperator: Parameters ---------- + allow_anonymous : builtins.bool, optional + Allow opendal to send requests without signing when + credentials are not loaded. bucket : builtins.str bucket name - root : builtins.str, optional - root URI, all operations happens under `root` - endpoint : builtins.str, optional - endpoint URI of GCS service, default is - `https://storage.googleapis.com` - scope : builtins.str, optional - Scope for gcs. - service_account : builtins.str, optional - Service Account for gcs. credential : builtins.str, optional Credentials string for GCS service OAuth2 authentication. credential_path : builtins.str, optional Local path to credentials file for GCS service OAuth2 authentication. - predefined_acl : builtins.str, optional - The predefined acl for GCS. default_storage_class : builtins.str, optional The default storage class used by gcs. - allow_anonymous : builtins.bool, optional - Allow opendal to send requests without signing when - credentials are not loaded. + disable_config_load : builtins.bool, optional + Disable loading configuration from the environment. disable_vm_metadata : builtins.bool, optional Disable attempting to load credentials from the GCE metadata server when running within Google Cloud. - disable_config_load : builtins.bool, optional - Disable loading configuration from the environment. + endpoint : builtins.str, optional + endpoint URI of GCS service, default is + `https://storage.googleapis.com` + predefined_acl : builtins.str, optional + The predefined acl for GCS. + root : builtins.str, optional + root URI, all operations happens under `root` + scope : builtins.str, optional + Scope for gcs. + service_account : builtins.str, optional + Service Account for gcs. token : builtins.str, optional A Google Cloud OAuth2 token. Takes precedence over `credential` and @@ -1424,21 +1460,51 @@ class AsyncOperator: @typing.overload def __new__( cls, - scheme: opendal.services.Scheme.Fs | typing.Literal["fs"], + scheme: opendal.services.Scheme.Ftp | typing.Literal["ftp"], /, *, + endpoint: builtins.str = ..., + password: builtins.str = ..., root: builtins.str = ..., + user: builtins.str = ..., + ) -> typing_extensions.Self: + r""" + Create a new `AsyncOperator` for `ftp` service. + + Parameters + ---------- + endpoint : builtins.str, optional + endpoint of this backend + password : builtins.str, optional + password of this backend + root : builtins.str, optional + root of this backend + user : builtins.str, optional + user of this backend + + Returns + ------- + AsyncOperator + The new `AsyncOperator` for `ftp` service + """ + @typing.overload + def __new__( + cls, + scheme: opendal.services.Scheme.Fs | typing.Literal["fs"], + /, + *, atomic_write_dir: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `fs` service. Parameters ---------- - root : builtins.str, optional - root dir for backend atomic_write_dir : builtins.str, optional tmp dir for atomic write + root : builtins.str, optional + root dir for backend Returns ------- @@ -1451,30 +1517,30 @@ class AsyncOperator: scheme: opendal.services.Scheme.Dropbox | typing.Literal["dropbox"], /, *, - root: builtins.str = ..., access_token: builtins.str = ..., - refresh_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `dropbox` service. Parameters ---------- - root : builtins.str, optional - root path for dropbox. access_token : builtins.str, optional access token for dropbox. - refresh_token : builtins.str, optional - refresh_token for dropbox. client_id : builtins.str, optional client_id for dropbox. client_secret : builtins.str, optional client_secret for dropbox. - - Returns - ------- + refresh_token : builtins.str, optional + refresh_token for dropbox. + root : builtins.str, optional + root path for dropbox. + + Returns + ------- AsyncOperator The new `AsyncOperator` for `dropbox` service """ @@ -1505,34 +1571,34 @@ class AsyncOperator: scheme: opendal.services.Scheme.Cos | typing.Literal["cos"], /, *, - root: builtins.str = ..., + bucket: builtins.str = ..., + disable_config_load: builtins.bool = ..., + enable_versioning: builtins.bool = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., secret_id: builtins.str = ..., secret_key: builtins.str = ..., - bucket: builtins.str = ..., - enable_versioning: builtins.bool = ..., - disable_config_load: builtins.bool = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `cos` service. Parameters ---------- - root : builtins.str, optional - Root of this backend. + bucket : builtins.str, optional + Bucket of this backend. + disable_config_load : builtins.bool, optional + Disable config load so that opendal will not load + config from + enable_versioning : builtins.bool, optional + is bucket versioning enabled for this bucket endpoint : builtins.str, optional Endpoint of this backend. + root : builtins.str, optional + Root of this backend. secret_id : builtins.str, optional Secret ID of this backend. secret_key : builtins.str, optional Secret key of this backend. - bucket : builtins.str, optional - Bucket of this backend. - enable_versioning : builtins.bool, optional - is bucket versioning enabled for this bucket - disable_config_load : builtins.bool, optional - Disable config load so that opendal will not load - config from Returns ------- @@ -1566,17 +1632,27 @@ class AsyncOperator: scheme: opendal.services.Scheme.B2 | typing.Literal["b2"], /, *, + application_key: builtins.str = ..., + application_key_id: builtins.str = ..., bucket: builtins.str, bucket_id: builtins.str, root: builtins.str = ..., - application_key_id: builtins.str = ..., - application_key: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `b2` service. Parameters ---------- + application_key : builtins.str, optional + 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 : builtins.str, optional + 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 : builtins.str bucket of this backend. required. @@ -1586,16 +1662,6 @@ class AsyncOperator: root : builtins.str, optional root of this backend. All operations will happen under this root. - application_key_id : builtins.str, optional - 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. - application_key : builtins.str, optional - 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. Returns ------- @@ -1608,30 +1674,30 @@ class AsyncOperator: scheme: opendal.services.Scheme.Azfile | typing.Literal["azfile"], /, *, - share_name: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., + account_name: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., sas_token: builtins.str = ..., + share_name: builtins.str, ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `azfile` service. Parameters ---------- - share_name : builtins.str - The share name for azfile. - root : builtins.str, optional - The root path for azfile. - endpoint : builtins.str, optional - The endpoint for azfile. - account_name : builtins.str, optional - The account name for azfile. account_key : builtins.str, optional The account key for azfile. + account_name : builtins.str, optional + The account name for azfile. + endpoint : builtins.str, optional + The endpoint for azfile. + root : builtins.str, optional + The root path for azfile. sas_token : builtins.str, optional The sas token for azfile. + share_name : builtins.str + The share name for azfile. Returns ------- @@ -1644,51 +1710,51 @@ class AsyncOperator: scheme: opendal.services.Scheme.Azdls | typing.Literal["azdls"], /, *, - filesystem: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., - client_secret: builtins.str = ..., - tenant_id: builtins.str = ..., + account_name: builtins.str = ..., + authority_host: builtins.str = ..., client_id: builtins.str = ..., + client_secret: builtins.str = ..., + endpoint: builtins.str = ..., + filesystem: builtins.str, + root: builtins.str = ..., sas_token: builtins.str = ..., - authority_host: builtins.str = ..., + tenant_id: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `azdls` service. Parameters ---------- - filesystem : builtins.str - Filesystem name of this backend. - root : builtins.str, optional - Root of this backend. - endpoint : builtins.str, optional - Endpoint of this backend. - account_name : builtins.str, optional - Account name of this backend. account_key : builtins.str, optional Account key of this backend. - required for shared_key authentication - client_secret : builtins.str, optional - client_secret The client secret of the service + account_name : builtins.str, optional + Account name of this backend. + authority_host : builtins.str, optional + authority_host The authority host of the service principal. - - required for client_credentials authentication - tenant_id : builtins.str, optional - tenant_id The tenant id of the service principal. - - required for client_credentials authentication + - required for client_credentials authentication - + default value: `https://login.microsoftonline.com` client_id : builtins.str, optional client_id The client id of the service principal. - required for client_credentials authentication + client_secret : builtins.str, optional + client_secret The client secret of the service + principal. + - required for client_credentials authentication + endpoint : builtins.str, optional + Endpoint of this backend. + filesystem : builtins.str + Filesystem name of this backend. + root : builtins.str, optional + Root of this backend. sas_token : builtins.str, optional sas_token The shared access signature token. - required for sas authentication - authority_host : builtins.str, optional - authority_host The authority host of the service - principal. - - required for client_credentials authentication - - default value: `https://login.microsoftonline.com` + tenant_id : builtins.str, optional + tenant_id The tenant id of the service principal. + - required for client_credentials authentication Returns ------- @@ -1701,48 +1767,48 @@ class AsyncOperator: scheme: opendal.services.Scheme.Azblob | typing.Literal["azblob"], /, *, - container: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., + account_name: builtins.str = ..., + batch_max_operations: builtins.int = ..., + container: builtins.str, + encryption_algorithm: builtins.str = ..., encryption_key: builtins.str = ..., encryption_key_sha256: builtins.str = ..., - encryption_algorithm: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., sas_token: builtins.str = ..., - batch_max_operations: builtins.int = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `azblob` service. Parameters ---------- + account_key : builtins.str, optional + The account key of Azblob service backend. + account_name : builtins.str, optional + The account name of Azblob service backend. + batch_max_operations : builtins.int, optional + The maximum batch operations of Azblob service + backend. container : builtins.str The container name of Azblob service backend. - root : builtins.str, optional - The root of Azblob service backend. - All operations will happen under this root. + encryption_algorithm : builtins.str, optional + The encryption algorithm of Azblob service backend. + encryption_key : builtins.str, optional + The encryption key of Azblob service backend. + encryption_key_sha256 : builtins.str, optional + The encryption key sha256 of Azblob service backend. endpoint : builtins.str, optional 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` - account_name : builtins.str, optional - The account name of Azblob service backend. - account_key : builtins.str, optional - The account key of Azblob service backend. - encryption_key : builtins.str, optional - The encryption key of Azblob service backend. - encryption_key_sha256 : builtins.str, optional - The encryption key sha256 of Azblob service backend. - encryption_algorithm : builtins.str, optional - The encryption algorithm of Azblob service backend. + root : builtins.str, optional + The root of Azblob service backend. + All operations will happen under this root. sas_token : builtins.str, optional The sas token of Azblob service backend. - batch_max_operations : builtins.int, optional - The maximum batch operations of Azblob service - backend. Returns ------- @@ -1755,22 +1821,22 @@ class AsyncOperator: scheme: opendal.services.Scheme.Alluxio | typing.Literal["alluxio"], /, *, - root: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `alluxio` service. Parameters ---------- - root : builtins.str, optional - root of this backend. - All operations will happen under this root. - default to `/` if not set. endpoint : builtins.str, optional endpoint of this backend. Endpoint must be full uri, mostly like `http://127.0.0.1:39999`. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. + default to `/` if not set. Returns ------- @@ -1783,29 +1849,18 @@ class AsyncOperator: scheme: opendal.services.Scheme.AliyunDrive | typing.Literal["aliyun-drive"], /, *, - drive_type: builtins.str, - root: builtins.str = ..., access_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., + drive_type: builtins.str, refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `aliyun-drive` service. Parameters ---------- - drive_type : builtins.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. - root : builtins.str, optional - The Root of this backend. - All operations will happen under this root. - Default to `/` if not set. access_token : builtins.str, optional The access_token of this backend. Solution for client-only purpose. @@ -1817,9 +1872,20 @@ class AsyncOperator: client_secret : builtins.str, optional The client_secret of this backend. Required if no access_token is provided. + drive_type : builtins.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 : builtins.str, optional The refresh_token of this backend. Required if no access_token is provided. + root : builtins.str, optional + The Root of this backend. + All operations will happen under this root. + Default to `/` if not set. Returns ------- @@ -2326,30 +2392,30 @@ class Operator: scheme: opendal.services.Scheme.Webhdfs | typing.Literal["webhdfs"], /, *, - root: builtins.str = ..., - endpoint: builtins.str = ..., - user_name: builtins.str = ..., + atomic_write_dir: builtins.str = ..., delegation: builtins.str = ..., disable_list_batch: builtins.bool = ..., - atomic_write_dir: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., + user_name: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `webhdfs` service. Parameters ---------- - root : builtins.str, optional - Root for webhdfs. - endpoint : builtins.str, optional - Endpoint for webhdfs. - user_name : builtins.str, optional - Name of the user for webhdfs. + atomic_write_dir : builtins.str, optional + atomic_write_dir of this backend delegation : builtins.str, optional Delegation token for webhdfs. disable_list_batch : builtins.bool, optional Disable batch listing - atomic_write_dir : builtins.str, optional - atomic_write_dir of this backend + endpoint : builtins.str, optional + Endpoint for webhdfs. + root : builtins.str, optional + Root for webhdfs. + user_name : builtins.str, optional + Name of the user for webhdfs. Returns ------- @@ -2362,30 +2428,30 @@ class Operator: scheme: opendal.services.Scheme.Webdav | typing.Literal["webdav"], /, *, + disable_copy: builtins.bool = ..., endpoint: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., - token: builtins.str = ..., root: builtins.str = ..., - disable_copy: builtins.bool = ..., + token: builtins.str = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `webdav` service. Parameters ---------- + disable_copy : builtins.bool, optional + WebDAV Service doesn't support copy. endpoint : builtins.str, optional endpoint of this backend - username : builtins.str, optional - username of this backend password : builtins.str, optional password of this backend - token : builtins.str, optional - token of this backend root : builtins.str, optional root of this backend - disable_copy : builtins.bool, optional - WebDAV Service doesn't support copy. + token : builtins.str, optional + token of this backend + username : builtins.str, optional + username of this backend Returns ------- @@ -2421,9 +2487,9 @@ class Operator: /, *, bucket: builtins.str, - root: builtins.str = ..., operator: builtins.str = ..., password: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `upyun` service. @@ -2432,13 +2498,13 @@ class Operator: ---------- bucket : builtins.str bucket address of this backend. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. operator : builtins.str, optional username of this backend. password : builtins.str, optional password of this backend. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. Returns ------- @@ -2451,8 +2517,8 @@ class Operator: scheme: opendal.services.Scheme.Swift | typing.Literal["swift"], /, *, - endpoint: builtins.str = ..., container: builtins.str = ..., + endpoint: builtins.str = ..., root: builtins.str = ..., token: builtins.str = ..., ) -> typing_extensions.Self: @@ -2461,10 +2527,10 @@ class Operator: Parameters ---------- - endpoint : builtins.str, optional - The endpoint for Swift. container : builtins.str, optional The container for Swift. + endpoint : builtins.str, optional + The endpoint for Swift. root : builtins.str, optional The root for Swift. token : builtins.str, optional @@ -2482,10 +2548,10 @@ class Operator: /, *, connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., - value_field: builtins.str = ..., root: builtins.str = ..., + table: builtins.str = ..., + value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `sqlite` service. @@ -2501,21 +2567,21 @@ class Operator: `sqlite:data.db` - `sqlite://data.db` For more information, please visit . - table : builtins.str, optional - Set the table name of the sqlite service to - read/write. key_field : builtins.str, optional Set the key field name of the sqlite service to read/write. Default to `key` if not specified. - value_field : builtins.str, optional - Set the value field name of the sqlite service to - read/write. - Default to `value` if not specified. root : builtins.str, optional set the working directory, all operations will be performed under it. default: "/" + table : builtins.str, optional + Set the table name of the sqlite service to + read/write. + value_field : builtins.str, optional + Set the value field name of the sqlite service to + read/write. + Default to `value` if not specified. Returns ------- @@ -2550,34 +2616,70 @@ class Operator: The new `Operator` for `sled` service """ @typing.overload + def __new__( + cls, + scheme: opendal.services.Scheme.Sftp | typing.Literal["sftp"], + /, + *, + enable_copy: builtins.bool = ..., + endpoint: builtins.str = ..., + key: builtins.str = ..., + known_hosts_strategy: builtins.str = ..., + root: builtins.str = ..., + user: builtins.str = ..., + ) -> typing_extensions.Self: + r""" + Create a new `Operator` for `sftp` service. + + Parameters + ---------- + enable_copy : builtins.bool, optional + enable_copy of this backend + endpoint : builtins.str, optional + endpoint of this backend + key : builtins.str, optional + key of this backend + known_hosts_strategy : builtins.str, optional + known_hosts_strategy of this backend + root : builtins.str, optional + root of this backend + user : builtins.str, optional + user of this backend + + Returns + ------- + Operator + The new `Operator` for `sftp` service + """ + @typing.overload def __new__( cls, scheme: opendal.services.Scheme.Seafile | typing.Literal["seafile"], /, *, + endpoint: builtins.str = ..., + password: builtins.str = ..., repo_name: builtins.str, root: builtins.str = ..., - endpoint: builtins.str = ..., username: builtins.str = ..., - password: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `seafile` service. Parameters ---------- + endpoint : builtins.str, optional + endpoint address of this backend. + password : builtins.str, optional + password of this backend. repo_name : builtins.str repo_name of this backend. required. root : builtins.str, optional root of this backend. All operations will happen under this root. - endpoint : builtins.str, optional - endpoint address of this backend. username : builtins.str, optional username of this backend. - password : builtins.str, optional - password of this backend. Returns ------- @@ -2590,50 +2692,121 @@ class Operator: scheme: opendal.services.Scheme.S3 | typing.Literal["s3"], /, *, + access_key_id: builtins.str = ..., + allow_anonymous: builtins.bool = ..., + batch_max_operations: builtins.int = ..., bucket: builtins.str, - root: builtins.str = ..., + checksum_algorithm: builtins.str = ..., + default_storage_class: builtins.str = ..., + delete_max_size: builtins.int = ..., + disable_config_load: builtins.bool = ..., + disable_ec2_metadata: builtins.bool = ..., + disable_list_objects_v2: builtins.bool = ..., + disable_stat_with_override: builtins.bool = ..., + disable_write_with_if_match: builtins.bool = ..., + enable_request_payer: builtins.bool = ..., enable_versioning: builtins.bool = ..., + enable_virtual_host_style: builtins.bool = ..., + enable_write_with_append: builtins.bool = ..., endpoint: builtins.str = ..., + external_id: builtins.str = ..., region: builtins.str = ..., - access_key_id: builtins.str = ..., - secret_access_key: builtins.str = ..., - session_token: builtins.str = ..., role_arn: builtins.str = ..., - external_id: builtins.str = ..., role_session_name: builtins.str = ..., - disable_config_load: builtins.bool = ..., - disable_ec2_metadata: builtins.bool = ..., - allow_anonymous: builtins.bool = ..., + root: builtins.str = ..., + secret_access_key: builtins.str = ..., server_side_encryption: builtins.str = ..., server_side_encryption_aws_kms_key_id: builtins.str = ..., server_side_encryption_customer_algorithm: builtins.str = ..., server_side_encryption_customer_key: builtins.str = ..., server_side_encryption_customer_key_md5: builtins.str = ..., - default_storage_class: builtins.str = ..., - enable_virtual_host_style: builtins.bool = ..., - batch_max_operations: builtins.int = ..., - delete_max_size: builtins.int = ..., - disable_stat_with_override: builtins.bool = ..., - checksum_algorithm: builtins.str = ..., - disable_write_with_if_match: builtins.bool = ..., - enable_write_with_append: builtins.bool = ..., - disable_list_objects_v2: builtins.bool = ..., - enable_request_payer: builtins.bool = ..., + session_token: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `s3` service. Parameters ---------- + access_key_id : builtins.str, optional + 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 : builtins.bool, optional + Allow anonymous will allow opendal to send request + without signing when credential is not loaded. + batch_max_operations : builtins.int, optional + Set maximum batch operations of this backend. + Some compatible services have a limit on the number + of operations in a batch request. + For example, R2 could return `Internal Error` while + batch delete 1000 files. + Please tune this value based on services' document. bucket : builtins.str bucket name of this backend. required. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. - default to `/` if not set. + checksum_algorithm : builtins.str, optional + 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" + default_storage_class : builtins.str, optional + 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 : builtins.int, optional + Set the maximum delete size of this backend. + Some compatible services have a limit on the number + of operations in a batch request. + For example, R2 could return `Internal Error` while + batch delete 1000 files. + Please tune this value based on services' document. + disable_config_load : builtins.bool, optional + 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 : builtins.bool, optional + 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 : builtins.bool, optional + 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 : builtins.bool, optional + Disable stat with override so that opendal will not + send stat request with override queries. + For example, R2 doesn't support stat with + `response_content_type` query. + disable_write_with_if_match : builtins.bool, optional + Disable write with if match so that opendal will not + send write request with if match headers. + For example, Ceph RADOS S3 doesn't support write + with if match. + enable_request_payer : builtins.bool, optional + Indicates whether the client agrees to pay for the + requests made to the S3 bucket. enable_versioning : builtins.bool, optional is bucket versioning enabled for this bucket + enable_virtual_host_style : builtins.bool, optional + 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 : builtins.bool, optional + Enable write with append so that opendal will send + write request with append headers. endpoint : builtins.str, optional endpoint of this backend. Endpoint must be full uri, e.g. @@ -2650,6 +2823,8 @@ class Operator: - If not, we will try to load it from environment. - If still not set, default to `https://s3.amazonaws.com`. + external_id : builtins.str, optional + external_id for this backend. region : builtins.str, optional Region represent the signing region of this endpoint. @@ -2658,42 +2833,22 @@ class Operator: 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. - access_key_id : builtins.str, optional - 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. - secret_access_key : builtins.str, optional - 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. - session_token : builtins.str, optional - session_token (aka, security token) of this backend. - This token will expire after sometime, it's - recommended to set session_token by hand. role_arn : builtins.str, optional 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`. - external_id : builtins.str, optional - external_id for this backend. role_session_name : builtins.str, optional role_session_name for this backend. - disable_config_load : builtins.bool, optional - 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 : builtins.bool, optional - 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 - allow_anonymous : builtins.bool, optional - Allow anonymous will allow opendal to send request - without signing when credential is not loaded. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. + default to `/` if not set. + secret_access_key : builtins.str, optional + 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 : builtins.str, optional server_side_encryption for this backend. Available values: `AES256`, `aws:kms`. @@ -2727,63 +2882,10 @@ class Operator: backend. Value: MD5 digest of key specified in `server_side_encryption_customer_key`. - default_storage_class : builtins.str, optional - 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 - enable_virtual_host_style : builtins.bool, optional - 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` - batch_max_operations : builtins.int, optional - Set maximum batch operations of this backend. - Some compatible services have a limit on the number - of operations in a batch request. - For example, R2 could return `Internal Error` while - batch delete 1000 files. - Please tune this value based on services' document. - delete_max_size : builtins.int, optional - Set the maximum delete size of this backend. - Some compatible services have a limit on the number - of operations in a batch request. - For example, R2 could return `Internal Error` while - batch delete 1000 files. - Please tune this value based on services' document. - disable_stat_with_override : builtins.bool, optional - Disable stat with override so that opendal will not - send stat request with override queries. - For example, R2 doesn't support stat with - `response_content_type` query. - checksum_algorithm : builtins.str, optional - 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" - disable_write_with_if_match : builtins.bool, optional - Disable write with if match so that opendal will not - send write request with if match headers. - For example, Ceph RADOS S3 doesn't support write - with if match. - enable_write_with_append : builtins.bool, optional - Enable write with append so that opendal will send - write request with append headers. - disable_list_objects_v2 : builtins.bool, optional - 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. - enable_request_payer : builtins.bool, optional - Indicates whether the client agrees to pay for the - requests made to the S3 bucket. + session_token : builtins.str, optional + session_token (aka, security token) of this backend. + This token will expire after sometime, it's + recommended to set session_token by hand. Returns ------- @@ -2796,45 +2898,45 @@ class Operator: scheme: opendal.services.Scheme.Redis | typing.Literal["redis"], /, *, + cluster_endpoints: builtins.str = ..., db: builtins.int, + default_ttl: typing.Any = ..., endpoint: builtins.str = ..., - cluster_endpoints: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., root: builtins.str = ..., - default_ttl: typing.Any = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `redis` service. Parameters ---------- + cluster_endpoints : builtins.str, optional + 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 db : builtins.int the number of DBs redis can take is unlimited default is db 0 + default_ttl : typing.Any, optional + The default ttl for put operations.. + a human readable duration string see + https://docs.rs/humantime/latest/humantime/fn.parse_duration.html + for more details endpoint : builtins.str, optional network address of the Redis service. Can be "tcp://127.0.0.1:6379", e.g. default is "tcp://127.0.0.1:6379" - cluster_endpoints : builtins.str, optional - 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 - username : builtins.str, optional - the username to connect redis service. - default is None password : builtins.str, optional the password for authentication default is None root : builtins.str, optional the working directory of the Redis service. Can be "/path/to/dir" default is "/" - default_ttl : typing.Any, optional - The default ttl for put operations.. - a human readable duration string see - https://docs.rs/humantime/latest/humantime/fn.parse_duration.html - for more details + username : builtins.str, optional + the username to connect redis service. + default is None Returns ------- @@ -2874,10 +2976,10 @@ class Operator: scheme: opendal.services.Scheme.Postgresql | typing.Literal["postgresql"], /, *, - root: builtins.str = ..., connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., + root: builtins.str = ..., + table: builtins.str = ..., value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -2885,10 +2987,6 @@ class Operator: Parameters ---------- - root : builtins.str, optional - Root of this backend. - All operations will happen under this root. - Default to `/` if not set. connection_string : builtins.str, optional The URL should be with a scheme of either `postgres://` or `postgresql://`. @@ -2900,10 +2998,14 @@ class Operator: `postgresql:///mydb?user=user&host=/var/lib/postgresql` For more information, please visit . - table : builtins.str, optional - the table of postgresql key_field : builtins.str, optional the key field of postgresql + root : builtins.str, optional + Root of this backend. + All operations will happen under this root. + Default to `/` if not set. + table : builtins.str, optional + the table of postgresql value_field : builtins.str, optional the value field of postgresql @@ -2919,8 +3021,8 @@ class Operator: /, *, datafile: builtins.str = ..., - segment: builtins.str = ..., index: builtins.str = ..., + segment: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `persy` service. @@ -2930,10 +3032,10 @@ class Operator: datafile : builtins.str, optional That path to the persy data file. The directory in the path must already exist. - segment : builtins.str, optional - That name of the persy segment. index : builtins.str, optional That name of the persy index. + segment : builtins.str, optional + That name of the persy segment. Returns ------- @@ -2946,25 +3048,25 @@ class Operator: scheme: opendal.services.Scheme.Oss | typing.Literal["oss"], /, *, - bucket: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - presign_endpoint: builtins.str = ..., - addressing_style: builtins.str = ..., - presign_addressing_style: builtins.str = ..., - enable_versioning: builtins.bool = ..., - server_side_encryption: builtins.str = ..., - server_side_encryption_key_id: builtins.str = ..., - allow_anonymous: builtins.bool = ..., access_key_id: builtins.str = ..., access_key_secret: builtins.str = ..., - security_token: builtins.str = ..., + addressing_style: builtins.str = ..., + allow_anonymous: builtins.bool = ..., batch_max_operations: builtins.int = ..., + bucket: builtins.str, delete_max_size: builtins.int = ..., - role_arn: builtins.str = ..., - role_session_name: builtins.str = ..., + enable_versioning: builtins.bool = ..., + endpoint: builtins.str = ..., oidc_provider_arn: builtins.str = ..., oidc_token_file: builtins.str = ..., + presign_addressing_style: builtins.str = ..., + presign_endpoint: builtins.str = ..., + role_arn: builtins.str = ..., + role_session_name: builtins.str = ..., + root: builtins.str = ..., + security_token: builtins.str = ..., + server_side_encryption: builtins.str = ..., + server_side_encryption_key_id: builtins.str = ..., sts_endpoint: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -2972,26 +3074,6 @@ class Operator: Parameters ---------- - bucket : builtins.str - Bucket for oss. - root : builtins.str, optional - Root for oss. - endpoint : builtins.str, optional - Endpoint for oss. - presign_endpoint : builtins.str, optional - Presign endpoint for oss. - addressing_style : builtins.str, optional - Addressing style for oss. - presign_addressing_style : builtins.str, optional - Pre sign addressing style for oss. - enable_versioning : builtins.bool, optional - is bucket versioning enabled for this bucket - server_side_encryption : builtins.str, optional - Server side encryption for oss. - server_side_encryption_key_id : builtins.str, optional - Server side encryption key id for oss. - allow_anonymous : builtins.bool, optional - Allow anonymous for oss. access_key_id : builtins.str, optional Access key id for oss. - this field if it's `is_some` - env value: @@ -3000,22 +3082,20 @@ class Operator: Access key secret for oss. - this field if it's `is_some` - env value: [`ALIBABA_CLOUD_ACCESS_KEY_SECRET`] - security_token : builtins.str, optional - `security_token` will be loaded from - this field if - it's `is_some` - env value: - [`ALIBABA_CLOUD_SECURITY_TOKEN`] + addressing_style : builtins.str, optional + Addressing style for oss. + allow_anonymous : builtins.bool, optional + Allow anonymous for oss. batch_max_operations : builtins.int, optional The size of max batch operations. + bucket : builtins.str + Bucket for oss. delete_max_size : builtins.int, optional The size of max delete operations. - role_arn : builtins.str, optional - 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 : builtins.str, optional - role_session_name for this backend. + enable_versioning : builtins.bool, optional + is bucket versioning enabled for this bucket + endpoint : builtins.str, optional + Endpoint for oss. oidc_provider_arn : builtins.str, optional `oidc_provider_arn` will be loaded from - this field if it's `is_some` - env value: @@ -3024,6 +3104,28 @@ class Operator: `oidc_token_file` will be loaded from - this field if it's `is_some` - env value: [`ALIBABA_CLOUD_OIDC_TOKEN_FILE`] + presign_addressing_style : builtins.str, optional + Pre sign addressing style for oss. + presign_endpoint : builtins.str, optional + Presign endpoint for oss. + role_arn : builtins.str, optional + 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 : builtins.str, optional + role_session_name for this backend. + root : builtins.str, optional + Root for oss. + security_token : builtins.str, optional + `security_token` will be loaded from - this field if + it's `is_some` - env value: + [`ALIBABA_CLOUD_SECURITY_TOKEN`] + server_side_encryption : builtins.str, optional + Server side encryption for oss. + server_side_encryption_key_id : builtins.str, optional + Server side encryption key id for oss. sts_endpoint : builtins.str, optional `sts_endpoint` will be loaded from - this field if it's `is_some` - env value: @@ -3040,26 +3142,20 @@ class Operator: scheme: opendal.services.Scheme.Onedrive | typing.Literal["onedrive"], /, *, - root: builtins.str = ..., access_token: builtins.str = ..., - refresh_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., enable_versioning: builtins.bool = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `onedrive` service. Parameters ---------- - root : builtins.str, optional - The root path for the OneDrive service for the file - access access_token : builtins.str, optional Microsoft Graph API (also OneDrive API) access token - refresh_token : builtins.str, optional - Microsoft Graph API (also OneDrive API) refresh - token client_id : builtins.str, optional Microsoft Graph API Application (client) ID that is in the Azure's app registration portal @@ -3068,6 +3164,12 @@ class Operator: is in the Azure's app registration portal enable_versioning : builtins.bool, optional Enabling version support + refresh_token : builtins.str, optional + Microsoft Graph API (also OneDrive API) refresh + token + root : builtins.str, optional + The root path for the OneDrive service for the file + access Returns ------- @@ -3080,30 +3182,30 @@ class Operator: scheme: opendal.services.Scheme.Obs | typing.Literal["obs"], /, *, - root: builtins.str = ..., - endpoint: builtins.str = ..., access_key_id: builtins.str = ..., - secret_access_key: builtins.str = ..., bucket: builtins.str = ..., enable_versioning: builtins.bool = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., + secret_access_key: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `obs` service. Parameters ---------- - root : builtins.str, optional - Root for obs. - endpoint : builtins.str, optional - Endpoint for obs. access_key_id : builtins.str, optional Access key id for obs. - secret_access_key : builtins.str, optional - Secret access key for obs. bucket : builtins.str, optional Bucket for obs. enable_versioning : builtins.bool, optional Is bucket versioning enabled for this bucket + endpoint : builtins.str, optional + Endpoint for obs. + root : builtins.str, optional + Root for obs. + secret_access_key : builtins.str, optional + Secret access key for obs. Returns ------- @@ -3117,10 +3219,10 @@ class Operator: /, *, connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., - value_field: builtins.str = ..., root: builtins.str = ..., + table: builtins.str = ..., + value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `mysql` service. @@ -3141,14 +3243,14 @@ class Operator: `mysql://user:password@localhost:3306/db` For more information, please refer to . - table : builtins.str, optional - The table name for mysql. key_field : builtins.str, optional The key field name for mysql. - value_field : builtins.str, optional - The value field name for mysql. root : builtins.str, optional The root for mysql. + table : builtins.str, optional + The table name for mysql. + value_field : builtins.str, optional + The value field name for mysql. Returns ------- @@ -3161,11 +3263,11 @@ class Operator: scheme: opendal.services.Scheme.Mongodb | typing.Literal["mongodb"], /, *, + collection: builtins.str = ..., connection_string: builtins.str = ..., database: builtins.str = ..., - collection: builtins.str = ..., - root: builtins.str = ..., key_field: builtins.str = ..., + root: builtins.str = ..., value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -3173,16 +3275,16 @@ class Operator: Parameters ---------- + collection : builtins.str, optional + collection of this backend connection_string : builtins.str, optional connection string of this backend database : builtins.str, optional database of this backend - collection : builtins.str, optional - collection of this backend - root : builtins.str, optional - root of this backend key_field : builtins.str, optional key field of this backend + root : builtins.str, optional + root of this backend value_field : builtins.str, optional value field of this backend @@ -3197,33 +3299,33 @@ class Operator: scheme: opendal.services.Scheme.Moka | typing.Literal["moka"], /, *, - name: builtins.str = ..., max_capacity: builtins.int = ..., - time_to_live: builtins.str = ..., - time_to_idle: builtins.str = ..., + name: builtins.str = ..., root: builtins.str = ..., + time_to_idle: builtins.str = ..., + time_to_live: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `moka` service. Parameters ---------- - name : builtins.str, optional - Name for this cache instance. max_capacity : builtins.int, optional 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) - time_to_live : builtins.str, optional - 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) + name : builtins.str, optional + Name for this cache instance. + root : builtins.str, optional + root path of this backend time_to_idle : builtins.str, optional 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) - root : builtins.str, optional - root path of this backend + time_to_live : builtins.str, optional + 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) Returns ------- @@ -3237,9 +3339,9 @@ class Operator: /, *, max_capacity: builtins.int = ..., - time_to_live: builtins.str = ..., - time_to_idle: builtins.str = ..., root: builtins.str = ..., + time_to_idle: builtins.str = ..., + time_to_live: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `mini-moka` service. @@ -3250,16 +3352,16 @@ class Operator: 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) - time_to_live : builtins.str, optional - 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) + root : builtins.str, optional + root path of this backend time_to_idle : builtins.str, optional 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) - root : builtins.str, optional - root path of this backend + time_to_live : builtins.str, optional + 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) Returns ------- @@ -3293,32 +3395,32 @@ class Operator: scheme: opendal.services.Scheme.Memcached | typing.Literal["memcached"], /, *, + default_ttl: typing.Any = ..., endpoint: builtins.str = ..., + password: builtins.str = ..., root: builtins.str = ..., username: builtins.str = ..., - password: builtins.str = ..., - default_ttl: typing.Any = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `memcached` service. Parameters ---------- + default_ttl : typing.Any, optional + The default ttl for put operations.. + a human readable duration string see + https://docs.rs/humantime/latest/humantime/fn.parse_duration.html + for more details endpoint : builtins.str, optional network address of the memcached service. For example: "tcp://localhost:11211" + password : builtins.str, optional + Memcached password, optional. root : builtins.str, optional the working directory of the service. Can be "/path/to/dir" default is "/" username : builtins.str, optional Memcached username, optional. - password : builtins.str, optional - Memcached password, optional. - default_ttl : typing.Any, optional - The default ttl for put operations.. - a human readable duration string see - https://docs.rs/humantime/latest/humantime/fn.parse_duration.html - for more details Returns ------- @@ -3331,26 +3433,26 @@ class Operator: scheme: opendal.services.Scheme.Koofr | typing.Literal["koofr"], /, *, - endpoint: builtins.str, email: builtins.str, - root: builtins.str = ..., + endpoint: builtins.str, password: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `koofr` service. Parameters ---------- - endpoint : builtins.str - Koofr endpoint. email : builtins.str Koofr email. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. + endpoint : builtins.str + Koofr endpoint. password : builtins.str, optional password of this backend. (Must be the application password) + root : builtins.str, optional + root of this backend. + All operations will happen under this root. Returns ------- @@ -3363,18 +3465,18 @@ class Operator: scheme: opendal.services.Scheme.Ipmfs | typing.Literal["ipmfs"], /, *, - root: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `ipmfs` service. Parameters ---------- - root : builtins.str, optional - Root for ipfs. endpoint : builtins.str, optional Endpoint for ipfs. + root : builtins.str, optional + Root for ipfs. Returns ------- @@ -3411,8 +3513,8 @@ class Operator: scheme: opendal.services.Scheme.Huggingface | typing.Literal["huggingface"], /, *, - repo_type: builtins.str = ..., repo_id: builtins.str = ..., + repo_type: builtins.str = ..., revision: builtins.str = ..., root: builtins.str = ..., token: builtins.str = ..., @@ -3422,13 +3524,13 @@ class Operator: Parameters ---------- + repo_id : builtins.str, optional + Repo id of this backend. + This is required. repo_type : builtins.str, optional Repo type of this backend. Default is model. Available values: - model - dataset - repo_id : builtins.str, optional - Repo id of this backend. - This is required. revision : builtins.str, optional Revision of this backend. Default is main. @@ -3452,10 +3554,10 @@ class Operator: /, *, endpoint: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., - token: builtins.str = ..., root: builtins.str = ..., + token: builtins.str = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `http` service. @@ -3464,14 +3566,14 @@ class Operator: ---------- endpoint : builtins.str, optional endpoint of this backend - username : builtins.str, optional - username of this backend password : builtins.str, optional password of this backend - token : builtins.str, optional - token of this backend root : builtins.str, optional root of this backend + token : builtins.str, optional + token of this backend + username : builtins.str, optional + username of this backend Returns ------- @@ -3484,21 +3586,21 @@ class Operator: scheme: opendal.services.Scheme.HdfsNative | typing.Literal["hdfs-native"], /, *, - root: builtins.str = ..., - name_node: builtins.str = ..., enable_append: builtins.bool = ..., + name_node: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `hdfs-native` service. Parameters ---------- - root : builtins.str, optional - work dir of this backend - name_node : builtins.str, optional - name_node of this backend enable_append : builtins.bool, optional enable the append capacity + name_node : builtins.str, optional + name_node of this backend + root : builtins.str, optional + work dir of this backend Returns ------- @@ -3511,10 +3613,10 @@ class Operator: scheme: opendal.services.Scheme.Gridfs | typing.Literal["gridfs"], /, *, - connection_string: builtins.str = ..., - database: builtins.str = ..., bucket: builtins.str = ..., chunk_size: builtins.int = ..., + connection_string: builtins.str = ..., + database: builtins.str = ..., root: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -3522,17 +3624,17 @@ class Operator: Parameters ---------- - connection_string : builtins.str, optional - The connection string of the MongoDB service. - database : builtins.str, optional - The database name of the MongoDB GridFs service to - read/write. bucket : builtins.str, optional The bucket name of the MongoDB GridFs service to read/write. chunk_size : builtins.int, optional The chunk size of the MongoDB GridFs service used to break the user file into chunks. + connection_string : builtins.str, optional + The connection string of the MongoDB service. + database : builtins.str, optional + The database name of the MongoDB GridFs service to + read/write. root : builtins.str, optional The working directory, all operations will be performed under it. @@ -3548,24 +3650,24 @@ class Operator: scheme: opendal.services.Scheme.Ghac | typing.Literal["ghac"], /, *, - root: builtins.str = ..., - version: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., runtime_token: builtins.str = ..., + version: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `ghac` service. Parameters ---------- - root : builtins.str, optional - The root path for ghac. - version : builtins.str, optional - The version that used by cache. endpoint : builtins.str, optional The endpoint for ghac service. + root : builtins.str, optional + The root path for ghac. runtime_token : builtins.str, optional The runtime token for ghac service. + version : builtins.str, optional + The version that used by cache. Returns ------- @@ -3578,27 +3680,27 @@ class Operator: scheme: opendal.services.Scheme.Gdrive | typing.Literal["gdrive"], /, *, - root: builtins.str = ..., access_token: builtins.str = ..., - refresh_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `gdrive` service. Parameters ---------- - root : builtins.str, optional - The root for gdrive access_token : builtins.str, optional Access token for gdrive. - refresh_token : builtins.str, optional - Refresh token for gdrive. client_id : builtins.str, optional Client id for gdrive. client_secret : builtins.str, optional Client secret for gdrive. + refresh_token : builtins.str, optional + Refresh token for gdrive. + root : builtins.str, optional + The root for gdrive Returns ------- @@ -3611,18 +3713,18 @@ class Operator: scheme: opendal.services.Scheme.Gcs | typing.Literal["gcs"], /, *, + allow_anonymous: builtins.bool = ..., bucket: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - scope: builtins.str = ..., - service_account: builtins.str = ..., credential: builtins.str = ..., credential_path: builtins.str = ..., - predefined_acl: builtins.str = ..., default_storage_class: builtins.str = ..., - allow_anonymous: builtins.bool = ..., - disable_vm_metadata: builtins.bool = ..., disable_config_load: builtins.bool = ..., + disable_vm_metadata: builtins.bool = ..., + endpoint: builtins.str = ..., + predefined_acl: builtins.str = ..., + root: builtins.str = ..., + scope: builtins.str = ..., + service_account: builtins.str = ..., token: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -3630,35 +3732,35 @@ class Operator: Parameters ---------- + allow_anonymous : builtins.bool, optional + Allow opendal to send requests without signing when + credentials are not loaded. bucket : builtins.str bucket name - root : builtins.str, optional - root URI, all operations happens under `root` - endpoint : builtins.str, optional - endpoint URI of GCS service, default is - `https://storage.googleapis.com` - scope : builtins.str, optional - Scope for gcs. - service_account : builtins.str, optional - Service Account for gcs. credential : builtins.str, optional Credentials string for GCS service OAuth2 authentication. credential_path : builtins.str, optional Local path to credentials file for GCS service OAuth2 authentication. - predefined_acl : builtins.str, optional - The predefined acl for GCS. default_storage_class : builtins.str, optional The default storage class used by gcs. - allow_anonymous : builtins.bool, optional - Allow opendal to send requests without signing when - credentials are not loaded. + disable_config_load : builtins.bool, optional + Disable loading configuration from the environment. disable_vm_metadata : builtins.bool, optional Disable attempting to load credentials from the GCE metadata server when running within Google Cloud. - disable_config_load : builtins.bool, optional - Disable loading configuration from the environment. + endpoint : builtins.str, optional + endpoint URI of GCS service, default is + `https://storage.googleapis.com` + predefined_acl : builtins.str, optional + The predefined acl for GCS. + root : builtins.str, optional + root URI, all operations happens under `root` + scope : builtins.str, optional + Scope for gcs. + service_account : builtins.str, optional + Service Account for gcs. token : builtins.str, optional A Google Cloud OAuth2 token. Takes precedence over `credential` and @@ -3672,21 +3774,51 @@ class Operator: @typing.overload def __new__( cls, - scheme: opendal.services.Scheme.Fs | typing.Literal["fs"], + scheme: opendal.services.Scheme.Ftp | typing.Literal["ftp"], /, *, + endpoint: builtins.str = ..., + password: builtins.str = ..., root: builtins.str = ..., + user: builtins.str = ..., + ) -> typing_extensions.Self: + r""" + Create a new `Operator` for `ftp` service. + + Parameters + ---------- + endpoint : builtins.str, optional + endpoint of this backend + password : builtins.str, optional + password of this backend + root : builtins.str, optional + root of this backend + user : builtins.str, optional + user of this backend + + Returns + ------- + Operator + The new `Operator` for `ftp` service + """ + @typing.overload + def __new__( + cls, + scheme: opendal.services.Scheme.Fs | typing.Literal["fs"], + /, + *, atomic_write_dir: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `fs` service. Parameters ---------- - root : builtins.str, optional - root dir for backend atomic_write_dir : builtins.str, optional tmp dir for atomic write + root : builtins.str, optional + root dir for backend Returns ------- @@ -3699,27 +3831,27 @@ class Operator: scheme: opendal.services.Scheme.Dropbox | typing.Literal["dropbox"], /, *, - root: builtins.str = ..., access_token: builtins.str = ..., - refresh_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `dropbox` service. Parameters ---------- - root : builtins.str, optional - root path for dropbox. access_token : builtins.str, optional access token for dropbox. - refresh_token : builtins.str, optional - refresh_token for dropbox. client_id : builtins.str, optional client_id for dropbox. client_secret : builtins.str, optional client_secret for dropbox. + refresh_token : builtins.str, optional + refresh_token for dropbox. + root : builtins.str, optional + root path for dropbox. Returns ------- @@ -3753,34 +3885,34 @@ class Operator: scheme: opendal.services.Scheme.Cos | typing.Literal["cos"], /, *, - root: builtins.str = ..., + bucket: builtins.str = ..., + disable_config_load: builtins.bool = ..., + enable_versioning: builtins.bool = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., secret_id: builtins.str = ..., secret_key: builtins.str = ..., - bucket: builtins.str = ..., - enable_versioning: builtins.bool = ..., - disable_config_load: builtins.bool = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `cos` service. Parameters ---------- - root : builtins.str, optional - Root of this backend. + bucket : builtins.str, optional + Bucket of this backend. + disable_config_load : builtins.bool, optional + Disable config load so that opendal will not load + config from + enable_versioning : builtins.bool, optional + is bucket versioning enabled for this bucket endpoint : builtins.str, optional Endpoint of this backend. + root : builtins.str, optional + Root of this backend. secret_id : builtins.str, optional Secret ID of this backend. secret_key : builtins.str, optional Secret key of this backend. - bucket : builtins.str, optional - Bucket of this backend. - enable_versioning : builtins.bool, optional - is bucket versioning enabled for this bucket - disable_config_load : builtins.bool, optional - Disable config load so that opendal will not load - config from Returns ------- @@ -3814,17 +3946,27 @@ class Operator: scheme: opendal.services.Scheme.B2 | typing.Literal["b2"], /, *, + application_key: builtins.str = ..., + application_key_id: builtins.str = ..., bucket: builtins.str, bucket_id: builtins.str, root: builtins.str = ..., - application_key_id: builtins.str = ..., - application_key: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `b2` service. Parameters ---------- + application_key : builtins.str, optional + 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 : builtins.str, optional + 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 : builtins.str bucket of this backend. required. @@ -3834,16 +3976,6 @@ class Operator: root : builtins.str, optional root of this backend. All operations will happen under this root. - application_key_id : builtins.str, optional - 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. - application_key : builtins.str, optional - 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. Returns ------- @@ -3856,30 +3988,30 @@ class Operator: scheme: opendal.services.Scheme.Azfile | typing.Literal["azfile"], /, *, - share_name: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., + account_name: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., sas_token: builtins.str = ..., + share_name: builtins.str, ) -> typing_extensions.Self: r""" Create a new `Operator` for `azfile` service. Parameters ---------- - share_name : builtins.str - The share name for azfile. - root : builtins.str, optional - The root path for azfile. - endpoint : builtins.str, optional - The endpoint for azfile. - account_name : builtins.str, optional - The account name for azfile. account_key : builtins.str, optional The account key for azfile. + account_name : builtins.str, optional + The account name for azfile. + endpoint : builtins.str, optional + The endpoint for azfile. + root : builtins.str, optional + The root path for azfile. sas_token : builtins.str, optional The sas token for azfile. + share_name : builtins.str + The share name for azfile. Returns ------- @@ -3892,51 +4024,51 @@ class Operator: scheme: opendal.services.Scheme.Azdls | typing.Literal["azdls"], /, *, - filesystem: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., - client_secret: builtins.str = ..., - tenant_id: builtins.str = ..., + account_name: builtins.str = ..., + authority_host: builtins.str = ..., client_id: builtins.str = ..., + client_secret: builtins.str = ..., + endpoint: builtins.str = ..., + filesystem: builtins.str, + root: builtins.str = ..., sas_token: builtins.str = ..., - authority_host: builtins.str = ..., + tenant_id: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `azdls` service. Parameters ---------- - filesystem : builtins.str - Filesystem name of this backend. - root : builtins.str, optional - Root of this backend. - endpoint : builtins.str, optional - Endpoint of this backend. - account_name : builtins.str, optional - Account name of this backend. account_key : builtins.str, optional Account key of this backend. - required for shared_key authentication - client_secret : builtins.str, optional - client_secret The client secret of the service + account_name : builtins.str, optional + Account name of this backend. + authority_host : builtins.str, optional + authority_host The authority host of the service principal. - - required for client_credentials authentication - tenant_id : builtins.str, optional - tenant_id The tenant id of the service principal. - - required for client_credentials authentication + - required for client_credentials authentication - + default value: `https://login.microsoftonline.com` client_id : builtins.str, optional client_id The client id of the service principal. - required for client_credentials authentication + client_secret : builtins.str, optional + client_secret The client secret of the service + principal. + - required for client_credentials authentication + endpoint : builtins.str, optional + Endpoint of this backend. + filesystem : builtins.str + Filesystem name of this backend. + root : builtins.str, optional + Root of this backend. sas_token : builtins.str, optional sas_token The shared access signature token. - required for sas authentication - authority_host : builtins.str, optional - authority_host The authority host of the service - principal. - - required for client_credentials authentication - - default value: `https://login.microsoftonline.com` + tenant_id : builtins.str, optional + tenant_id The tenant id of the service principal. + - required for client_credentials authentication Returns ------- @@ -3949,48 +4081,48 @@ class Operator: scheme: opendal.services.Scheme.Azblob | typing.Literal["azblob"], /, *, - container: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., + account_name: builtins.str = ..., + batch_max_operations: builtins.int = ..., + container: builtins.str, + encryption_algorithm: builtins.str = ..., encryption_key: builtins.str = ..., encryption_key_sha256: builtins.str = ..., - encryption_algorithm: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., sas_token: builtins.str = ..., - batch_max_operations: builtins.int = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `azblob` service. Parameters ---------- + account_key : builtins.str, optional + The account key of Azblob service backend. + account_name : builtins.str, optional + The account name of Azblob service backend. + batch_max_operations : builtins.int, optional + The maximum batch operations of Azblob service + backend. container : builtins.str The container name of Azblob service backend. - root : builtins.str, optional - The root of Azblob service backend. - All operations will happen under this root. + encryption_algorithm : builtins.str, optional + The encryption algorithm of Azblob service backend. + encryption_key : builtins.str, optional + The encryption key of Azblob service backend. + encryption_key_sha256 : builtins.str, optional + The encryption key sha256 of Azblob service backend. endpoint : builtins.str, optional 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` - account_name : builtins.str, optional - The account name of Azblob service backend. - account_key : builtins.str, optional - The account key of Azblob service backend. - encryption_key : builtins.str, optional - The encryption key of Azblob service backend. - encryption_key_sha256 : builtins.str, optional - The encryption key sha256 of Azblob service backend. - encryption_algorithm : builtins.str, optional - The encryption algorithm of Azblob service backend. + root : builtins.str, optional + The root of Azblob service backend. + All operations will happen under this root. sas_token : builtins.str, optional The sas token of Azblob service backend. - batch_max_operations : builtins.int, optional - The maximum batch operations of Azblob service - backend. Returns ------- @@ -4003,22 +4135,22 @@ class Operator: scheme: opendal.services.Scheme.Alluxio | typing.Literal["alluxio"], /, *, - root: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `alluxio` service. Parameters ---------- - root : builtins.str, optional - root of this backend. - All operations will happen under this root. - default to `/` if not set. endpoint : builtins.str, optional endpoint of this backend. Endpoint must be full uri, mostly like `http://127.0.0.1:39999`. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. + default to `/` if not set. Returns ------- @@ -4031,29 +4163,18 @@ class Operator: scheme: opendal.services.Scheme.AliyunDrive | typing.Literal["aliyun-drive"], /, *, - drive_type: builtins.str, - root: builtins.str = ..., access_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., + drive_type: builtins.str, refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `aliyun-drive` service. Parameters ---------- - drive_type : builtins.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. - root : builtins.str, optional - The Root of this backend. - All operations will happen under this root. - Default to `/` if not set. access_token : builtins.str, optional The access_token of this backend. Solution for client-only purpose. @@ -4065,9 +4186,20 @@ class Operator: client_secret : builtins.str, optional The client_secret of this backend. Required if no access_token is provided. + drive_type : builtins.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 : builtins.str, optional The refresh_token of this backend. Required if no access_token is provided. + root : builtins.str, optional + The Root of this backend. + All operations will happen under this root. + Default to `/` if not set. Returns ------- diff --git a/bindings/python/python/opendal/services.pyi b/bindings/python/python/opendal/services.pyi index edfda5dd3a10..b5a279ea73cb 100644 --- a/bindings/python/python/opendal/services.pyi +++ b/bindings/python/python/opendal/services.pyi @@ -45,6 +45,7 @@ class Scheme(enum.Enum): Dashmap = ... Dropbox = ... Fs = ... + Ftp = ... Gcs = ... Gdrive = ... Ghac = ... @@ -70,6 +71,7 @@ class Scheme(enum.Enum): Redis = ... S3 = ... Seafile = ... + Sftp = ... Sled = ... Sqlite = ... Swift = ... diff --git a/bindings/python/src/services.rs b/bindings/python/src/services.rs index 621c2cdfad70..377f3cce0f5e 100644 --- a/bindings/python/src/services.rs +++ b/bindings/python/src/services.rs @@ -67,6 +67,8 @@ pub enum PyScheme { Dropbox, #[cfg(feature = "services-fs")] Fs, + #[cfg(feature = "services-ftp")] + Ftp, #[cfg(feature = "services-gcs")] Gcs, #[cfg(feature = "services-gdrive")] @@ -117,6 +119,8 @@ pub enum PyScheme { S3, #[cfg(feature = "services-seafile")] Seafile, + #[cfg(feature = "services-sftp")] + Sftp, #[cfg(feature = "services-sled")] Sled, #[cfg(feature = "services-sqlite")] @@ -162,29 +166,18 @@ submit! { scheme: typing.Union[opendal.services.Scheme.AliyunDrive, typing.Literal["aliyun-drive"]], /, *, - drive_type: builtins.str, - root: builtins.str = ..., access_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., + drive_type: builtins.str, refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `aliyun-drive` service. Parameters ---------- - drive_type : builtins.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. - root : builtins.str, optional - The Root of this backend. - All operations will happen under this root. - Default to `/` if not set. access_token : builtins.str, optional The access_token of this backend. Solution for client-only purpose. @@ -196,9 +189,20 @@ submit! { client_secret : builtins.str, optional The client_secret of this backend. Required if no access_token is provided. + drive_type : builtins.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 : builtins.str, optional The refresh_token of this backend. Required if no access_token is provided. + root : builtins.str, optional + The Root of this backend. + All operations will happen under this root. + Default to `/` if not set. Returns ------- Operator @@ -220,22 +224,22 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Alluxio, typing.Literal["alluxio"]], /, *, - root: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `alluxio` service. Parameters ---------- - root : builtins.str, optional - root of this backend. - All operations will happen under this root. - default to `/` if not set. endpoint : builtins.str, optional endpoint of this backend. Endpoint must be full uri, mostly like `http://127.0.0.1:39999`. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. + default to `/` if not set. Returns ------- Operator @@ -257,48 +261,48 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Azblob, typing.Literal["azblob"]], /, *, - container: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., + account_name: builtins.str = ..., + batch_max_operations: builtins.int = ..., + container: builtins.str, + encryption_algorithm: builtins.str = ..., encryption_key: builtins.str = ..., encryption_key_sha256: builtins.str = ..., - encryption_algorithm: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., sas_token: builtins.str = ..., - batch_max_operations: builtins.int = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `azblob` service. Parameters ---------- + account_key : builtins.str, optional + The account key of Azblob service backend. + account_name : builtins.str, optional + The account name of Azblob service backend. + batch_max_operations : builtins.int, optional + The maximum batch operations of Azblob service + backend. container : builtins.str The container name of Azblob service backend. - root : builtins.str, optional - The root of Azblob service backend. - All operations will happen under this root. + encryption_algorithm : builtins.str, optional + The encryption algorithm of Azblob service backend. + encryption_key : builtins.str, optional + The encryption key of Azblob service backend. + encryption_key_sha256 : builtins.str, optional + The encryption key sha256 of Azblob service backend. endpoint : builtins.str, optional 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` - account_name : builtins.str, optional - The account name of Azblob service backend. - account_key : builtins.str, optional - The account key of Azblob service backend. - encryption_key : builtins.str, optional - The encryption key of Azblob service backend. - encryption_key_sha256 : builtins.str, optional - The encryption key sha256 of Azblob service backend. - encryption_algorithm : builtins.str, optional - The encryption algorithm of Azblob service backend. + root : builtins.str, optional + The root of Azblob service backend. + All operations will happen under this root. sas_token : builtins.str, optional The sas token of Azblob service backend. - batch_max_operations : builtins.int, optional - The maximum batch operations of Azblob service - backend. Returns ------- Operator @@ -320,51 +324,51 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Azdls, typing.Literal["azdls"]], /, *, - filesystem: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., - client_secret: builtins.str = ..., - tenant_id: builtins.str = ..., + account_name: builtins.str = ..., + authority_host: builtins.str = ..., client_id: builtins.str = ..., + client_secret: builtins.str = ..., + endpoint: builtins.str = ..., + filesystem: builtins.str, + root: builtins.str = ..., sas_token: builtins.str = ..., - authority_host: builtins.str = ..., + tenant_id: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `azdls` service. Parameters ---------- - filesystem : builtins.str - Filesystem name of this backend. - root : builtins.str, optional - Root of this backend. - endpoint : builtins.str, optional - Endpoint of this backend. - account_name : builtins.str, optional - Account name of this backend. account_key : builtins.str, optional Account key of this backend. - required for shared_key authentication - client_secret : builtins.str, optional - client_secret The client secret of the service + account_name : builtins.str, optional + Account name of this backend. + authority_host : builtins.str, optional + authority_host The authority host of the service principal. - - required for client_credentials authentication - tenant_id : builtins.str, optional - tenant_id The tenant id of the service principal. - - required for client_credentials authentication + - required for client_credentials authentication - + default value: `https://login.microsoftonline.com` client_id : builtins.str, optional client_id The client id of the service principal. - required for client_credentials authentication + client_secret : builtins.str, optional + client_secret The client secret of the service + principal. + - required for client_credentials authentication + endpoint : builtins.str, optional + Endpoint of this backend. + filesystem : builtins.str + Filesystem name of this backend. + root : builtins.str, optional + Root of this backend. sas_token : builtins.str, optional sas_token The shared access signature token. - required for sas authentication - authority_host : builtins.str, optional - authority_host The authority host of the service - principal. - - required for client_credentials authentication - - default value: `https://login.microsoftonline.com` + tenant_id : builtins.str, optional + tenant_id The tenant id of the service principal. + - required for client_credentials authentication Returns ------- Operator @@ -386,30 +390,30 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Azfile, typing.Literal["azfile"]], /, *, - share_name: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., + account_name: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., sas_token: builtins.str = ..., + share_name: builtins.str, ) -> typing_extensions.Self: r""" Create a new `Operator` for `azfile` service. Parameters ---------- - share_name : builtins.str - The share name for azfile. - root : builtins.str, optional - The root path for azfile. - endpoint : builtins.str, optional - The endpoint for azfile. - account_name : builtins.str, optional - The account name for azfile. account_key : builtins.str, optional The account key for azfile. + account_name : builtins.str, optional + The account name for azfile. + endpoint : builtins.str, optional + The endpoint for azfile. + root : builtins.str, optional + The root path for azfile. sas_token : builtins.str, optional The sas token for azfile. + share_name : builtins.str + The share name for azfile. Returns ------- Operator @@ -431,17 +435,27 @@ submit! { scheme: typing.Union[opendal.services.Scheme.B2, typing.Literal["b2"]], /, *, + application_key: builtins.str = ..., + application_key_id: builtins.str = ..., bucket: builtins.str, bucket_id: builtins.str, root: builtins.str = ..., - application_key_id: builtins.str = ..., - application_key: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `b2` service. Parameters ---------- + application_key : builtins.str, optional + 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 : builtins.str, optional + 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 : builtins.str bucket of this backend. required. @@ -451,16 +465,6 @@ submit! { root : builtins.str, optional root of this backend. All operations will happen under this root. - application_key_id : builtins.str, optional - 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. - application_key : builtins.str, optional - 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. Returns ------- Operator @@ -512,34 +516,34 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Cos, typing.Literal["cos"]], /, *, - root: builtins.str = ..., + bucket: builtins.str = ..., + disable_config_load: builtins.bool = ..., + enable_versioning: builtins.bool = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., secret_id: builtins.str = ..., secret_key: builtins.str = ..., - bucket: builtins.str = ..., - enable_versioning: builtins.bool = ..., - disable_config_load: builtins.bool = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `cos` service. Parameters ---------- - root : builtins.str, optional - Root of this backend. + bucket : builtins.str, optional + Bucket of this backend. + disable_config_load : builtins.bool, optional + Disable config load so that opendal will not load + config from + enable_versioning : builtins.bool, optional + is bucket versioning enabled for this bucket endpoint : builtins.str, optional Endpoint of this backend. + root : builtins.str, optional + Root of this backend. secret_id : builtins.str, optional Secret ID of this backend. secret_key : builtins.str, optional Secret key of this backend. - bucket : builtins.str, optional - Bucket of this backend. - enable_versioning : builtins.bool, optional - is bucket versioning enabled for this bucket - disable_config_load : builtins.bool, optional - Disable config load so that opendal will not load - config from Returns ------- Operator @@ -591,27 +595,27 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Dropbox, typing.Literal["dropbox"]], /, *, - root: builtins.str = ..., access_token: builtins.str = ..., - refresh_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `dropbox` service. Parameters ---------- - root : builtins.str, optional - root path for dropbox. access_token : builtins.str, optional access token for dropbox. - refresh_token : builtins.str, optional - refresh_token for dropbox. client_id : builtins.str, optional client_id for dropbox. client_secret : builtins.str, optional client_secret for dropbox. + refresh_token : builtins.str, optional + refresh_token for dropbox. + root : builtins.str, optional + root path for dropbox. Returns ------- Operator @@ -633,18 +637,18 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Fs, typing.Literal["fs"]], /, *, - root: builtins.str = ..., atomic_write_dir: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `fs` service. Parameters ---------- - root : builtins.str, optional - root dir for backend atomic_write_dir : builtins.str, optional tmp dir for atomic write + root : builtins.str, optional + root dir for backend Returns ------- Operator @@ -663,57 +667,96 @@ submit! { import opendal.services class Operator: def __new__(cls, - scheme: typing.Union[opendal.services.Scheme.Gcs, typing.Literal["gcs"]], + scheme: typing.Union[opendal.services.Scheme.Ftp, typing.Literal["ftp"]], /, *, - bucket: builtins.str, - root: builtins.str = ..., endpoint: builtins.str = ..., - scope: builtins.str = ..., - service_account: builtins.str = ..., - credential: builtins.str = ..., - credential_path: builtins.str = ..., - predefined_acl: builtins.str = ..., - default_storage_class: builtins.str = ..., - allow_anonymous: builtins.bool = ..., - disable_vm_metadata: builtins.bool = ..., - disable_config_load: builtins.bool = ..., - token: builtins.str = ..., + password: builtins.str = ..., + root: builtins.str = ..., + user: builtins.str = ..., ) -> typing_extensions.Self: r""" - Create a new `Operator` for `gcs` service. + Create a new `Operator` for `ftp` service. Parameters ---------- - bucket : builtins.str - bucket name - root : builtins.str, optional - root URI, all operations happens under `root` endpoint : builtins.str, optional - endpoint URI of GCS service, default is - `https://storage.googleapis.com` - scope : builtins.str, optional - Scope for gcs. - service_account : builtins.str, optional - Service Account for gcs. - credential : builtins.str, optional - Credentials string for GCS service OAuth2 - authentication. - credential_path : builtins.str, optional - Local path to credentials file for GCS service - OAuth2 authentication. - predefined_acl : builtins.str, optional - The predefined acl for GCS. - default_storage_class : builtins.str, optional - The default storage class used by gcs. + endpoint of this backend + password : builtins.str, optional + password of this backend + root : builtins.str, optional + root of this backend + user : builtins.str, optional + user of this backend + Returns + ------- + Operator + The new `Operator` for `ftp` service + """ + "# + } +} + +submit! { + gen_methods_from_python! { + r#" + import builtins + import typing + import typing_extensions + import opendal.services + class Operator: + def __new__(cls, + scheme: typing.Union[opendal.services.Scheme.Gcs, typing.Literal["gcs"]], + /, + *, + allow_anonymous: builtins.bool = ..., + bucket: builtins.str, + credential: builtins.str = ..., + credential_path: builtins.str = ..., + default_storage_class: builtins.str = ..., + disable_config_load: builtins.bool = ..., + disable_vm_metadata: builtins.bool = ..., + endpoint: builtins.str = ..., + predefined_acl: builtins.str = ..., + root: builtins.str = ..., + scope: builtins.str = ..., + service_account: builtins.str = ..., + token: builtins.str = ..., + ) -> typing_extensions.Self: + r""" + Create a new `Operator` for `gcs` service. + + Parameters + ---------- allow_anonymous : builtins.bool, optional Allow opendal to send requests without signing when credentials are not loaded. + bucket : builtins.str + bucket name + credential : builtins.str, optional + Credentials string for GCS service OAuth2 + authentication. + credential_path : builtins.str, optional + Local path to credentials file for GCS service + OAuth2 authentication. + default_storage_class : builtins.str, optional + The default storage class used by gcs. + disable_config_load : builtins.bool, optional + Disable loading configuration from the environment. disable_vm_metadata : builtins.bool, optional Disable attempting to load credentials from the GCE metadata server when running within Google Cloud. - disable_config_load : builtins.bool, optional - Disable loading configuration from the environment. + endpoint : builtins.str, optional + endpoint URI of GCS service, default is + `https://storage.googleapis.com` + predefined_acl : builtins.str, optional + The predefined acl for GCS. + root : builtins.str, optional + root URI, all operations happens under `root` + scope : builtins.str, optional + Scope for gcs. + service_account : builtins.str, optional + Service Account for gcs. token : builtins.str, optional A Google Cloud OAuth2 token. Takes precedence over `credential` and @@ -739,27 +782,27 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Gdrive, typing.Literal["gdrive"]], /, *, - root: builtins.str = ..., access_token: builtins.str = ..., - refresh_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `gdrive` service. Parameters ---------- - root : builtins.str, optional - The root for gdrive access_token : builtins.str, optional Access token for gdrive. - refresh_token : builtins.str, optional - Refresh token for gdrive. client_id : builtins.str, optional Client id for gdrive. client_secret : builtins.str, optional Client secret for gdrive. + refresh_token : builtins.str, optional + Refresh token for gdrive. + root : builtins.str, optional + The root for gdrive Returns ------- Operator @@ -781,24 +824,24 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Ghac, typing.Literal["ghac"]], /, *, - root: builtins.str = ..., - version: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., runtime_token: builtins.str = ..., + version: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `ghac` service. Parameters ---------- - root : builtins.str, optional - The root path for ghac. - version : builtins.str, optional - The version that used by cache. endpoint : builtins.str, optional The endpoint for ghac service. + root : builtins.str, optional + The root path for ghac. runtime_token : builtins.str, optional The runtime token for ghac service. + version : builtins.str, optional + The version that used by cache. Returns ------- Operator @@ -820,10 +863,10 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Gridfs, typing.Literal["gridfs"]], /, *, - connection_string: builtins.str = ..., - database: builtins.str = ..., bucket: builtins.str = ..., chunk_size: builtins.int = ..., + connection_string: builtins.str = ..., + database: builtins.str = ..., root: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -831,17 +874,17 @@ submit! { Parameters ---------- - connection_string : builtins.str, optional - The connection string of the MongoDB service. - database : builtins.str, optional - The database name of the MongoDB GridFs service to - read/write. bucket : builtins.str, optional The bucket name of the MongoDB GridFs service to read/write. chunk_size : builtins.int, optional The chunk size of the MongoDB GridFs service used to break the user file into chunks. + connection_string : builtins.str, optional + The connection string of the MongoDB service. + database : builtins.str, optional + The database name of the MongoDB GridFs service to + read/write. root : builtins.str, optional The working directory, all operations will be performed under it. @@ -866,21 +909,21 @@ submit! { scheme: typing.Union[opendal.services.Scheme.HdfsNative, typing.Literal["hdfs-native"]], /, *, - root: builtins.str = ..., - name_node: builtins.str = ..., enable_append: builtins.bool = ..., + name_node: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `hdfs-native` service. Parameters ---------- - root : builtins.str, optional - work dir of this backend - name_node : builtins.str, optional - name_node of this backend enable_append : builtins.bool, optional enable the append capacity + name_node : builtins.str, optional + name_node of this backend + root : builtins.str, optional + work dir of this backend Returns ------- Operator @@ -903,10 +946,10 @@ submit! { /, *, endpoint: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., - token: builtins.str = ..., root: builtins.str = ..., + token: builtins.str = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `http` service. @@ -915,14 +958,14 @@ submit! { ---------- endpoint : builtins.str, optional endpoint of this backend - username : builtins.str, optional - username of this backend password : builtins.str, optional password of this backend - token : builtins.str, optional - token of this backend root : builtins.str, optional root of this backend + token : builtins.str, optional + token of this backend + username : builtins.str, optional + username of this backend Returns ------- Operator @@ -944,8 +987,8 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Huggingface, typing.Literal["huggingface"]], /, *, - repo_type: builtins.str = ..., repo_id: builtins.str = ..., + repo_type: builtins.str = ..., revision: builtins.str = ..., root: builtins.str = ..., token: builtins.str = ..., @@ -955,13 +998,13 @@ submit! { Parameters ---------- + repo_id : builtins.str, optional + Repo id of this backend. + This is required. repo_type : builtins.str, optional Repo type of this backend. Default is model. Available values: - model - dataset - repo_id : builtins.str, optional - Repo id of this backend. - This is required. revision : builtins.str, optional Revision of this backend. Default is main. @@ -1026,18 +1069,18 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Ipmfs, typing.Literal["ipmfs"]], /, *, - root: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `ipmfs` service. Parameters ---------- - root : builtins.str, optional - Root for ipfs. endpoint : builtins.str, optional Endpoint for ipfs. + root : builtins.str, optional + Root for ipfs. Returns ------- Operator @@ -1059,26 +1102,26 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Koofr, typing.Literal["koofr"]], /, *, - endpoint: builtins.str, email: builtins.str, - root: builtins.str = ..., + endpoint: builtins.str, password: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `koofr` service. Parameters ---------- - endpoint : builtins.str - Koofr endpoint. email : builtins.str Koofr email. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. + endpoint : builtins.str + Koofr endpoint. password : builtins.str, optional password of this backend. (Must be the application password) + root : builtins.str, optional + root of this backend. + All operations will happen under this root. Returns ------- Operator @@ -1100,32 +1143,32 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Memcached, typing.Literal["memcached"]], /, *, + default_ttl: typing.Any = ..., endpoint: builtins.str = ..., + password: builtins.str = ..., root: builtins.str = ..., username: builtins.str = ..., - password: builtins.str = ..., - default_ttl: typing.Any = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `memcached` service. Parameters ---------- + default_ttl : typing.Any, optional + The default ttl for put operations.. + a human readable duration string see + https://docs.rs/humantime/latest/humantime/fn.parse_duration.html + for more details endpoint : builtins.str, optional network address of the memcached service. For example: "tcp://localhost:11211" + password : builtins.str, optional + Memcached password, optional. root : builtins.str, optional the working directory of the service. Can be "/path/to/dir" default is "/" username : builtins.str, optional Memcached username, optional. - password : builtins.str, optional - Memcached password, optional. - default_ttl : typing.Any, optional - The default ttl for put operations.. - a human readable duration string see - https://docs.rs/humantime/latest/humantime/fn.parse_duration.html - for more details Returns ------- Operator @@ -1178,9 +1221,9 @@ submit! { /, *, max_capacity: builtins.int = ..., - time_to_live: builtins.str = ..., - time_to_idle: builtins.str = ..., root: builtins.str = ..., + time_to_idle: builtins.str = ..., + time_to_live: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `mini-moka` service. @@ -1191,16 +1234,16 @@ submit! { 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) - time_to_live : builtins.str, optional - 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) + root : builtins.str, optional + root path of this backend time_to_idle : builtins.str, optional 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) - root : builtins.str, optional - root path of this backend + time_to_live : builtins.str, optional + 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) Returns ------- Operator @@ -1222,33 +1265,33 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Moka, typing.Literal["moka"]], /, *, - name: builtins.str = ..., max_capacity: builtins.int = ..., - time_to_live: builtins.str = ..., - time_to_idle: builtins.str = ..., + name: builtins.str = ..., root: builtins.str = ..., + time_to_idle: builtins.str = ..., + time_to_live: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `moka` service. Parameters ---------- - name : builtins.str, optional - Name for this cache instance. max_capacity : builtins.int, optional 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) - time_to_live : builtins.str, optional - 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) + name : builtins.str, optional + Name for this cache instance. + root : builtins.str, optional + root path of this backend time_to_idle : builtins.str, optional 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) - root : builtins.str, optional - root path of this backend + time_to_live : builtins.str, optional + 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) Returns ------- Operator @@ -1270,11 +1313,11 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Mongodb, typing.Literal["mongodb"]], /, *, + collection: builtins.str = ..., connection_string: builtins.str = ..., database: builtins.str = ..., - collection: builtins.str = ..., - root: builtins.str = ..., key_field: builtins.str = ..., + root: builtins.str = ..., value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -1282,16 +1325,16 @@ submit! { Parameters ---------- + collection : builtins.str, optional + collection of this backend connection_string : builtins.str, optional connection string of this backend database : builtins.str, optional database of this backend - collection : builtins.str, optional - collection of this backend - root : builtins.str, optional - root of this backend key_field : builtins.str, optional key field of this backend + root : builtins.str, optional + root of this backend value_field : builtins.str, optional value field of this backend Returns @@ -1316,10 +1359,10 @@ submit! { /, *, connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., - value_field: builtins.str = ..., root: builtins.str = ..., + table: builtins.str = ..., + value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `mysql` service. @@ -1340,14 +1383,14 @@ submit! { `mysql://user:password@localhost:3306/db` For more information, please refer to . - table : builtins.str, optional - The table name for mysql. key_field : builtins.str, optional The key field name for mysql. - value_field : builtins.str, optional - The value field name for mysql. root : builtins.str, optional The root for mysql. + table : builtins.str, optional + The table name for mysql. + value_field : builtins.str, optional + The value field name for mysql. Returns ------- Operator @@ -1369,31 +1412,31 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Obs, typing.Literal["obs"]], /, *, - root: builtins.str = ..., - endpoint: builtins.str = ..., access_key_id: builtins.str = ..., - secret_access_key: builtins.str = ..., bucket: builtins.str = ..., enable_versioning: builtins.bool = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., + secret_access_key: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `obs` service. Parameters ---------- - root : builtins.str, optional - Root for obs. - endpoint : builtins.str, optional - Endpoint for obs. access_key_id : builtins.str, optional Access key id for obs. - secret_access_key : builtins.str, optional - Secret access key for obs. bucket : builtins.str, optional Bucket for obs. enable_versioning : builtins.bool, optional Is bucket versioning enabled for this bucket - Returns + endpoint : builtins.str, optional + Endpoint for obs. + root : builtins.str, optional + Root for obs. + secret_access_key : builtins.str, optional + Secret access key for obs. + Returns ------- Operator The new `Operator` for `obs` service @@ -1414,26 +1457,20 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Onedrive, typing.Literal["onedrive"]], /, *, - root: builtins.str = ..., access_token: builtins.str = ..., - refresh_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., enable_versioning: builtins.bool = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `onedrive` service. Parameters ---------- - root : builtins.str, optional - The root path for the OneDrive service for the file - access access_token : builtins.str, optional Microsoft Graph API (also OneDrive API) access token - refresh_token : builtins.str, optional - Microsoft Graph API (also OneDrive API) refresh - token client_id : builtins.str, optional Microsoft Graph API Application (client) ID that is in the Azure's app registration portal @@ -1442,6 +1479,12 @@ submit! { is in the Azure's app registration portal enable_versioning : builtins.bool, optional Enabling version support + refresh_token : builtins.str, optional + Microsoft Graph API (also OneDrive API) refresh + token + root : builtins.str, optional + The root path for the OneDrive service for the file + access Returns ------- Operator @@ -1463,25 +1506,25 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Oss, typing.Literal["oss"]], /, *, - bucket: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - presign_endpoint: builtins.str = ..., - addressing_style: builtins.str = ..., - presign_addressing_style: builtins.str = ..., - enable_versioning: builtins.bool = ..., - server_side_encryption: builtins.str = ..., - server_side_encryption_key_id: builtins.str = ..., - allow_anonymous: builtins.bool = ..., access_key_id: builtins.str = ..., access_key_secret: builtins.str = ..., - security_token: builtins.str = ..., + addressing_style: builtins.str = ..., + allow_anonymous: builtins.bool = ..., batch_max_operations: builtins.int = ..., + bucket: builtins.str, delete_max_size: builtins.int = ..., - role_arn: builtins.str = ..., - role_session_name: builtins.str = ..., + enable_versioning: builtins.bool = ..., + endpoint: builtins.str = ..., oidc_provider_arn: builtins.str = ..., oidc_token_file: builtins.str = ..., + presign_addressing_style: builtins.str = ..., + presign_endpoint: builtins.str = ..., + role_arn: builtins.str = ..., + role_session_name: builtins.str = ..., + root: builtins.str = ..., + security_token: builtins.str = ..., + server_side_encryption: builtins.str = ..., + server_side_encryption_key_id: builtins.str = ..., sts_endpoint: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -1489,26 +1532,6 @@ submit! { Parameters ---------- - bucket : builtins.str - Bucket for oss. - root : builtins.str, optional - Root for oss. - endpoint : builtins.str, optional - Endpoint for oss. - presign_endpoint : builtins.str, optional - Presign endpoint for oss. - addressing_style : builtins.str, optional - Addressing style for oss. - presign_addressing_style : builtins.str, optional - Pre sign addressing style for oss. - enable_versioning : builtins.bool, optional - is bucket versioning enabled for this bucket - server_side_encryption : builtins.str, optional - Server side encryption for oss. - server_side_encryption_key_id : builtins.str, optional - Server side encryption key id for oss. - allow_anonymous : builtins.bool, optional - Allow anonymous for oss. access_key_id : builtins.str, optional Access key id for oss. - this field if it's `is_some` - env value: @@ -1517,22 +1540,20 @@ submit! { Access key secret for oss. - this field if it's `is_some` - env value: [`ALIBABA_CLOUD_ACCESS_KEY_SECRET`] - security_token : builtins.str, optional - `security_token` will be loaded from - this field if - it's `is_some` - env value: - [`ALIBABA_CLOUD_SECURITY_TOKEN`] + addressing_style : builtins.str, optional + Addressing style for oss. + allow_anonymous : builtins.bool, optional + Allow anonymous for oss. batch_max_operations : builtins.int, optional The size of max batch operations. + bucket : builtins.str + Bucket for oss. delete_max_size : builtins.int, optional The size of max delete operations. - role_arn : builtins.str, optional - 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 : builtins.str, optional - role_session_name for this backend. + enable_versioning : builtins.bool, optional + is bucket versioning enabled for this bucket + endpoint : builtins.str, optional + Endpoint for oss. oidc_provider_arn : builtins.str, optional `oidc_provider_arn` will be loaded from - this field if it's `is_some` - env value: @@ -1541,6 +1562,28 @@ submit! { `oidc_token_file` will be loaded from - this field if it's `is_some` - env value: [`ALIBABA_CLOUD_OIDC_TOKEN_FILE`] + presign_addressing_style : builtins.str, optional + Pre sign addressing style for oss. + presign_endpoint : builtins.str, optional + Presign endpoint for oss. + role_arn : builtins.str, optional + 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 : builtins.str, optional + role_session_name for this backend. + root : builtins.str, optional + Root for oss. + security_token : builtins.str, optional + `security_token` will be loaded from - this field if + it's `is_some` - env value: + [`ALIBABA_CLOUD_SECURITY_TOKEN`] + server_side_encryption : builtins.str, optional + Server side encryption for oss. + server_side_encryption_key_id : builtins.str, optional + Server side encryption key id for oss. sts_endpoint : builtins.str, optional `sts_endpoint` will be loaded from - this field if it's `is_some` - env value: @@ -1567,8 +1610,8 @@ submit! { /, *, datafile: builtins.str = ..., - segment: builtins.str = ..., index: builtins.str = ..., + segment: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `persy` service. @@ -1578,10 +1621,10 @@ submit! { datafile : builtins.str, optional That path to the persy data file. The directory in the path must already exist. - segment : builtins.str, optional - That name of the persy segment. index : builtins.str, optional That name of the persy index. + segment : builtins.str, optional + That name of the persy segment. Returns ------- Operator @@ -1603,10 +1646,10 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Postgresql, typing.Literal["postgresql"]], /, *, - root: builtins.str = ..., connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., + root: builtins.str = ..., + table: builtins.str = ..., value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -1614,10 +1657,6 @@ submit! { Parameters ---------- - root : builtins.str, optional - Root of this backend. - All operations will happen under this root. - Default to `/` if not set. connection_string : builtins.str, optional The URL should be with a scheme of either `postgres://` or `postgresql://`. @@ -1629,10 +1668,14 @@ submit! { `postgresql:///mydb?user=user&host=/var/lib/postgresql` For more information, please visit . - table : builtins.str, optional - the table of postgresql key_field : builtins.str, optional the key field of postgresql + root : builtins.str, optional + Root of this backend. + All operations will happen under this root. + Default to `/` if not set. + table : builtins.str, optional + the table of postgresql value_field : builtins.str, optional the value field of postgresql Returns @@ -1692,45 +1735,45 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Redis, typing.Literal["redis"]], /, *, + cluster_endpoints: builtins.str = ..., db: builtins.int, + default_ttl: typing.Any = ..., endpoint: builtins.str = ..., - cluster_endpoints: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., root: builtins.str = ..., - default_ttl: typing.Any = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `redis` service. Parameters ---------- + cluster_endpoints : builtins.str, optional + 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 db : builtins.int the number of DBs redis can take is unlimited default is db 0 + default_ttl : typing.Any, optional + The default ttl for put operations.. + a human readable duration string see + https://docs.rs/humantime/latest/humantime/fn.parse_duration.html + for more details endpoint : builtins.str, optional network address of the Redis service. Can be "tcp://127.0.0.1:6379", e.g. default is "tcp://127.0.0.1:6379" - cluster_endpoints : builtins.str, optional - 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 - username : builtins.str, optional - the username to connect redis service. - default is None password : builtins.str, optional the password for authentication default is None root : builtins.str, optional the working directory of the Redis service. Can be "/path/to/dir" default is "/" - default_ttl : typing.Any, optional - The default ttl for put operations.. - a human readable duration string see - https://docs.rs/humantime/latest/humantime/fn.parse_duration.html - for more details + username : builtins.str, optional + the username to connect redis service. + default is None Returns ------- Operator @@ -1752,50 +1795,121 @@ submit! { scheme: typing.Union[opendal.services.Scheme.S3, typing.Literal["s3"]], /, *, + access_key_id: builtins.str = ..., + allow_anonymous: builtins.bool = ..., + batch_max_operations: builtins.int = ..., bucket: builtins.str, - root: builtins.str = ..., + checksum_algorithm: builtins.str = ..., + default_storage_class: builtins.str = ..., + delete_max_size: builtins.int = ..., + disable_config_load: builtins.bool = ..., + disable_ec2_metadata: builtins.bool = ..., + disable_list_objects_v2: builtins.bool = ..., + disable_stat_with_override: builtins.bool = ..., + disable_write_with_if_match: builtins.bool = ..., + enable_request_payer: builtins.bool = ..., enable_versioning: builtins.bool = ..., + enable_virtual_host_style: builtins.bool = ..., + enable_write_with_append: builtins.bool = ..., endpoint: builtins.str = ..., + external_id: builtins.str = ..., region: builtins.str = ..., - access_key_id: builtins.str = ..., - secret_access_key: builtins.str = ..., - session_token: builtins.str = ..., role_arn: builtins.str = ..., - external_id: builtins.str = ..., role_session_name: builtins.str = ..., - disable_config_load: builtins.bool = ..., - disable_ec2_metadata: builtins.bool = ..., - allow_anonymous: builtins.bool = ..., + root: builtins.str = ..., + secret_access_key: builtins.str = ..., server_side_encryption: builtins.str = ..., server_side_encryption_aws_kms_key_id: builtins.str = ..., server_side_encryption_customer_algorithm: builtins.str = ..., server_side_encryption_customer_key: builtins.str = ..., server_side_encryption_customer_key_md5: builtins.str = ..., - default_storage_class: builtins.str = ..., - enable_virtual_host_style: builtins.bool = ..., - batch_max_operations: builtins.int = ..., - delete_max_size: builtins.int = ..., - disable_stat_with_override: builtins.bool = ..., - checksum_algorithm: builtins.str = ..., - disable_write_with_if_match: builtins.bool = ..., - enable_write_with_append: builtins.bool = ..., - disable_list_objects_v2: builtins.bool = ..., - enable_request_payer: builtins.bool = ..., + session_token: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `s3` service. Parameters ---------- + access_key_id : builtins.str, optional + 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 : builtins.bool, optional + Allow anonymous will allow opendal to send request + without signing when credential is not loaded. + batch_max_operations : builtins.int, optional + Set maximum batch operations of this backend. + Some compatible services have a limit on the number + of operations in a batch request. + For example, R2 could return `Internal Error` while + batch delete 1000 files. + Please tune this value based on services' document. bucket : builtins.str bucket name of this backend. required. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. - default to `/` if not set. + checksum_algorithm : builtins.str, optional + 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" + default_storage_class : builtins.str, optional + 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 : builtins.int, optional + Set the maximum delete size of this backend. + Some compatible services have a limit on the number + of operations in a batch request. + For example, R2 could return `Internal Error` while + batch delete 1000 files. + Please tune this value based on services' document. + disable_config_load : builtins.bool, optional + 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 : builtins.bool, optional + 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 : builtins.bool, optional + 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 : builtins.bool, optional + Disable stat with override so that opendal will not + send stat request with override queries. + For example, R2 doesn't support stat with + `response_content_type` query. + disable_write_with_if_match : builtins.bool, optional + Disable write with if match so that opendal will not + send write request with if match headers. + For example, Ceph RADOS S3 doesn't support write + with if match. + enable_request_payer : builtins.bool, optional + Indicates whether the client agrees to pay for the + requests made to the S3 bucket. enable_versioning : builtins.bool, optional is bucket versioning enabled for this bucket + enable_virtual_host_style : builtins.bool, optional + 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 : builtins.bool, optional + Enable write with append so that opendal will send + write request with append headers. endpoint : builtins.str, optional endpoint of this backend. Endpoint must be full uri, e.g. @@ -1812,6 +1926,8 @@ submit! { - If not, we will try to load it from environment. - If still not set, default to `https://s3.amazonaws.com`. + external_id : builtins.str, optional + external_id for this backend. region : builtins.str, optional Region represent the signing region of this endpoint. @@ -1820,42 +1936,22 @@ submit! { 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. - access_key_id : builtins.str, optional - 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. - secret_access_key : builtins.str, optional - 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. - session_token : builtins.str, optional - session_token (aka, security token) of this backend. - This token will expire after sometime, it's - recommended to set session_token by hand. role_arn : builtins.str, optional 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`. - external_id : builtins.str, optional - external_id for this backend. role_session_name : builtins.str, optional role_session_name for this backend. - disable_config_load : builtins.bool, optional - 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 : builtins.bool, optional - 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 - allow_anonymous : builtins.bool, optional - Allow anonymous will allow opendal to send request - without signing when credential is not loaded. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. + default to `/` if not set. + secret_access_key : builtins.str, optional + 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 : builtins.str, optional server_side_encryption for this backend. Available values: `AES256`, `aws:kms`. @@ -1889,63 +1985,10 @@ submit! { backend. Value: MD5 digest of key specified in `server_side_encryption_customer_key`. - default_storage_class : builtins.str, optional - 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 - enable_virtual_host_style : builtins.bool, optional - 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` - batch_max_operations : builtins.int, optional - Set maximum batch operations of this backend. - Some compatible services have a limit on the number - of operations in a batch request. - For example, R2 could return `Internal Error` while - batch delete 1000 files. - Please tune this value based on services' document. - delete_max_size : builtins.int, optional - Set the maximum delete size of this backend. - Some compatible services have a limit on the number - of operations in a batch request. - For example, R2 could return `Internal Error` while - batch delete 1000 files. - Please tune this value based on services' document. - disable_stat_with_override : builtins.bool, optional - Disable stat with override so that opendal will not - send stat request with override queries. - For example, R2 doesn't support stat with - `response_content_type` query. - checksum_algorithm : builtins.str, optional - 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" - disable_write_with_if_match : builtins.bool, optional - Disable write with if match so that opendal will not - send write request with if match headers. - For example, Ceph RADOS S3 doesn't support write - with if match. - enable_write_with_append : builtins.bool, optional - Enable write with append so that opendal will send - write request with append headers. - disable_list_objects_v2 : builtins.bool, optional - 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. - enable_request_payer : builtins.bool, optional - Indicates whether the client agrees to pay for the - requests made to the S3 bucket. + session_token : builtins.str, optional + session_token (aka, security token) of this backend. + This token will expire after sometime, it's + recommended to set session_token by hand. Returns ------- Operator @@ -1967,29 +2010,29 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Seafile, typing.Literal["seafile"]], /, *, + endpoint: builtins.str = ..., + password: builtins.str = ..., repo_name: builtins.str, root: builtins.str = ..., - endpoint: builtins.str = ..., username: builtins.str = ..., - password: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `seafile` service. Parameters ---------- + endpoint : builtins.str, optional + endpoint address of this backend. + password : builtins.str, optional + password of this backend. repo_name : builtins.str repo_name of this backend. required. root : builtins.str, optional root of this backend. All operations will happen under this root. - endpoint : builtins.str, optional - endpoint address of this backend. username : builtins.str, optional username of this backend. - password : builtins.str, optional - password of this backend. Returns ------- Operator @@ -1999,6 +2042,51 @@ submit! { } } +submit! { + gen_methods_from_python! { + r#" + import builtins + import typing + import typing_extensions + import opendal.services + class Operator: + def __new__(cls, + scheme: typing.Union[opendal.services.Scheme.Sftp, typing.Literal["sftp"]], + /, + *, + enable_copy: builtins.bool = ..., + endpoint: builtins.str = ..., + key: builtins.str = ..., + known_hosts_strategy: builtins.str = ..., + root: builtins.str = ..., + user: builtins.str = ..., + ) -> typing_extensions.Self: + r""" + Create a new `Operator` for `sftp` service. + + Parameters + ---------- + enable_copy : builtins.bool, optional + enable_copy of this backend + endpoint : builtins.str, optional + endpoint of this backend + key : builtins.str, optional + key of this backend + known_hosts_strategy : builtins.str, optional + known_hosts_strategy of this backend + root : builtins.str, optional + root of this backend + user : builtins.str, optional + user of this backend + Returns + ------- + Operator + The new `Operator` for `sftp` service + """ + "# + } +} + submit! { gen_methods_from_python! { r#" @@ -2048,10 +2136,10 @@ submit! { /, *, connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., - value_field: builtins.str = ..., root: builtins.str = ..., + table: builtins.str = ..., + value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `sqlite` service. @@ -2067,21 +2155,21 @@ submit! { `sqlite:data.db` - `sqlite://data.db` For more information, please visit . - table : builtins.str, optional - Set the table name of the sqlite service to - read/write. key_field : builtins.str, optional Set the key field name of the sqlite service to read/write. Default to `key` if not specified. - value_field : builtins.str, optional - Set the value field name of the sqlite service to - read/write. - Default to `value` if not specified. root : builtins.str, optional set the working directory, all operations will be performed under it. default: "/" + table : builtins.str, optional + Set the table name of the sqlite service to + read/write. + value_field : builtins.str, optional + Set the value field name of the sqlite service to + read/write. + Default to `value` if not specified. Returns ------- Operator @@ -2103,8 +2191,8 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Swift, typing.Literal["swift"]], /, *, - endpoint: builtins.str = ..., container: builtins.str = ..., + endpoint: builtins.str = ..., root: builtins.str = ..., token: builtins.str = ..., ) -> typing_extensions.Self: @@ -2113,10 +2201,10 @@ submit! { Parameters ---------- - endpoint : builtins.str, optional - The endpoint for Swift. container : builtins.str, optional The container for Swift. + endpoint : builtins.str, optional + The endpoint for Swift. root : builtins.str, optional The root for Swift. token : builtins.str, optional @@ -2143,9 +2231,9 @@ submit! { /, *, bucket: builtins.str, - root: builtins.str = ..., operator: builtins.str = ..., password: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `upyun` service. @@ -2154,13 +2242,13 @@ submit! { ---------- bucket : builtins.str bucket address of this backend. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. operator : builtins.str, optional username of this backend. password : builtins.str, optional password of this backend. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. Returns ------- Operator @@ -2212,30 +2300,30 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Webdav, typing.Literal["webdav"]], /, *, + disable_copy: builtins.bool = ..., endpoint: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., - token: builtins.str = ..., root: builtins.str = ..., - disable_copy: builtins.bool = ..., + token: builtins.str = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `webdav` service. Parameters ---------- + disable_copy : builtins.bool, optional + WebDAV Service doesn't support copy. endpoint : builtins.str, optional endpoint of this backend - username : builtins.str, optional - username of this backend password : builtins.str, optional password of this backend - token : builtins.str, optional - token of this backend root : builtins.str, optional root of this backend - disable_copy : builtins.bool, optional - WebDAV Service doesn't support copy. + token : builtins.str, optional + token of this backend + username : builtins.str, optional + username of this backend Returns ------- Operator @@ -2257,30 +2345,30 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Webhdfs, typing.Literal["webhdfs"]], /, *, - root: builtins.str = ..., - endpoint: builtins.str = ..., - user_name: builtins.str = ..., + atomic_write_dir: builtins.str = ..., delegation: builtins.str = ..., disable_list_batch: builtins.bool = ..., - atomic_write_dir: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., + user_name: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `Operator` for `webhdfs` service. Parameters ---------- - root : builtins.str, optional - Root for webhdfs. - endpoint : builtins.str, optional - Endpoint for webhdfs. - user_name : builtins.str, optional - Name of the user for webhdfs. + atomic_write_dir : builtins.str, optional + atomic_write_dir of this backend delegation : builtins.str, optional Delegation token for webhdfs. disable_list_batch : builtins.bool, optional Disable batch listing - atomic_write_dir : builtins.str, optional - atomic_write_dir of this backend + endpoint : builtins.str, optional + Endpoint for webhdfs. + root : builtins.str, optional + Root for webhdfs. + user_name : builtins.str, optional + Name of the user for webhdfs. Returns ------- Operator @@ -2336,29 +2424,18 @@ submit! { scheme: typing.Union[opendal.services.Scheme.AliyunDrive, typing.Literal["aliyun-drive"]], /, *, - drive_type: builtins.str, - root: builtins.str = ..., access_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., + drive_type: builtins.str, refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `aliyun-drive` service. Parameters ---------- - drive_type : builtins.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. - root : builtins.str, optional - The Root of this backend. - All operations will happen under this root. - Default to `/` if not set. access_token : builtins.str, optional The access_token of this backend. Solution for client-only purpose. @@ -2370,9 +2447,20 @@ submit! { client_secret : builtins.str, optional The client_secret of this backend. Required if no access_token is provided. + drive_type : builtins.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 : builtins.str, optional The refresh_token of this backend. Required if no access_token is provided. + root : builtins.str, optional + The Root of this backend. + All operations will happen under this root. + Default to `/` if not set. Returns ------- AsyncOperator @@ -2394,22 +2482,22 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Alluxio, typing.Literal["alluxio"]], /, *, - root: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `alluxio` service. Parameters ---------- - root : builtins.str, optional - root of this backend. - All operations will happen under this root. - default to `/` if not set. endpoint : builtins.str, optional endpoint of this backend. Endpoint must be full uri, mostly like `http://127.0.0.1:39999`. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. + default to `/` if not set. Returns ------- AsyncOperator @@ -2431,48 +2519,48 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Azblob, typing.Literal["azblob"]], /, *, - container: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., + account_name: builtins.str = ..., + batch_max_operations: builtins.int = ..., + container: builtins.str, + encryption_algorithm: builtins.str = ..., encryption_key: builtins.str = ..., encryption_key_sha256: builtins.str = ..., - encryption_algorithm: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., sas_token: builtins.str = ..., - batch_max_operations: builtins.int = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `azblob` service. Parameters ---------- + account_key : builtins.str, optional + The account key of Azblob service backend. + account_name : builtins.str, optional + The account name of Azblob service backend. + batch_max_operations : builtins.int, optional + The maximum batch operations of Azblob service + backend. container : builtins.str The container name of Azblob service backend. - root : builtins.str, optional - The root of Azblob service backend. - All operations will happen under this root. + encryption_algorithm : builtins.str, optional + The encryption algorithm of Azblob service backend. + encryption_key : builtins.str, optional + The encryption key of Azblob service backend. + encryption_key_sha256 : builtins.str, optional + The encryption key sha256 of Azblob service backend. endpoint : builtins.str, optional 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` - account_name : builtins.str, optional - The account name of Azblob service backend. - account_key : builtins.str, optional - The account key of Azblob service backend. - encryption_key : builtins.str, optional - The encryption key of Azblob service backend. - encryption_key_sha256 : builtins.str, optional - The encryption key sha256 of Azblob service backend. - encryption_algorithm : builtins.str, optional - The encryption algorithm of Azblob service backend. + root : builtins.str, optional + The root of Azblob service backend. + All operations will happen under this root. sas_token : builtins.str, optional The sas token of Azblob service backend. - batch_max_operations : builtins.int, optional - The maximum batch operations of Azblob service - backend. Returns ------- AsyncOperator @@ -2494,51 +2582,51 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Azdls, typing.Literal["azdls"]], /, *, - filesystem: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., - client_secret: builtins.str = ..., - tenant_id: builtins.str = ..., + account_name: builtins.str = ..., + authority_host: builtins.str = ..., client_id: builtins.str = ..., + client_secret: builtins.str = ..., + endpoint: builtins.str = ..., + filesystem: builtins.str, + root: builtins.str = ..., sas_token: builtins.str = ..., - authority_host: builtins.str = ..., + tenant_id: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `azdls` service. Parameters ---------- - filesystem : builtins.str - Filesystem name of this backend. - root : builtins.str, optional - Root of this backend. - endpoint : builtins.str, optional - Endpoint of this backend. - account_name : builtins.str, optional - Account name of this backend. account_key : builtins.str, optional Account key of this backend. - required for shared_key authentication - client_secret : builtins.str, optional - client_secret The client secret of the service + account_name : builtins.str, optional + Account name of this backend. + authority_host : builtins.str, optional + authority_host The authority host of the service principal. - - required for client_credentials authentication - tenant_id : builtins.str, optional - tenant_id The tenant id of the service principal. - - required for client_credentials authentication + - required for client_credentials authentication - + default value: `https://login.microsoftonline.com` client_id : builtins.str, optional client_id The client id of the service principal. - required for client_credentials authentication + client_secret : builtins.str, optional + client_secret The client secret of the service + principal. + - required for client_credentials authentication + endpoint : builtins.str, optional + Endpoint of this backend. + filesystem : builtins.str + Filesystem name of this backend. + root : builtins.str, optional + Root of this backend. sas_token : builtins.str, optional sas_token The shared access signature token. - required for sas authentication - authority_host : builtins.str, optional - authority_host The authority host of the service - principal. - - required for client_credentials authentication - - default value: `https://login.microsoftonline.com` + tenant_id : builtins.str, optional + tenant_id The tenant id of the service principal. + - required for client_credentials authentication Returns ------- AsyncOperator @@ -2560,30 +2648,30 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Azfile, typing.Literal["azfile"]], /, *, - share_name: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - account_name: builtins.str = ..., account_key: builtins.str = ..., + account_name: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., sas_token: builtins.str = ..., + share_name: builtins.str, ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `azfile` service. Parameters ---------- - share_name : builtins.str - The share name for azfile. - root : builtins.str, optional - The root path for azfile. - endpoint : builtins.str, optional - The endpoint for azfile. - account_name : builtins.str, optional - The account name for azfile. account_key : builtins.str, optional The account key for azfile. + account_name : builtins.str, optional + The account name for azfile. + endpoint : builtins.str, optional + The endpoint for azfile. + root : builtins.str, optional + The root path for azfile. sas_token : builtins.str, optional The sas token for azfile. + share_name : builtins.str + The share name for azfile. Returns ------- AsyncOperator @@ -2605,17 +2693,27 @@ submit! { scheme: typing.Union[opendal.services.Scheme.B2, typing.Literal["b2"]], /, *, + application_key: builtins.str = ..., + application_key_id: builtins.str = ..., bucket: builtins.str, bucket_id: builtins.str, root: builtins.str = ..., - application_key_id: builtins.str = ..., - application_key: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `b2` service. Parameters ---------- + application_key : builtins.str, optional + 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 : builtins.str, optional + 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 : builtins.str bucket of this backend. required. @@ -2625,16 +2723,6 @@ submit! { root : builtins.str, optional root of this backend. All operations will happen under this root. - application_key_id : builtins.str, optional - 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. - application_key : builtins.str, optional - 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. Returns ------- AsyncOperator @@ -2686,34 +2774,34 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Cos, typing.Literal["cos"]], /, *, - root: builtins.str = ..., + bucket: builtins.str = ..., + disable_config_load: builtins.bool = ..., + enable_versioning: builtins.bool = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., secret_id: builtins.str = ..., secret_key: builtins.str = ..., - bucket: builtins.str = ..., - enable_versioning: builtins.bool = ..., - disable_config_load: builtins.bool = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `cos` service. Parameters ---------- - root : builtins.str, optional - Root of this backend. + bucket : builtins.str, optional + Bucket of this backend. + disable_config_load : builtins.bool, optional + Disable config load so that opendal will not load + config from + enable_versioning : builtins.bool, optional + is bucket versioning enabled for this bucket endpoint : builtins.str, optional Endpoint of this backend. + root : builtins.str, optional + Root of this backend. secret_id : builtins.str, optional Secret ID of this backend. secret_key : builtins.str, optional Secret key of this backend. - bucket : builtins.str, optional - Bucket of this backend. - enable_versioning : builtins.bool, optional - is bucket versioning enabled for this bucket - disable_config_load : builtins.bool, optional - Disable config load so that opendal will not load - config from Returns ------- AsyncOperator @@ -2747,7 +2835,49 @@ submit! { Returns ------- AsyncOperator - The new `AsyncOperator` for `dashmap` service + The new `AsyncOperator` for `dashmap` service + """ + "# + } +} + +submit! { + gen_methods_from_python! { + r#" + import builtins + import typing + import typing_extensions + import opendal.services + class AsyncOperator: + def __new__(cls, + scheme: typing.Union[opendal.services.Scheme.Dropbox, typing.Literal["dropbox"]], + /, + *, + access_token: builtins.str = ..., + client_id: builtins.str = ..., + client_secret: builtins.str = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., + ) -> typing_extensions.Self: + r""" + Create a new `AsyncOperator` for `dropbox` service. + + Parameters + ---------- + access_token : builtins.str, optional + access token for dropbox. + client_id : builtins.str, optional + client_id for dropbox. + client_secret : builtins.str, optional + client_secret for dropbox. + refresh_token : builtins.str, optional + refresh_token for dropbox. + root : builtins.str, optional + root path for dropbox. + Returns + ------- + AsyncOperator + The new `AsyncOperator` for `dropbox` service """ "# } @@ -2762,34 +2892,25 @@ submit! { import opendal.services class AsyncOperator: def __new__(cls, - scheme: typing.Union[opendal.services.Scheme.Dropbox, typing.Literal["dropbox"]], + scheme: typing.Union[opendal.services.Scheme.Fs, typing.Literal["fs"]], /, *, + atomic_write_dir: builtins.str = ..., root: builtins.str = ..., - access_token: builtins.str = ..., - refresh_token: builtins.str = ..., - client_id: builtins.str = ..., - client_secret: builtins.str = ..., ) -> typing_extensions.Self: r""" - Create a new `AsyncOperator` for `dropbox` service. + Create a new `AsyncOperator` for `fs` service. Parameters ---------- + atomic_write_dir : builtins.str, optional + tmp dir for atomic write root : builtins.str, optional - root path for dropbox. - access_token : builtins.str, optional - access token for dropbox. - refresh_token : builtins.str, optional - refresh_token for dropbox. - client_id : builtins.str, optional - client_id for dropbox. - client_secret : builtins.str, optional - client_secret for dropbox. + root dir for backend Returns ------- AsyncOperator - The new `AsyncOperator` for `dropbox` service + The new `AsyncOperator` for `fs` service """ "# } @@ -2804,25 +2925,31 @@ submit! { import opendal.services class AsyncOperator: def __new__(cls, - scheme: typing.Union[opendal.services.Scheme.Fs, typing.Literal["fs"]], + scheme: typing.Union[opendal.services.Scheme.Ftp, typing.Literal["ftp"]], /, *, + endpoint: builtins.str = ..., + password: builtins.str = ..., root: builtins.str = ..., - atomic_write_dir: builtins.str = ..., + user: builtins.str = ..., ) -> typing_extensions.Self: r""" - Create a new `AsyncOperator` for `fs` service. + Create a new `AsyncOperator` for `ftp` service. Parameters ---------- + endpoint : builtins.str, optional + endpoint of this backend + password : builtins.str, optional + password of this backend root : builtins.str, optional - root dir for backend - atomic_write_dir : builtins.str, optional - tmp dir for atomic write + root of this backend + user : builtins.str, optional + user of this backend Returns ------- AsyncOperator - The new `AsyncOperator` for `fs` service + The new `AsyncOperator` for `ftp` service """ "# } @@ -2840,18 +2967,18 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Gcs, typing.Literal["gcs"]], /, *, + allow_anonymous: builtins.bool = ..., bucket: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - scope: builtins.str = ..., - service_account: builtins.str = ..., credential: builtins.str = ..., credential_path: builtins.str = ..., - predefined_acl: builtins.str = ..., default_storage_class: builtins.str = ..., - allow_anonymous: builtins.bool = ..., - disable_vm_metadata: builtins.bool = ..., disable_config_load: builtins.bool = ..., + disable_vm_metadata: builtins.bool = ..., + endpoint: builtins.str = ..., + predefined_acl: builtins.str = ..., + root: builtins.str = ..., + scope: builtins.str = ..., + service_account: builtins.str = ..., token: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -2859,35 +2986,35 @@ submit! { Parameters ---------- + allow_anonymous : builtins.bool, optional + Allow opendal to send requests without signing when + credentials are not loaded. bucket : builtins.str bucket name - root : builtins.str, optional - root URI, all operations happens under `root` - endpoint : builtins.str, optional - endpoint URI of GCS service, default is - `https://storage.googleapis.com` - scope : builtins.str, optional - Scope for gcs. - service_account : builtins.str, optional - Service Account for gcs. credential : builtins.str, optional Credentials string for GCS service OAuth2 authentication. credential_path : builtins.str, optional Local path to credentials file for GCS service OAuth2 authentication. - predefined_acl : builtins.str, optional - The predefined acl for GCS. default_storage_class : builtins.str, optional The default storage class used by gcs. - allow_anonymous : builtins.bool, optional - Allow opendal to send requests without signing when - credentials are not loaded. + disable_config_load : builtins.bool, optional + Disable loading configuration from the environment. disable_vm_metadata : builtins.bool, optional Disable attempting to load credentials from the GCE metadata server when running within Google Cloud. - disable_config_load : builtins.bool, optional - Disable loading configuration from the environment. + endpoint : builtins.str, optional + endpoint URI of GCS service, default is + `https://storage.googleapis.com` + predefined_acl : builtins.str, optional + The predefined acl for GCS. + root : builtins.str, optional + root URI, all operations happens under `root` + scope : builtins.str, optional + Scope for gcs. + service_account : builtins.str, optional + Service Account for gcs. token : builtins.str, optional A Google Cloud OAuth2 token. Takes precedence over `credential` and @@ -2913,27 +3040,27 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Gdrive, typing.Literal["gdrive"]], /, *, - root: builtins.str = ..., access_token: builtins.str = ..., - refresh_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `gdrive` service. Parameters ---------- - root : builtins.str, optional - The root for gdrive access_token : builtins.str, optional Access token for gdrive. - refresh_token : builtins.str, optional - Refresh token for gdrive. client_id : builtins.str, optional Client id for gdrive. client_secret : builtins.str, optional Client secret for gdrive. + refresh_token : builtins.str, optional + Refresh token for gdrive. + root : builtins.str, optional + The root for gdrive Returns ------- AsyncOperator @@ -2955,24 +3082,24 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Ghac, typing.Literal["ghac"]], /, *, - root: builtins.str = ..., - version: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., runtime_token: builtins.str = ..., + version: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `ghac` service. Parameters ---------- - root : builtins.str, optional - The root path for ghac. - version : builtins.str, optional - The version that used by cache. endpoint : builtins.str, optional The endpoint for ghac service. + root : builtins.str, optional + The root path for ghac. runtime_token : builtins.str, optional The runtime token for ghac service. + version : builtins.str, optional + The version that used by cache. Returns ------- AsyncOperator @@ -2994,10 +3121,10 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Gridfs, typing.Literal["gridfs"]], /, *, - connection_string: builtins.str = ..., - database: builtins.str = ..., bucket: builtins.str = ..., chunk_size: builtins.int = ..., + connection_string: builtins.str = ..., + database: builtins.str = ..., root: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -3005,17 +3132,17 @@ submit! { Parameters ---------- - connection_string : builtins.str, optional - The connection string of the MongoDB service. - database : builtins.str, optional - The database name of the MongoDB GridFs service to - read/write. bucket : builtins.str, optional The bucket name of the MongoDB GridFs service to read/write. chunk_size : builtins.int, optional The chunk size of the MongoDB GridFs service used to break the user file into chunks. + connection_string : builtins.str, optional + The connection string of the MongoDB service. + database : builtins.str, optional + The database name of the MongoDB GridFs service to + read/write. root : builtins.str, optional The working directory, all operations will be performed under it. @@ -3040,21 +3167,21 @@ submit! { scheme: typing.Union[opendal.services.Scheme.HdfsNative, typing.Literal["hdfs-native"]], /, *, - root: builtins.str = ..., - name_node: builtins.str = ..., enable_append: builtins.bool = ..., + name_node: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `hdfs-native` service. Parameters ---------- - root : builtins.str, optional - work dir of this backend - name_node : builtins.str, optional - name_node of this backend enable_append : builtins.bool, optional enable the append capacity + name_node : builtins.str, optional + name_node of this backend + root : builtins.str, optional + work dir of this backend Returns ------- AsyncOperator @@ -3077,10 +3204,10 @@ submit! { /, *, endpoint: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., - token: builtins.str = ..., root: builtins.str = ..., + token: builtins.str = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `http` service. @@ -3089,14 +3216,14 @@ submit! { ---------- endpoint : builtins.str, optional endpoint of this backend - username : builtins.str, optional - username of this backend password : builtins.str, optional password of this backend - token : builtins.str, optional - token of this backend root : builtins.str, optional root of this backend + token : builtins.str, optional + token of this backend + username : builtins.str, optional + username of this backend Returns ------- AsyncOperator @@ -3118,8 +3245,8 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Huggingface, typing.Literal["huggingface"]], /, *, - repo_type: builtins.str = ..., repo_id: builtins.str = ..., + repo_type: builtins.str = ..., revision: builtins.str = ..., root: builtins.str = ..., token: builtins.str = ..., @@ -3129,13 +3256,13 @@ submit! { Parameters ---------- + repo_id : builtins.str, optional + Repo id of this backend. + This is required. repo_type : builtins.str, optional Repo type of this backend. Default is model. Available values: - model - dataset - repo_id : builtins.str, optional - Repo id of this backend. - This is required. revision : builtins.str, optional Revision of this backend. Default is main. @@ -3200,18 +3327,18 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Ipmfs, typing.Literal["ipmfs"]], /, *, - root: builtins.str = ..., endpoint: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `ipmfs` service. Parameters ---------- - root : builtins.str, optional - Root for ipfs. endpoint : builtins.str, optional Endpoint for ipfs. + root : builtins.str, optional + Root for ipfs. Returns ------- AsyncOperator @@ -3233,26 +3360,26 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Koofr, typing.Literal["koofr"]], /, *, - endpoint: builtins.str, email: builtins.str, - root: builtins.str = ..., + endpoint: builtins.str, password: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `koofr` service. Parameters ---------- - endpoint : builtins.str - Koofr endpoint. email : builtins.str Koofr email. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. + endpoint : builtins.str + Koofr endpoint. password : builtins.str, optional password of this backend. (Must be the application password) + root : builtins.str, optional + root of this backend. + All operations will happen under this root. Returns ------- AsyncOperator @@ -3274,32 +3401,32 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Memcached, typing.Literal["memcached"]], /, *, + default_ttl: typing.Any = ..., endpoint: builtins.str = ..., + password: builtins.str = ..., root: builtins.str = ..., username: builtins.str = ..., - password: builtins.str = ..., - default_ttl: typing.Any = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `memcached` service. Parameters ---------- + default_ttl : typing.Any, optional + The default ttl for put operations.. + a human readable duration string see + https://docs.rs/humantime/latest/humantime/fn.parse_duration.html + for more details endpoint : builtins.str, optional network address of the memcached service. For example: "tcp://localhost:11211" + password : builtins.str, optional + Memcached password, optional. root : builtins.str, optional the working directory of the service. Can be "/path/to/dir" default is "/" username : builtins.str, optional Memcached username, optional. - password : builtins.str, optional - Memcached password, optional. - default_ttl : typing.Any, optional - The default ttl for put operations.. - a human readable duration string see - https://docs.rs/humantime/latest/humantime/fn.parse_duration.html - for more details Returns ------- AsyncOperator @@ -3352,9 +3479,9 @@ submit! { /, *, max_capacity: builtins.int = ..., - time_to_live: builtins.str = ..., - time_to_idle: builtins.str = ..., root: builtins.str = ..., + time_to_idle: builtins.str = ..., + time_to_live: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `mini-moka` service. @@ -3365,16 +3492,16 @@ submit! { 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) - time_to_live : builtins.str, optional - 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) + root : builtins.str, optional + root path of this backend time_to_idle : builtins.str, optional 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) - root : builtins.str, optional - root path of this backend + time_to_live : builtins.str, optional + 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) Returns ------- AsyncOperator @@ -3396,33 +3523,33 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Moka, typing.Literal["moka"]], /, *, - name: builtins.str = ..., max_capacity: builtins.int = ..., - time_to_live: builtins.str = ..., - time_to_idle: builtins.str = ..., + name: builtins.str = ..., root: builtins.str = ..., + time_to_idle: builtins.str = ..., + time_to_live: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `moka` service. Parameters ---------- - name : builtins.str, optional - Name for this cache instance. max_capacity : builtins.int, optional 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) - time_to_live : builtins.str, optional - 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) + name : builtins.str, optional + Name for this cache instance. + root : builtins.str, optional + root path of this backend time_to_idle : builtins.str, optional 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) - root : builtins.str, optional - root path of this backend + time_to_live : builtins.str, optional + 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) Returns ------- AsyncOperator @@ -3444,11 +3571,11 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Mongodb, typing.Literal["mongodb"]], /, *, + collection: builtins.str = ..., connection_string: builtins.str = ..., database: builtins.str = ..., - collection: builtins.str = ..., - root: builtins.str = ..., key_field: builtins.str = ..., + root: builtins.str = ..., value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -3456,16 +3583,16 @@ submit! { Parameters ---------- + collection : builtins.str, optional + collection of this backend connection_string : builtins.str, optional connection string of this backend database : builtins.str, optional database of this backend - collection : builtins.str, optional - collection of this backend - root : builtins.str, optional - root of this backend key_field : builtins.str, optional key field of this backend + root : builtins.str, optional + root of this backend value_field : builtins.str, optional value field of this backend Returns @@ -3490,10 +3617,10 @@ submit! { /, *, connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., - value_field: builtins.str = ..., root: builtins.str = ..., + table: builtins.str = ..., + value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `mysql` service. @@ -3514,14 +3641,14 @@ submit! { `mysql://user:password@localhost:3306/db` For more information, please refer to . - table : builtins.str, optional - The table name for mysql. key_field : builtins.str, optional The key field name for mysql. - value_field : builtins.str, optional - The value field name for mysql. root : builtins.str, optional The root for mysql. + table : builtins.str, optional + The table name for mysql. + value_field : builtins.str, optional + The value field name for mysql. Returns ------- AsyncOperator @@ -3543,30 +3670,30 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Obs, typing.Literal["obs"]], /, *, - root: builtins.str = ..., - endpoint: builtins.str = ..., access_key_id: builtins.str = ..., - secret_access_key: builtins.str = ..., bucket: builtins.str = ..., enable_versioning: builtins.bool = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., + secret_access_key: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `obs` service. Parameters ---------- - root : builtins.str, optional - Root for obs. - endpoint : builtins.str, optional - Endpoint for obs. access_key_id : builtins.str, optional Access key id for obs. - secret_access_key : builtins.str, optional - Secret access key for obs. bucket : builtins.str, optional Bucket for obs. enable_versioning : builtins.bool, optional Is bucket versioning enabled for this bucket + endpoint : builtins.str, optional + Endpoint for obs. + root : builtins.str, optional + Root for obs. + secret_access_key : builtins.str, optional + Secret access key for obs. Returns ------- AsyncOperator @@ -3588,26 +3715,20 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Onedrive, typing.Literal["onedrive"]], /, *, - root: builtins.str = ..., access_token: builtins.str = ..., - refresh_token: builtins.str = ..., client_id: builtins.str = ..., client_secret: builtins.str = ..., enable_versioning: builtins.bool = ..., + refresh_token: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `onedrive` service. Parameters ---------- - root : builtins.str, optional - The root path for the OneDrive service for the file - access access_token : builtins.str, optional Microsoft Graph API (also OneDrive API) access token - refresh_token : builtins.str, optional - Microsoft Graph API (also OneDrive API) refresh - token client_id : builtins.str, optional Microsoft Graph API Application (client) ID that is in the Azure's app registration portal @@ -3616,6 +3737,12 @@ submit! { is in the Azure's app registration portal enable_versioning : builtins.bool, optional Enabling version support + refresh_token : builtins.str, optional + Microsoft Graph API (also OneDrive API) refresh + token + root : builtins.str, optional + The root path for the OneDrive service for the file + access Returns ------- AsyncOperator @@ -3637,25 +3764,25 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Oss, typing.Literal["oss"]], /, *, - bucket: builtins.str, - root: builtins.str = ..., - endpoint: builtins.str = ..., - presign_endpoint: builtins.str = ..., - addressing_style: builtins.str = ..., - presign_addressing_style: builtins.str = ..., - enable_versioning: builtins.bool = ..., - server_side_encryption: builtins.str = ..., - server_side_encryption_key_id: builtins.str = ..., - allow_anonymous: builtins.bool = ..., access_key_id: builtins.str = ..., access_key_secret: builtins.str = ..., - security_token: builtins.str = ..., + addressing_style: builtins.str = ..., + allow_anonymous: builtins.bool = ..., batch_max_operations: builtins.int = ..., + bucket: builtins.str, delete_max_size: builtins.int = ..., - role_arn: builtins.str = ..., - role_session_name: builtins.str = ..., + enable_versioning: builtins.bool = ..., + endpoint: builtins.str = ..., oidc_provider_arn: builtins.str = ..., oidc_token_file: builtins.str = ..., + presign_addressing_style: builtins.str = ..., + presign_endpoint: builtins.str = ..., + role_arn: builtins.str = ..., + role_session_name: builtins.str = ..., + root: builtins.str = ..., + security_token: builtins.str = ..., + server_side_encryption: builtins.str = ..., + server_side_encryption_key_id: builtins.str = ..., sts_endpoint: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -3663,26 +3790,6 @@ submit! { Parameters ---------- - bucket : builtins.str - Bucket for oss. - root : builtins.str, optional - Root for oss. - endpoint : builtins.str, optional - Endpoint for oss. - presign_endpoint : builtins.str, optional - Presign endpoint for oss. - addressing_style : builtins.str, optional - Addressing style for oss. - presign_addressing_style : builtins.str, optional - Pre sign addressing style for oss. - enable_versioning : builtins.bool, optional - is bucket versioning enabled for this bucket - server_side_encryption : builtins.str, optional - Server side encryption for oss. - server_side_encryption_key_id : builtins.str, optional - Server side encryption key id for oss. - allow_anonymous : builtins.bool, optional - Allow anonymous for oss. access_key_id : builtins.str, optional Access key id for oss. - this field if it's `is_some` - env value: @@ -3691,22 +3798,20 @@ submit! { Access key secret for oss. - this field if it's `is_some` - env value: [`ALIBABA_CLOUD_ACCESS_KEY_SECRET`] - security_token : builtins.str, optional - `security_token` will be loaded from - this field if - it's `is_some` - env value: - [`ALIBABA_CLOUD_SECURITY_TOKEN`] + addressing_style : builtins.str, optional + Addressing style for oss. + allow_anonymous : builtins.bool, optional + Allow anonymous for oss. batch_max_operations : builtins.int, optional The size of max batch operations. + bucket : builtins.str + Bucket for oss. delete_max_size : builtins.int, optional The size of max delete operations. - role_arn : builtins.str, optional - 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 : builtins.str, optional - role_session_name for this backend. + enable_versioning : builtins.bool, optional + is bucket versioning enabled for this bucket + endpoint : builtins.str, optional + Endpoint for oss. oidc_provider_arn : builtins.str, optional `oidc_provider_arn` will be loaded from - this field if it's `is_some` - env value: @@ -3715,6 +3820,28 @@ submit! { `oidc_token_file` will be loaded from - this field if it's `is_some` - env value: [`ALIBABA_CLOUD_OIDC_TOKEN_FILE`] + presign_addressing_style : builtins.str, optional + Pre sign addressing style for oss. + presign_endpoint : builtins.str, optional + Presign endpoint for oss. + role_arn : builtins.str, optional + 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 : builtins.str, optional + role_session_name for this backend. + root : builtins.str, optional + Root for oss. + security_token : builtins.str, optional + `security_token` will be loaded from - this field if + it's `is_some` - env value: + [`ALIBABA_CLOUD_SECURITY_TOKEN`] + server_side_encryption : builtins.str, optional + Server side encryption for oss. + server_side_encryption_key_id : builtins.str, optional + Server side encryption key id for oss. sts_endpoint : builtins.str, optional `sts_endpoint` will be loaded from - this field if it's `is_some` - env value: @@ -3741,8 +3868,8 @@ submit! { /, *, datafile: builtins.str = ..., - segment: builtins.str = ..., index: builtins.str = ..., + segment: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `persy` service. @@ -3752,10 +3879,10 @@ submit! { datafile : builtins.str, optional That path to the persy data file. The directory in the path must already exist. - segment : builtins.str, optional - That name of the persy segment. index : builtins.str, optional That name of the persy index. + segment : builtins.str, optional + That name of the persy segment. Returns ------- AsyncOperator @@ -3777,10 +3904,10 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Postgresql, typing.Literal["postgresql"]], /, *, - root: builtins.str = ..., connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., + root: builtins.str = ..., + table: builtins.str = ..., value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" @@ -3788,10 +3915,6 @@ submit! { Parameters ---------- - root : builtins.str, optional - Root of this backend. - All operations will happen under this root. - Default to `/` if not set. connection_string : builtins.str, optional The URL should be with a scheme of either `postgres://` or `postgresql://`. @@ -3803,10 +3926,14 @@ submit! { `postgresql:///mydb?user=user&host=/var/lib/postgresql` For more information, please visit . - table : builtins.str, optional - the table of postgresql key_field : builtins.str, optional the key field of postgresql + root : builtins.str, optional + Root of this backend. + All operations will happen under this root. + Default to `/` if not set. + table : builtins.str, optional + the table of postgresql value_field : builtins.str, optional the value field of postgresql Returns @@ -3866,45 +3993,45 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Redis, typing.Literal["redis"]], /, *, + cluster_endpoints: builtins.str = ..., db: builtins.int, + default_ttl: typing.Any = ..., endpoint: builtins.str = ..., - cluster_endpoints: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., root: builtins.str = ..., - default_ttl: typing.Any = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `redis` service. Parameters ---------- + cluster_endpoints : builtins.str, optional + 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 db : builtins.int the number of DBs redis can take is unlimited default is db 0 + default_ttl : typing.Any, optional + The default ttl for put operations.. + a human readable duration string see + https://docs.rs/humantime/latest/humantime/fn.parse_duration.html + for more details endpoint : builtins.str, optional network address of the Redis service. Can be "tcp://127.0.0.1:6379", e.g. default is "tcp://127.0.0.1:6379" - cluster_endpoints : builtins.str, optional - 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 - username : builtins.str, optional - the username to connect redis service. - default is None password : builtins.str, optional the password for authentication default is None root : builtins.str, optional the working directory of the Redis service. Can be "/path/to/dir" default is "/" - default_ttl : typing.Any, optional - The default ttl for put operations.. - a human readable duration string see - https://docs.rs/humantime/latest/humantime/fn.parse_duration.html - for more details + username : builtins.str, optional + the username to connect redis service. + default is None Returns ------- AsyncOperator @@ -3926,50 +4053,121 @@ submit! { scheme: typing.Union[opendal.services.Scheme.S3, typing.Literal["s3"]], /, *, + access_key_id: builtins.str = ..., + allow_anonymous: builtins.bool = ..., + batch_max_operations: builtins.int = ..., bucket: builtins.str, - root: builtins.str = ..., + checksum_algorithm: builtins.str = ..., + default_storage_class: builtins.str = ..., + delete_max_size: builtins.int = ..., + disable_config_load: builtins.bool = ..., + disable_ec2_metadata: builtins.bool = ..., + disable_list_objects_v2: builtins.bool = ..., + disable_stat_with_override: builtins.bool = ..., + disable_write_with_if_match: builtins.bool = ..., + enable_request_payer: builtins.bool = ..., enable_versioning: builtins.bool = ..., + enable_virtual_host_style: builtins.bool = ..., + enable_write_with_append: builtins.bool = ..., endpoint: builtins.str = ..., + external_id: builtins.str = ..., region: builtins.str = ..., - access_key_id: builtins.str = ..., - secret_access_key: builtins.str = ..., - session_token: builtins.str = ..., role_arn: builtins.str = ..., - external_id: builtins.str = ..., role_session_name: builtins.str = ..., - disable_config_load: builtins.bool = ..., - disable_ec2_metadata: builtins.bool = ..., - allow_anonymous: builtins.bool = ..., + root: builtins.str = ..., + secret_access_key: builtins.str = ..., server_side_encryption: builtins.str = ..., server_side_encryption_aws_kms_key_id: builtins.str = ..., server_side_encryption_customer_algorithm: builtins.str = ..., server_side_encryption_customer_key: builtins.str = ..., server_side_encryption_customer_key_md5: builtins.str = ..., - default_storage_class: builtins.str = ..., - enable_virtual_host_style: builtins.bool = ..., - batch_max_operations: builtins.int = ..., - delete_max_size: builtins.int = ..., - disable_stat_with_override: builtins.bool = ..., - checksum_algorithm: builtins.str = ..., - disable_write_with_if_match: builtins.bool = ..., - enable_write_with_append: builtins.bool = ..., - disable_list_objects_v2: builtins.bool = ..., - enable_request_payer: builtins.bool = ..., + session_token: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `s3` service. Parameters ---------- + access_key_id : builtins.str, optional + 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 : builtins.bool, optional + Allow anonymous will allow opendal to send request + without signing when credential is not loaded. + batch_max_operations : builtins.int, optional + Set maximum batch operations of this backend. + Some compatible services have a limit on the number + of operations in a batch request. + For example, R2 could return `Internal Error` while + batch delete 1000 files. + Please tune this value based on services' document. bucket : builtins.str bucket name of this backend. required. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. - default to `/` if not set. + checksum_algorithm : builtins.str, optional + 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" + default_storage_class : builtins.str, optional + 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 : builtins.int, optional + Set the maximum delete size of this backend. + Some compatible services have a limit on the number + of operations in a batch request. + For example, R2 could return `Internal Error` while + batch delete 1000 files. + Please tune this value based on services' document. + disable_config_load : builtins.bool, optional + 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 : builtins.bool, optional + 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 : builtins.bool, optional + 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 : builtins.bool, optional + Disable stat with override so that opendal will not + send stat request with override queries. + For example, R2 doesn't support stat with + `response_content_type` query. + disable_write_with_if_match : builtins.bool, optional + Disable write with if match so that opendal will not + send write request with if match headers. + For example, Ceph RADOS S3 doesn't support write + with if match. + enable_request_payer : builtins.bool, optional + Indicates whether the client agrees to pay for the + requests made to the S3 bucket. enable_versioning : builtins.bool, optional is bucket versioning enabled for this bucket + enable_virtual_host_style : builtins.bool, optional + 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 : builtins.bool, optional + Enable write with append so that opendal will send + write request with append headers. endpoint : builtins.str, optional endpoint of this backend. Endpoint must be full uri, e.g. @@ -3986,6 +4184,8 @@ submit! { - If not, we will try to load it from environment. - If still not set, default to `https://s3.amazonaws.com`. + external_id : builtins.str, optional + external_id for this backend. region : builtins.str, optional Region represent the signing region of this endpoint. @@ -3994,42 +4194,22 @@ submit! { 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. - access_key_id : builtins.str, optional - 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. - secret_access_key : builtins.str, optional - 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. - session_token : builtins.str, optional - session_token (aka, security token) of this backend. - This token will expire after sometime, it's - recommended to set session_token by hand. role_arn : builtins.str, optional 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`. - external_id : builtins.str, optional - external_id for this backend. role_session_name : builtins.str, optional role_session_name for this backend. - disable_config_load : builtins.bool, optional - 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 : builtins.bool, optional - 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 - allow_anonymous : builtins.bool, optional - Allow anonymous will allow opendal to send request - without signing when credential is not loaded. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. + default to `/` if not set. + secret_access_key : builtins.str, optional + 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 : builtins.str, optional server_side_encryption for this backend. Available values: `AES256`, `aws:kms`. @@ -4063,63 +4243,10 @@ submit! { backend. Value: MD5 digest of key specified in `server_side_encryption_customer_key`. - default_storage_class : builtins.str, optional - 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 - enable_virtual_host_style : builtins.bool, optional - 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` - batch_max_operations : builtins.int, optional - Set maximum batch operations of this backend. - Some compatible services have a limit on the number - of operations in a batch request. - For example, R2 could return `Internal Error` while - batch delete 1000 files. - Please tune this value based on services' document. - delete_max_size : builtins.int, optional - Set the maximum delete size of this backend. - Some compatible services have a limit on the number - of operations in a batch request. - For example, R2 could return `Internal Error` while - batch delete 1000 files. - Please tune this value based on services' document. - disable_stat_with_override : builtins.bool, optional - Disable stat with override so that opendal will not - send stat request with override queries. - For example, R2 doesn't support stat with - `response_content_type` query. - checksum_algorithm : builtins.str, optional - 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" - disable_write_with_if_match : builtins.bool, optional - Disable write with if match so that opendal will not - send write request with if match headers. - For example, Ceph RADOS S3 doesn't support write - with if match. - enable_write_with_append : builtins.bool, optional - Enable write with append so that opendal will send - write request with append headers. - disable_list_objects_v2 : builtins.bool, optional - 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. - enable_request_payer : builtins.bool, optional - Indicates whether the client agrees to pay for the - requests made to the S3 bucket. + session_token : builtins.str, optional + session_token (aka, security token) of this backend. + This token will expire after sometime, it's + recommended to set session_token by hand. Returns ------- AsyncOperator @@ -4141,29 +4268,29 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Seafile, typing.Literal["seafile"]], /, *, + endpoint: builtins.str = ..., + password: builtins.str = ..., repo_name: builtins.str, root: builtins.str = ..., - endpoint: builtins.str = ..., username: builtins.str = ..., - password: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `seafile` service. Parameters ---------- + endpoint : builtins.str, optional + endpoint address of this backend. + password : builtins.str, optional + password of this backend. repo_name : builtins.str repo_name of this backend. required. root : builtins.str, optional root of this backend. All operations will happen under this root. - endpoint : builtins.str, optional - endpoint address of this backend. username : builtins.str, optional username of this backend. - password : builtins.str, optional - password of this backend. Returns ------- AsyncOperator @@ -4173,6 +4300,51 @@ submit! { } } +submit! { + gen_methods_from_python! { + r#" + import builtins + import typing + import typing_extensions + import opendal.services + class AsyncOperator: + def __new__(cls, + scheme: typing.Union[opendal.services.Scheme.Sftp, typing.Literal["sftp"]], + /, + *, + enable_copy: builtins.bool = ..., + endpoint: builtins.str = ..., + key: builtins.str = ..., + known_hosts_strategy: builtins.str = ..., + root: builtins.str = ..., + user: builtins.str = ..., + ) -> typing_extensions.Self: + r""" + Create a new `AsyncOperator` for `sftp` service. + + Parameters + ---------- + enable_copy : builtins.bool, optional + enable_copy of this backend + endpoint : builtins.str, optional + endpoint of this backend + key : builtins.str, optional + key of this backend + known_hosts_strategy : builtins.str, optional + known_hosts_strategy of this backend + root : builtins.str, optional + root of this backend + user : builtins.str, optional + user of this backend + Returns + ------- + AsyncOperator + The new `AsyncOperator` for `sftp` service + """ + "# + } +} + submit! { gen_methods_from_python! { r#" @@ -4222,10 +4394,10 @@ submit! { /, *, connection_string: builtins.str = ..., - table: builtins.str = ..., key_field: builtins.str = ..., - value_field: builtins.str = ..., root: builtins.str = ..., + table: builtins.str = ..., + value_field: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `sqlite` service. @@ -4241,21 +4413,21 @@ submit! { `sqlite:data.db` - `sqlite://data.db` For more information, please visit . - table : builtins.str, optional - Set the table name of the sqlite service to - read/write. key_field : builtins.str, optional Set the key field name of the sqlite service to read/write. Default to `key` if not specified. - value_field : builtins.str, optional - Set the value field name of the sqlite service to - read/write. - Default to `value` if not specified. root : builtins.str, optional set the working directory, all operations will be performed under it. default: "/" + table : builtins.str, optional + Set the table name of the sqlite service to + read/write. + value_field : builtins.str, optional + Set the value field name of the sqlite service to + read/write. + Default to `value` if not specified. Returns ------- AsyncOperator @@ -4277,8 +4449,8 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Swift, typing.Literal["swift"]], /, *, - endpoint: builtins.str = ..., container: builtins.str = ..., + endpoint: builtins.str = ..., root: builtins.str = ..., token: builtins.str = ..., ) -> typing_extensions.Self: @@ -4287,10 +4459,10 @@ submit! { Parameters ---------- - endpoint : builtins.str, optional - The endpoint for Swift. container : builtins.str, optional The container for Swift. + endpoint : builtins.str, optional + The endpoint for Swift. root : builtins.str, optional The root for Swift. token : builtins.str, optional @@ -4317,9 +4489,9 @@ submit! { /, *, bucket: builtins.str, - root: builtins.str = ..., operator: builtins.str = ..., password: builtins.str = ..., + root: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `upyun` service. @@ -4328,13 +4500,13 @@ submit! { ---------- bucket : builtins.str bucket address of this backend. - root : builtins.str, optional - root of this backend. - All operations will happen under this root. operator : builtins.str, optional username of this backend. password : builtins.str, optional password of this backend. + root : builtins.str, optional + root of this backend. + All operations will happen under this root. Returns ------- AsyncOperator @@ -4386,30 +4558,30 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Webdav, typing.Literal["webdav"]], /, *, + disable_copy: builtins.bool = ..., endpoint: builtins.str = ..., - username: builtins.str = ..., password: builtins.str = ..., - token: builtins.str = ..., root: builtins.str = ..., - disable_copy: builtins.bool = ..., + token: builtins.str = ..., + username: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `webdav` service. Parameters ---------- + disable_copy : builtins.bool, optional + WebDAV Service doesn't support copy. endpoint : builtins.str, optional endpoint of this backend - username : builtins.str, optional - username of this backend password : builtins.str, optional password of this backend - token : builtins.str, optional - token of this backend root : builtins.str, optional root of this backend - disable_copy : builtins.bool, optional - WebDAV Service doesn't support copy. + token : builtins.str, optional + token of this backend + username : builtins.str, optional + username of this backend Returns ------- AsyncOperator @@ -4431,30 +4603,30 @@ submit! { scheme: typing.Union[opendal.services.Scheme.Webhdfs, typing.Literal["webhdfs"]], /, *, - root: builtins.str = ..., - endpoint: builtins.str = ..., - user_name: builtins.str = ..., + atomic_write_dir: builtins.str = ..., delegation: builtins.str = ..., disable_list_batch: builtins.bool = ..., - atomic_write_dir: builtins.str = ..., + endpoint: builtins.str = ..., + root: builtins.str = ..., + user_name: builtins.str = ..., ) -> typing_extensions.Self: r""" Create a new `AsyncOperator` for `webhdfs` service. Parameters ---------- - root : builtins.str, optional - Root for webhdfs. - endpoint : builtins.str, optional - Endpoint for webhdfs. - user_name : builtins.str, optional - Name of the user for webhdfs. + atomic_write_dir : builtins.str, optional + atomic_write_dir of this backend delegation : builtins.str, optional Delegation token for webhdfs. disable_list_batch : builtins.bool, optional Disable batch listing - atomic_write_dir : builtins.str, optional - atomic_write_dir of this backend + endpoint : builtins.str, optional + Endpoint for webhdfs. + root : builtins.str, optional + Root for webhdfs. + user_name : builtins.str, optional + Name of the user for webhdfs. Returns ------- AsyncOperator @@ -4550,6 +4722,8 @@ impl_enum_from!( Dropbox, #[cfg(feature = "services-fs")] Fs, + #[cfg(feature = "services-ftp")] + Ftp, #[cfg(feature = "services-gcs")] Gcs, #[cfg(feature = "services-gdrive")] @@ -4600,6 +4774,8 @@ impl_enum_from!( S3, #[cfg(feature = "services-seafile")] Seafile, + #[cfg(feature = "services-sftp")] + Sftp, #[cfg(feature = "services-sled")] Sled, #[cfg(feature = "services-sqlite")] @@ -4644,6 +4820,8 @@ impl_enum_from!( Dropbox, #[cfg(feature = "services-fs")] Fs, + #[cfg(feature = "services-ftp")] + Ftp, #[cfg(feature = "services-gcs")] Gcs, #[cfg(feature = "services-gdrive")] @@ -4694,6 +4872,8 @@ impl_enum_from!( S3, #[cfg(feature = "services-seafile")] Seafile, + #[cfg(feature = "services-sftp")] + Sftp, #[cfg(feature = "services-sled")] Sled, #[cfg(feature = "services-sqlite")] diff --git a/dev/src/generate/parser.rs b/dev/src/generate/parser.rs index fbacb6facd56..6d9ebe0c5732 100644 --- a/dev/src/generate/parser.rs +++ b/dev/src/generate/parser.rs @@ -35,10 +35,11 @@ pub fn sorted_services(services: Services, test: fn(&str) -> bool) -> Services { continue; } - let mut sorted = srv.config.into_iter().enumerate().collect::>(); - sorted.sort_by_key(|(i, v)| (v.optional, *i)); - let config = sorted.into_iter().map(|(_, v)| v).collect(); - srvs.insert(k, Service { config }); + // Sort configs by name (lexicographically) + let mut sorted = srv.config; + sorted.sort_by(|a, b| a.name.cmp(&b.name)); + + srvs.insert(k, Service { config: sorted }); } srvs } diff --git a/dev/src/generate/python.rs b/dev/src/generate/python.rs index fcd12342c0c1..5eda8b581f5a 100644 --- a/dev/src/generate/python.rs +++ b/dev/src/generate/python.rs @@ -25,7 +25,7 @@ use std::path::PathBuf; fn enabled_service(srv: &str) -> bool { match srv { // not enabled in bindings/python/Cargo.toml - "etcd" | "foundationdb" | "ftp" | "hdfs" | "rocksdb" | "tikv" | "sftp" | "github" + "etcd" | "foundationdb" | "hdfs" | "rocksdb" | "tikv" | "github" | "cloudflare_kv" | "monoiofs" | "dbfs" | "surrealdb" | "d1" | "opfs" | "compfs" | "lakefs" | "pcloud" | "vercel_blob" => false, _ => true,