You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2025/10/27 09:01:21 UTC
(opendal) branch main updated: feat(bindings/python)!: Generate stubs for Operator overloads and Scheme (#6729)
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 9d8ccf0b3 feat(bindings/python)!: Generate stubs for Operator overloads and Scheme (#6729)
9d8ccf0b3 is described below
commit 9d8ccf0b32772ec977bf8e692c843b0f1a9627ba
Author: Chitral Verma <ch...@gmail.com>
AuthorDate: Mon Oct 27 14:31:16 2025 +0530
feat(bindings/python)!: Generate stubs for Operator overloads and Scheme (#6729)
* add services module with PyScheme
* ensure python 3.10 compatibility file.pyi
* Add new service base
* add config to docstrings
* fix
* Add overloads to operators
* remove and replace files
* overloads to use pyscheme directly
* overloads to use pyscheme directly
* Add Scheme to overloads
* Add returns section to overloads
* update doc style
---
bindings/python/justfile | 1 +
bindings/python/mkdocs.yml | 2 +-
bindings/python/python/opendal/__base.pyi | 764 -----
bindings/python/python/opendal/__init__.py | 21 +-
bindings/python/python/opendal/file.pyi | 4 +-
bindings/python/python/opendal/operator.pyi | 4185 ++++++++++++++++++++++--
bindings/python/python/opendal/services.pyi | 85 +
bindings/python/ruff.toml | 2 +-
bindings/python/src/file.rs | 2 +-
bindings/python/src/lib.rs | 5 +
bindings/python/src/operator.rs | 59 +-
bindings/python/src/services.rs | 4714 +++++++++++++++++++++++++++
dev/src/generate/python.j2 | 233 +-
dev/src/generate/python.rs | 190 +-
14 files changed, 9092 insertions(+), 1175 deletions(-)
diff --git a/bindings/python/justfile b/bindings/python/justfile
index f1e152f0d..fdca9af5b 100644
--- a/bindings/python/justfile
+++ b/bindings/python/justfile
@@ -54,6 +54,7 @@ clean:
[group('build')]
stub-gen: setup
@echo "{{ BOLD }}--- Generating Python type stubs ---{{ NORMAL }}"
+ @cargo run --quiet --manifest-path=../../dev/Cargo.toml -- generate -l python
@cargo run --quiet --bin stub_gen
@echo "{{ BOLD }}--- Formatting and fixing generated stubs ---{{ NORMAL }}"
-@bash -c 'shopt -s globstar; uv run ruff check **/*.pyi --fix --unsafe-fixes --silent || true'
diff --git a/bindings/python/mkdocs.yml b/bindings/python/mkdocs.yml
index 6adeb6474..eda41191a 100644
--- a/bindings/python/mkdocs.yml
+++ b/bindings/python/mkdocs.yml
@@ -34,7 +34,7 @@ plugins:
python:
paths: [python]
options:
- docstring_style: google
+ docstring_style: numpy
nav:
- Overview: index.md
diff --git a/bindings/python/python/opendal/__base.pyi b/bindings/python/python/opendal/__base.pyi
deleted file mode 100644
index f933b0f6f..000000000
--- a/bindings/python/python/opendal/__base.pyi
+++ /dev/null
@@ -1,764 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-"""
-> DO NOT EDIT IT MANUALLY <
-
-This file is generated by opendal/dev/src/generate/python.rs.
-`opendal.__base` doesn't exists.
-"""
-
-from typing import Literal, TypeAlias, overload
-
-# `true`/`false`` in any case, for example, `true`/`True`/`TRUE` `false`/`False`/`FALSE`
-_bool: TypeAlias = str
-# a str represent a int, for example, `"10"`/`"0"`
-_int: TypeAlias = str
-
-# a human readable duration string
-# see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html
-# for more details
-_duration: TypeAlias = str
-
-# A "," separated string, for example `"127.0.0.1:1,127.0.0.1:2"`
-_strings: TypeAlias = str
-
-class _Base:
- """this is not a real base class but typing mixin,
-
- The services list here is support by opendal pypi wheel.
- """
-
- @overload
- def __init__(
- self,
- scheme: Literal["aliyun-drive"],
- /,
- *,
- drive_type: str,
- root: str = ...,
- access_token: str = ...,
- client_id: str = ...,
- client_secret: str = ...,
- refresh_token: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["alluxio"],
- /,
- *,
- root: str = ...,
- endpoint: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["atomicserver"],
- /,
- *,
- root: str = ...,
- endpoint: str = ...,
- private_key: str = ...,
- public_key: str = ...,
- parent_resource_id: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["azblob"],
- /,
- *,
- container: str,
- root: str = ...,
- endpoint: str = ...,
- account_name: str = ...,
- account_key: str = ...,
- encryption_key: str = ...,
- encryption_key_sha256: str = ...,
- encryption_algorithm: str = ...,
- sas_token: str = ...,
- batch_max_operations: _int = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["azdls"],
- /,
- *,
- filesystem: str,
- root: str = ...,
- endpoint: str = ...,
- account_name: str = ...,
- account_key: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["azfile"],
- /,
- *,
- share_name: str,
- root: str = ...,
- endpoint: str = ...,
- account_name: str = ...,
- account_key: str = ...,
- sas_token: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["b2"],
- /,
- *,
- bucket: str,
- bucket_id: str,
- root: str = ...,
- application_key_id: str = ...,
- application_key: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["cacache"],
- /,
- *,
- datadir: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["cloudflare-kv"],
- /,
- *,
- token: str = ...,
- account_id: str = ...,
- namespace_id: str = ...,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["compfs"],
- /,
- *,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["cos"],
- /,
- *,
- root: str = ...,
- endpoint: str = ...,
- secret_id: str = ...,
- secret_key: str = ...,
- bucket: str = ...,
- enable_versioning: _bool = ...,
- disable_config_load: _bool = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["d1"],
- /,
- *,
- token: str = ...,
- account_id: str = ...,
- database_id: str = ...,
- root: str = ...,
- table: str = ...,
- key_field: str = ...,
- value_field: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["dashmap"],
- /,
- *,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["dbfs"],
- /,
- *,
- root: str = ...,
- endpoint: str = ...,
- token: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["dropbox"],
- /,
- *,
- root: str = ...,
- access_token: str = ...,
- refresh_token: str = ...,
- client_id: str = ...,
- client_secret: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["fs"],
- /,
- *,
- root: str = ...,
- atomic_write_dir: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["gcs"],
- /,
- *,
- bucket: str,
- root: str = ...,
- endpoint: str = ...,
- scope: str = ...,
- service_account: str = ...,
- credential: str = ...,
- credential_path: str = ...,
- predefined_acl: str = ...,
- default_storage_class: str = ...,
- allow_anonymous: _bool = ...,
- disable_vm_metadata: _bool = ...,
- disable_config_load: _bool = ...,
- token: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["gdrive"],
- /,
- *,
- root: str = ...,
- access_token: str = ...,
- refresh_token: str = ...,
- client_id: str = ...,
- client_secret: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["ghac"],
- /,
- *,
- root: str = ...,
- version: str = ...,
- endpoint: str = ...,
- runtime_token: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["github"],
- /,
- *,
- owner: str,
- repo: str,
- root: str = ...,
- token: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["gridfs"],
- /,
- *,
- connection_string: str = ...,
- database: str = ...,
- bucket: str = ...,
- chunk_size: _int = ...,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["hdfs-native"],
- /,
- *,
- root: str = ...,
- name_node: str = ...,
- enable_append: _bool = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["http"],
- /,
- *,
- endpoint: str = ...,
- username: str = ...,
- password: str = ...,
- token: str = ...,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["huggingface"],
- /,
- *,
- repo_type: str = ...,
- repo_id: str = ...,
- revision: str = ...,
- root: str = ...,
- token: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["icloud"],
- /,
- *,
- root: str = ...,
- apple_id: str = ...,
- password: str = ...,
- trust_token: str = ...,
- ds_web_auth_token: str = ...,
- is_china_mainland: _bool = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["ipfs"],
- /,
- *,
- endpoint: str = ...,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["ipmfs"],
- /,
- *,
- root: str = ...,
- endpoint: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["koofr"],
- /,
- *,
- endpoint: str,
- email: str,
- root: str = ...,
- password: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["lakefs"],
- /,
- *,
- endpoint: str = ...,
- username: str = ...,
- password: str = ...,
- root: str = ...,
- repository: str = ...,
- branch: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["memcached"],
- /,
- *,
- endpoint: str = ...,
- root: str = ...,
- username: str = ...,
- password: str = ...,
- default_ttl: _duration = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["memory"],
- /,
- *,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["mini-moka"],
- /,
- *,
- max_capacity: _int = ...,
- time_to_live: _duration = ...,
- time_to_idle: _duration = ...,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["moka"],
- /,
- *,
- name: str = ...,
- max_capacity: _int = ...,
- time_to_live: _duration = ...,
- time_to_idle: _duration = ...,
- num_segments: _int = ...,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["mongodb"],
- /,
- *,
- connection_string: str = ...,
- database: str = ...,
- collection: str = ...,
- root: str = ...,
- key_field: str = ...,
- value_field: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["monoiofs"],
- /,
- *,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["mysql"],
- /,
- *,
- connection_string: str = ...,
- table: str = ...,
- key_field: str = ...,
- value_field: str = ...,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["nebula-graph"],
- /,
- *,
- host: str = ...,
- port: _int = ...,
- username: str = ...,
- password: str = ...,
- space: str = ...,
- tag: str = ...,
- key_field: str = ...,
- value_field: str = ...,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["obs"],
- /,
- *,
- root: str = ...,
- endpoint: str = ...,
- access_key_id: str = ...,
- secret_access_key: str = ...,
- bucket: str = ...,
- enable_versioning: _bool = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["onedrive"],
- /,
- *,
- root: str = ...,
- access_token: str = ...,
- refresh_token: str = ...,
- client_id: str = ...,
- client_secret: str = ...,
- enable_versioning: _bool = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["opfs"],
- /,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["oss"],
- /,
- *,
- bucket: str,
- root: str = ...,
- endpoint: str = ...,
- presign_endpoint: str = ...,
- enable_versioning: _bool = ...,
- server_side_encryption: str = ...,
- server_side_encryption_key_id: str = ...,
- allow_anonymous: _bool = ...,
- access_key_id: str = ...,
- access_key_secret: str = ...,
- # deprecated: Please use `delete_max_size` instead of `batch_max_operations`
- batch_max_operations: _int = ...,
- delete_max_size: _int = ...,
- role_arn: str = ...,
- role_session_name: str = ...,
- oidc_provider_arn: str = ...,
- oidc_token_file: str = ...,
- sts_endpoint: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["pcloud"],
- /,
- *,
- endpoint: str,
- root: str = ...,
- username: str = ...,
- password: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["persy"],
- /,
- *,
- datafile: str = ...,
- segment: str = ...,
- index: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["postgresql"],
- /,
- *,
- root: str = ...,
- connection_string: str = ...,
- table: str = ...,
- key_field: str = ...,
- value_field: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["redb"],
- /,
- *,
- datadir: str = ...,
- root: str = ...,
- table: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["redis"],
- /,
- *,
- db: _int,
- endpoint: str = ...,
- cluster_endpoints: str = ...,
- username: str = ...,
- password: str = ...,
- root: str = ...,
- default_ttl: _duration = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["s3"],
- /,
- *,
- bucket: str,
- root: str = ...,
- enable_versioning: _bool = ...,
- endpoint: str = ...,
- region: str = ...,
- access_key_id: str = ...,
- secret_access_key: str = ...,
- session_token: str = ...,
- role_arn: str = ...,
- external_id: str = ...,
- role_session_name: str = ...,
- disable_config_load: _bool = ...,
- disable_ec2_metadata: _bool = ...,
- allow_anonymous: _bool = ...,
- server_side_encryption: str = ...,
- server_side_encryption_aws_kms_key_id: str = ...,
- server_side_encryption_customer_algorithm: str = ...,
- server_side_encryption_customer_key: str = ...,
- server_side_encryption_customer_key_md5: str = ...,
- default_storage_class: str = ...,
- enable_virtual_host_style: _bool = ...,
- # deprecated: Please use `delete_max_size` instead of `batch_max_operations`
- batch_max_operations: _int = ...,
- delete_max_size: _int = ...,
- disable_stat_with_override: _bool = ...,
- checksum_algorithm: str = ...,
- disable_write_with_if_match: _bool = ...,
- enable_write_with_append: _bool = ...,
- disable_list_objects_v2: _bool = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["seafile"],
- /,
- *,
- repo_name: str,
- root: str = ...,
- endpoint: str = ...,
- username: str = ...,
- password: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["sftp"],
- /,
- *,
- endpoint: str = ...,
- root: str = ...,
- user: str = ...,
- key: str = ...,
- known_hosts_strategy: str = ...,
- enable_copy: _bool = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["sled"],
- /,
- *,
- datadir: str = ...,
- root: str = ...,
- tree: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["sqlite"],
- /,
- *,
- connection_string: str = ...,
- table: str = ...,
- key_field: str = ...,
- value_field: str = ...,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["surrealdb"],
- /,
- *,
- connection_string: str = ...,
- username: str = ...,
- password: str = ...,
- namespace: str = ...,
- database: str = ...,
- table: str = ...,
- key_field: str = ...,
- value_field: str = ...,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["swift"],
- /,
- *,
- endpoint: str = ...,
- container: str = ...,
- root: str = ...,
- token: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["upyun"],
- /,
- *,
- bucket: str,
- root: str = ...,
- operator: str = ...,
- password: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["vercel-artifacts"],
- /,
- *,
- access_token: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["vercel-blob"],
- /,
- *,
- root: str = ...,
- token: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["webdav"],
- /,
- *,
- endpoint: str = ...,
- username: str = ...,
- password: str = ...,
- token: str = ...,
- root: str = ...,
- disable_copy: _bool = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["webhdfs"],
- /,
- *,
- root: str = ...,
- endpoint: str = ...,
- user_name: str = ...,
- delegation: str = ...,
- disable_list_batch: _bool = ...,
- atomic_write_dir: str = ...,
- ) -> None: ...
- @overload
- def __init__(
- self,
- scheme: Literal["yandex-disk"],
- /,
- *,
- access_token: str,
- root: str = ...,
- ) -> None: ...
- @overload
- def __init__(self, scheme: str, /, **kwargs: str) -> None: ...
diff --git a/bindings/python/python/opendal/__init__.py b/bindings/python/python/opendal/__init__.py
index c2b8430bd..92daf93cc 100644
--- a/bindings/python/python/opendal/__init__.py
+++ b/bindings/python/python/opendal/__init__.py
@@ -18,10 +18,25 @@
# ruff: noqa: D104
import builtins
-from opendal._opendal import * # noqa: F403 # pyright:ignore
+from opendal._opendal import ( # noqa: F403
+ capability,
+ exceptions,
+ file,
+ layers,
+ services,
+ types,
+)
from opendal.operator import AsyncOperator, Operator # pyright:ignore
__version__: builtins.str
-__all__ = _opendal.__all__ # noqa: F405 # pyright:ignore
-__all__ += ["AsyncOperator", "Operator"] # pyright:ignore
+__all__ = [
+ "capability",
+ "exceptions",
+ "file",
+ "layers",
+ "services",
+ "types",
+ "AsyncOperator",
+ "Operator",
+]
diff --git a/bindings/python/python/opendal/file.pyi b/bindings/python/python/opendal/file.pyi
index b6d59207c..0628815d2 100644
--- a/bindings/python/python/opendal/file.pyi
+++ b/bindings/python/python/opendal/file.pyi
@@ -23,6 +23,8 @@ import collections.abc
import types
import typing
+import typing_extensions
+
@typing.final
class AsyncFile:
r"""
@@ -111,7 +113,7 @@ class AsyncFile:
-----
A closed file cannot be used for further I/O operations.
"""
- def __aenter__(self) -> typing.Self: ...
+ def __aenter__(self) -> typing_extensions.Self: ...
def __aexit__(
self,
exc_type: type[builtins.BaseException] | None,
diff --git a/bindings/python/python/opendal/operator.pyi b/bindings/python/python/opendal/operator.pyi
index 564f8c9f8..76db9538b 100644
--- a/bindings/python/python/opendal/operator.pyi
+++ b/bindings/python/python/opendal/operator.pyi
@@ -25,7 +25,10 @@ import os
import pathlib
import typing
+import typing_extensions
+
import opendal.file
+import opendal.services
import opendal.types
from opendal.capability import Capability
from opendal.file import File
@@ -44,506 +47,4032 @@ class AsyncOperator:
Operator
"""
- def __new__(cls, scheme: builtins.str, **kwargs: typing.Any) -> AsyncOperator:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.YandexDisk | typing.Literal["yandex-disk"],
+ /,
+ *,
+ access_token: builtins.str,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Create a new `AsyncOperator`.
+ Create a new `AsyncOperator` for `yandex-disk` service.
Parameters
----------
- scheme : str
- The scheme of the service.
- **kwargs : dict
- The options for the service.
+ access_token : builtins.str
+ yandex disk oauth access_token.
+ root : builtins.str, optional
+ root of this backend.
+ All operations will happen under this root.
Returns
-------
AsyncOperator
- The new async operator.
+ The new `AsyncOperator` for `yandex-disk` service
"""
- def layer(self, layer: Layer) -> AsyncOperator:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Webhdfs | typing.Literal["webhdfs"],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ user_name: builtins.str = ...,
+ delegation: builtins.str = ...,
+ disable_list_batch: builtins.bool = ...,
+ atomic_write_dir: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Add a new layer to the operator.
+ Create a new `AsyncOperator` for `webhdfs` service.
Parameters
----------
- layer : Layer
- The layer to add.
+ 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.
+ 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
Returns
-------
AsyncOperator
- A new operator with the layer added.
+ The new `AsyncOperator` for `webhdfs` service
"""
- def open(
- self,
- path: builtins.str | os.PathLike | pathlib.Path,
- mode: builtins.str,
- **kwargs: typing.Any,
- ) -> collections.abc.Awaitable[opendal.file.AsyncFile]:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Webdav | typing.Literal["webdav"],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ token: builtins.str = ...,
+ root: builtins.str = ...,
+ disable_copy: builtins.bool = ...,
+ ) -> typing_extensions.Self:
r"""
- Open an async file-like object for the given path.
+ Create a new `AsyncOperator` for `webdav` service.
- The returning async file-like object is a context manager.
+ Parameters
+ ----------
+ 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.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `webdav` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.VercelArtifacts
+ | typing.Literal["vercel-artifacts"],
+ /,
+ *,
+ access_token: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `vercel-artifacts` service.
Parameters
----------
- path : str
- The path to the file.
- mode : str
- The mode to open the file in. Only "rb" and "wb" are supported.
- **kwargs : dict
- Additional options for the underlying reader or writer.
+ access_token : builtins.str, optional
+ The access token for Vercel.
Returns
-------
- coroutine
- An awaitable that returns a file-like object.
+ AsyncOperator
+ The new `AsyncOperator` for `vercel-artifacts` service
"""
- def read(
- self,
- path: builtins.str | os.PathLike | pathlib.Path,
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Upyun | typing.Literal["upyun"],
+ /,
*,
- version: builtins.str | None = None,
- concurrent: builtins.int | None = None,
- chunk: builtins.int | None = None,
- gap: builtins.int | None = None,
- offset: builtins.int | None = None,
- prefetch: builtins.int | None = None,
- size: builtins.int | None = None,
- if_match: builtins.str | None = None,
- if_none_match: builtins.str | None = None,
- if_modified_since: datetime.datetime = None,
- if_unmodified_since: datetime.datetime = None,
- content_type: builtins.str | None = None,
- cache_control: builtins.str | None = None,
- content_disposition: builtins.str | None = None,
- ) -> collections.abc.Awaitable[builtins.bytes]:
+ bucket: builtins.str,
+ root: builtins.str = ...,
+ operator: builtins.str = ...,
+ password: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Read the entire contents of a file at the given path.
+ Create a new `AsyncOperator` for `upyun` service.
Parameters
----------
- path : str
- The path to the file.
- version : str, optional
- The version of the file.
- concurrent : int, optional
- The number of concurrent readers.
- chunk : int, optional
- The size of each chunk.
- gap : int, optional
- The gap between each chunk.
- offset : int, optional
- The offset of the file.
- prefetch : int, optional
- The number of bytes to prefetch.
- size : int, optional
- The size of the file.
- if_match : str, optional
- The ETag of the file.
- if_none_match : str, optional
- The ETag of the file.
- if_modified_since : str, optional
- The last modified time of the file.
- if_unmodified_since : str, optional
- The last modified time of the file.
- content_type : str, optional
- The content type of the file.
- cache_control : str, optional
- The cache control of the file.
- content_disposition : str, optional
- The content disposition of the file.
+ 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.
Returns
-------
- coroutine
- An awaitable that returns the contents of the file as bytes.
+ AsyncOperator
+ The new `AsyncOperator` for `upyun` service
"""
- def write(
- self,
- path: builtins.str | os.PathLike | pathlib.Path,
- bs: builtins.bytes,
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Swift | typing.Literal["swift"],
+ /,
*,
- append: builtins.bool | None = None,
- chunk: builtins.int | None = None,
- concurrent: builtins.int | None = None,
- cache_control: builtins.str | None = None,
- content_type: builtins.str | None = None,
- content_disposition: builtins.str | None = None,
- content_encoding: builtins.str | None = None,
- if_match: builtins.str | None = None,
- if_none_match: builtins.str | None = None,
- if_not_exists: builtins.bool | None = None,
- user_metadata: typing.Mapping[builtins.str, builtins.str] | None = None,
- ) -> collections.abc.Awaitable[None]:
+ endpoint: builtins.str = ...,
+ container: builtins.str = ...,
+ root: builtins.str = ...,
+ token: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Write bytes to a file at the given path.
+ Create a new `AsyncOperator` for `swift` service.
- This function will create a file if it does not exist, and will
- overwrite its contents if it does.
+ Parameters
+ ----------
+ endpoint : builtins.str, optional
+ The endpoint for Swift.
+ container : builtins.str, optional
+ The container for Swift.
+ root : builtins.str, optional
+ The root for Swift.
+ token : builtins.str, optional
+ The token for Swift.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `swift` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Sqlite | typing.Literal["sqlite"],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `sqlite` service.
Parameters
----------
- path : str
- The path to the file.
- bs : bytes
- The contents to write to the file.
- append : bool, optional
- Whether to append to the file instead of overwriting it.
- chunk : int, optional
- The chunk size to use when writing the file.
- concurrent : int, optional
- The number of concurrent requests to make when writing the file.
- cache_control : str, optional
- The cache control header to set on the file.
- content_type : str, optional
- The content type header to set on the file.
- content_disposition : str, optional
- The content disposition header to set on the file.
- content_encoding : str, optional
- The content encoding header to set on the file.
- if_match : str, optional
- The ETag to match when writing the file.
- if_none_match : str, optional
- The ETag to not match when writing the file.
- if_not_exists : bool, optional
- Whether to fail if the file already exists.
- user_metadata : dict, optional
- The user metadata to set on the file.
+ connection_string : builtins.str, optional
+ Set the connection_string of the sqlite service.
+ This connection string is used to connect to the
+ sqlite service.
+ The format of connect string resembles the url
+ format of the sqlite client: - `sqlite::memory:` -
+ `sqlite:data.db` - `sqlite://data.db` For more
+ information, please visit
+ <https://docs.rs/sqlx/latest/sqlx/sqlite/struct.SqliteConnectOptions.html>.
+ 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: "/"
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `sqlite` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Sled | typing.Literal["sled"],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ root: builtins.str = ...,
+ tree: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `sled` service.
+
+ Parameters
+ ----------
+ datadir : builtins.str, optional
+ That path to the sled data directory.
+ root : builtins.str, optional
+ The root for sled.
+ tree : builtins.str, optional
+ The tree for sled.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `sled` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Seafile | typing.Literal["seafile"],
+ /,
+ *,
+ 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
+ ----------
+ 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
+ The new `AsyncOperator` for `seafile` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.S3 | typing.Literal["s3"],
+ /,
+ *,
+ bucket: builtins.str,
+ root: builtins.str = ...,
+ enable_versioning: builtins.bool = ...,
+ endpoint: 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 = ...,
+ 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 = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `s3` service.
+
+ Parameters
+ ----------
+ 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.
+ enable_versioning : builtins.bool, optional
+ is bucket versioning enabled for this bucket
+ endpoint : builtins.str, optional
+ endpoint of this backend.
+ Endpoint must be full uri, e.g.
+ - AWS S3: `https://s3.amazonaws.com` or
+ `https://s3.{region}.amazonaws.com` - Cloudflare R2:
+ `https://<ACCOUNT_ID>.r2.cloudflarestorage.com` -
+ Aliyun OSS: `https://{region}.aliyuncs.com` -
+ Tencent COS: `https://cos.{region}.myqcloud.com` -
+ Minio: `http://127.0.0.1:9000` If user inputs
+ endpoint without scheme like "s3.amazonaws.com", we
+ will prepend "https://" before it.
+ - If endpoint is set, we will take user's input
+ first.
+ - If not, we will try to load it from environment.
+ - If still not set, default to
+ `https://s3.amazonaws.com`.
+ region : builtins.str, optional
+ Region represent the signing region of this
+ endpoint.
+ This is required if you are using the default AWS S3
+ endpoint.
+ If using a custom endpoint, - If region is set, we
+ will take user's input first.
+ - If not, we will try to load it from environment.
+ 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`.
+ 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
+ `aws:kms`, and
+ `server_side_encryption_aws_kms_key_id` is not set,
+ S3 will use aws managed kms key to encrypt data.
+ - If `server_side_encryption` set to `aws:kms`, and
+ `server_side_encryption_aws_kms_key_id` is a valid
+ kms key id, S3 will use the provided kms key to
+ encrypt data.
+ - If the `server_side_encryption_aws_kms_key_id` is
+ invalid or not found, an error will be returned.
+ - If `server_side_encryption` is not `aws:kms`,
+ setting `server_side_encryption_aws_kms_key_id` is a
+ noop.
+ server_side_encryption_customer_algorithm : builtins.str, optional
+ server_side_encryption_customer_algorithm for this
+ backend.
+ Available values: `AES256`.
+ server_side_encryption_customer_key : builtins.str, optional
+ server_side_encryption_customer_key for this
+ backend.
+ Value: BASE64-encoded key that matches algorithm
+ specified in
+ `server_side_encryption_customer_algorithm`.
+ server_side_encryption_customer_key_md5 : builtins.str, optional
+ Set server_side_encryption_customer_key_md5 for this
+ 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.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `s3` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Redis | typing.Literal["redis"],
+ /,
+ *,
+ db: builtins.int,
+ endpoint: builtins.str = ...,
+ cluster_endpoints: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ root: builtins.str = ...,
+ default_ttl: typing.Any = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `redis` service.
+
+ Parameters
+ ----------
+ db : builtins.int
+ the number of DBs redis can take is unlimited
+ default is db 0
+ 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
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `redis` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Redb | typing.Literal["redb"],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ root: builtins.str = ...,
+ table: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `redb` service.
+
+ Parameters
+ ----------
+ datadir : builtins.str, optional
+ path to the redb data directory.
+ root : builtins.str, optional
+ The root for redb.
+ table : builtins.str, optional
+ The table name for redb.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `redb` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Postgresql | typing.Literal["postgresql"],
+ /,
+ *,
+ root: builtins.str = ...,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `postgresql` service.
+
+ 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://`.
+ - `postgresql://user@localhost` -
+ `postgresql://user:password@%2Fvar%2Flib%2Fpostgresql/mydb?connect_timeout=10`
+ -
+ `postgresql://user@host1:1234,host2,host3:5678?target_session_attrs=read-write`
+ -
+ `postgresql:///mydb?user=user&host=/var/lib/postgresql`
+ For more information, please visit
+ <https://docs.rs/sqlx/latest/sqlx/postgres/struct.PgConnectOptions.html>.
+ table : builtins.str, optional
+ the table of postgresql
+ key_field : builtins.str, optional
+ the key field of postgresql
+ value_field : builtins.str, optional
+ the value field of postgresql
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `postgresql` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Persy | typing.Literal["persy"],
+ /,
+ *,
+ datafile: builtins.str = ...,
+ segment: builtins.str = ...,
+ index: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `persy` service.
+
+ Parameters
+ ----------
+ 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.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `persy` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ batch_max_operations: builtins.int = ...,
+ delete_max_size: builtins.int = ...,
+ role_arn: builtins.str = ...,
+ role_session_name: builtins.str = ...,
+ oidc_provider_arn: builtins.str = ...,
+ oidc_token_file: builtins.str = ...,
+ sts_endpoint: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `oss` service.
+
+ 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:
+ [`ALIBABA_CLOUD_ACCESS_KEY_ID`]
+ access_key_secret : builtins.str, optional
+ 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`]
+ batch_max_operations : builtins.int, optional
+ The size of max batch operations.
+ 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.
+ oidc_provider_arn : builtins.str, optional
+ `oidc_provider_arn` will be loaded from - this field
+ if it's `is_some` - env value:
+ [`ALIBABA_CLOUD_OIDC_PROVIDER_ARN`]
+ oidc_token_file : builtins.str, optional
+ `oidc_token_file` will be loaded from - this field
+ if it's `is_some` - env value:
+ [`ALIBABA_CLOUD_OIDC_TOKEN_FILE`]
+ sts_endpoint : builtins.str, optional
+ `sts_endpoint` will be loaded from - this field if
+ it's `is_some` - env value:
+ [`ALIBABA_CLOUD_STS_ENDPOINT`]
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `oss` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ ) -> 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
+ client_secret : builtins.str, optional
+ Microsoft Graph API Application client secret that
+ is in the Azure's app registration portal
+ enable_versioning : builtins.bool, optional
+ Enabling version support
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `onedrive` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ ) -> 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
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `obs` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Mysql | typing.Literal["mysql"],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `mysql` service.
+
+ Parameters
+ ----------
+ connection_string : builtins.str, optional
+ This connection string is used to connect to the
+ mysql service.
+ There are url based formats.
+ The format of connect string resembles the url
+ format of the mysql client.
+ The format is:
+ `[scheme://][user[:[password]]@]host[:port][/schema][?attribute1=value1&attribute2=value2...`
+ - `mysql://user@localhost` -
+ `mysql://user:password@localhost` -
+ `mysql://user:password@localhost:3306` -
+ `mysql://user:password@localhost:3306/db` For more
+ information, please refer to
+ <https://docs.rs/sqlx/latest/sqlx/mysql/struct.MySqlConnectOptions.html>.
+ 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.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `mysql` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Mongodb | typing.Literal["mongodb"],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ database: builtins.str = ...,
+ collection: builtins.str = ...,
+ root: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `mongodb` service.
+
+ Parameters
+ ----------
+ 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
+ value_field : builtins.str, optional
+ value field of this backend
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `mongodb` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ root: 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)
+ 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
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `moka` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.MiniMoka | typing.Literal["mini-moka"],
+ /,
+ *,
+ max_capacity: builtins.int = ...,
+ time_to_live: builtins.str = ...,
+ time_to_idle: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `mini-moka` service.
+
+ Parameters
+ ----------
+ max_capacity : builtins.int, optional
+ 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)
+ 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
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `mini-moka` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Memory | typing.Literal["memory"],
+ /,
+ *,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `memory` service.
+
+ Parameters
+ ----------
+ root : builtins.str, optional
+ root of the backend.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `memory` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Memcached | typing.Literal["memcached"],
+ /,
+ *,
+ endpoint: 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
+ ----------
+ endpoint : builtins.str, optional
+ network address of the memcached service.
+ For example: "tcp://localhost:11211"
+ 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
+ The new `AsyncOperator` for `memcached` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Koofr | typing.Literal["koofr"],
+ /,
+ *,
+ endpoint: builtins.str,
+ email: builtins.str,
+ root: builtins.str = ...,
+ password: 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.
+ password : builtins.str, optional
+ password of this backend.
+ (Must be the application password)
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `koofr` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Ipmfs | typing.Literal["ipmfs"],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: 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.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `ipmfs` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Ipfs | typing.Literal["ipfs"],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `ipfs` service.
+
+ Parameters
+ ----------
+ endpoint : builtins.str, optional
+ IPFS gateway endpoint.
+ root : builtins.str, optional
+ IPFS root.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `ipfs` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Huggingface | typing.Literal["huggingface"],
+ /,
+ *,
+ repo_type: builtins.str = ...,
+ repo_id: builtins.str = ...,
+ revision: builtins.str = ...,
+ root: builtins.str = ...,
+ token: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `huggingface` service.
+
+ Parameters
+ ----------
+ 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.
+ root : builtins.str, optional
+ Root of this backend.
+ Can be "/path/to/dir".
+ Default is "/".
+ token : builtins.str, optional
+ Token of this backend.
+ This is optional.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `huggingface` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Http | typing.Literal["http"],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ token: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `http` service.
+
+ Parameters
+ ----------
+ 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
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `http` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.HdfsNative | typing.Literal["hdfs-native"],
+ /,
+ *,
+ root: builtins.str = ...,
+ name_node: builtins.str = ...,
+ enable_append: builtins.bool = ...,
+ ) -> 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
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `hdfs-native` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Gridfs | typing.Literal["gridfs"],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ database: builtins.str = ...,
+ bucket: builtins.str = ...,
+ chunk_size: builtins.int = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `gridfs` service.
+
+ 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.
+ root : builtins.str, optional
+ The working directory, all operations will be
+ performed under it.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `gridfs` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Ghac | typing.Literal["ghac"],
+ /,
+ *,
+ root: builtins.str = ...,
+ version: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ runtime_token: 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.
+ runtime_token : builtins.str, optional
+ The runtime token for ghac service.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `ghac` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ ) -> 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.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `gdrive` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Gcs | typing.Literal["gcs"],
+ /,
+ *,
+ 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 = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `gcs` 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.
+ allow_anonymous : builtins.bool, optional
+ Allow opendal to send requests without signing when
+ credentials are not loaded.
+ 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.
+ token : builtins.str, optional
+ A Google Cloud OAuth2 token.
+ Takes precedence over `credential` and
+ `credential_path`.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `gcs` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Fs | typing.Literal["fs"],
+ /,
+ *,
+ root: builtins.str = ...,
+ atomic_write_dir: 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
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `fs` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ ) -> 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
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `dropbox` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Dashmap | typing.Literal["dashmap"],
+ /,
+ *,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `dashmap` service.
+
+ Parameters
+ ----------
+ root : builtins.str, optional
+ root path of this backend
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `dashmap` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Cos | typing.Literal["cos"],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: 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.
+ endpoint : builtins.str, optional
+ Endpoint 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
+ The new `AsyncOperator` for `cos` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Cacache | typing.Literal["cacache"],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `cacache` service.
+
+ Parameters
+ ----------
+ datadir : builtins.str, optional
+ That path to the cacache data directory.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `cacache` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.B2 | typing.Literal["b2"],
+ /,
+ *,
+ 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
+ ----------
+ bucket : builtins.str
+ bucket of this backend.
+ required.
+ bucket_id : builtins.str
+ bucket id of this backend.
+ required.
+ 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
+ The new `AsyncOperator` for `b2` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ sas_token: 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.
+ sas_token : builtins.str, optional
+ The sas token for azfile.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `azfile` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ client_id: builtins.str = ...,
+ sas_token: builtins.str = ...,
+ authority_host: 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
+ 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
+ client_id : builtins.str, optional
+ client_id The client id of the service principal.
+ - required for client_credentials authentication
+ 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`
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `azdls` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ encryption_key: builtins.str = ...,
+ encryption_key_sha256: builtins.str = ...,
+ encryption_algorithm: builtins.str = ...,
+ sas_token: builtins.str = ...,
+ batch_max_operations: builtins.int = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `azblob` service.
+
+ Parameters
+ ----------
+ 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.
+ 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.
+ 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
+ The new `AsyncOperator` for `azblob` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Alluxio | typing.Literal["alluxio"],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: 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`.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `alluxio` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ refresh_token: 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.
+ #4733 Required if no client_id, client_secret and
+ refresh_token are provided.
+ client_id : builtins.str, optional
+ The client_id of this backend.
+ Required if no access_token is provided.
+ client_secret : builtins.str, optional
+ The client_secret of this backend.
+ Required if no access_token is provided.
+ refresh_token : builtins.str, optional
+ The refresh_token of this backend.
+ Required if no access_token is provided.
+
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `aliyun-drive` service
+ """
+ def layer(self, layer: Layer) -> AsyncOperator:
+ r"""
+ Add a new layer to the operator.
+
+ Parameters
+ ----------
+ layer : Layer
+ The layer to add.
+
+ Returns
+ -------
+ AsyncOperator
+ A new operator with the layer added.
+ """
+ def open(
+ self,
+ path: builtins.str | os.PathLike | pathlib.Path,
+ mode: builtins.str,
+ **kwargs: typing.Any,
+ ) -> collections.abc.Awaitable[opendal.file.AsyncFile]:
+ r"""
+ Open an async file-like object for the given path.
+
+ The returning async file-like object is a context manager.
+
+ Parameters
+ ----------
+ path : str
+ The path to the file.
+ mode : str
+ The mode to open the file in. Only "rb" and "wb" are supported.
+ **kwargs : dict
+ Additional options for the underlying reader or writer.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that returns a file-like object.
+ """
+ def read(
+ self,
+ path: builtins.str | os.PathLike | pathlib.Path,
+ *,
+ version: builtins.str | None = None,
+ concurrent: builtins.int | None = None,
+ chunk: builtins.int | None = None,
+ gap: builtins.int | None = None,
+ offset: builtins.int | None = None,
+ prefetch: builtins.int | None = None,
+ size: builtins.int | None = None,
+ if_match: builtins.str | None = None,
+ if_none_match: builtins.str | None = None,
+ if_modified_since: datetime.datetime = None,
+ if_unmodified_since: datetime.datetime = None,
+ content_type: builtins.str | None = None,
+ cache_control: builtins.str | None = None,
+ content_disposition: builtins.str | None = None,
+ ) -> collections.abc.Awaitable[builtins.bytes]:
+ r"""
+ Read the entire contents of a file at the given path.
+
+ Parameters
+ ----------
+ path : str
+ The path to the file.
+ version : str, optional
+ The version of the file.
+ concurrent : int, optional
+ The number of concurrent readers.
+ chunk : int, optional
+ The size of each chunk.
+ gap : int, optional
+ The gap between each chunk.
+ offset : int, optional
+ The offset of the file.
+ prefetch : int, optional
+ The number of bytes to prefetch.
+ size : int, optional
+ The size of the file.
+ if_match : str, optional
+ The ETag of the file.
+ if_none_match : str, optional
+ The ETag of the file.
+ if_modified_since : str, optional
+ The last modified time of the file.
+ if_unmodified_since : str, optional
+ The last modified time of the file.
+ content_type : str, optional
+ The content type of the file.
+ cache_control : str, optional
+ The cache control of the file.
+ content_disposition : str, optional
+ The content disposition of the file.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that returns the contents of the file as bytes.
+ """
+ def write(
+ self,
+ path: builtins.str | os.PathLike | pathlib.Path,
+ bs: builtins.bytes,
+ *,
+ append: builtins.bool | None = None,
+ chunk: builtins.int | None = None,
+ concurrent: builtins.int | None = None,
+ cache_control: builtins.str | None = None,
+ content_type: builtins.str | None = None,
+ content_disposition: builtins.str | None = None,
+ content_encoding: builtins.str | None = None,
+ if_match: builtins.str | None = None,
+ if_none_match: builtins.str | None = None,
+ if_not_exists: builtins.bool | None = None,
+ user_metadata: typing.Mapping[builtins.str, builtins.str] | None = None,
+ ) -> collections.abc.Awaitable[None]:
+ r"""
+ Write bytes to a file at the given path.
+
+ This function will create a file if it does not exist, and will
+ overwrite its contents if it does.
+
+ Parameters
+ ----------
+ path : str
+ The path to the file.
+ bs : bytes
+ The contents to write to the file.
+ append : bool, optional
+ Whether to append to the file instead of overwriting it.
+ chunk : int, optional
+ The chunk size to use when writing the file.
+ concurrent : int, optional
+ The number of concurrent requests to make when writing the file.
+ cache_control : str, optional
+ The cache control header to set on the file.
+ content_type : str, optional
+ The content type header to set on the file.
+ content_disposition : str, optional
+ The content disposition header to set on the file.
+ content_encoding : str, optional
+ The content encoding header to set on the file.
+ if_match : str, optional
+ The ETag to match when writing the file.
+ if_none_match : str, optional
+ The ETag to not match when writing the file.
+ if_not_exists : bool, optional
+ Whether to fail if the file already exists.
+ user_metadata : dict, optional
+ The user metadata to set on the file.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that completes when the write is finished.
+ """
+ def stat(
+ self,
+ path: builtins.str | os.PathLike | pathlib.Path,
+ *,
+ version: builtins.str | None = None,
+ if_match: builtins.str | None = None,
+ if_none_match: builtins.str | None = None,
+ if_modified_since: datetime.datetime = None,
+ if_unmodified_since: datetime.datetime = None,
+ content_type: builtins.str | None = None,
+ cache_control: builtins.str | None = None,
+ content_disposition: builtins.str | None = None,
+ ) -> collections.abc.Awaitable[Metadata]:
+ r"""
+ Get the metadata of a file at the given path.
+
+ Parameters
+ ----------
+ path : str
+ The path to the file.
+ version : str, optional
+ The version of the file.
+ if_match : str, optional
+ The ETag of the file.
+ if_none_match : str, optional
+ The ETag of the file.
+ if_modified_since : datetime, optional
+ The last modified time of the file.
+ if_unmodified_since : datetime, optional
+ The last modified time of the file.
+ content_type : str, optional
+ The content type of the file.
+ cache_control : str, optional
+ The cache control of the file.
+ content_disposition : str, optional
+ The content disposition of the file.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that returns the metadata of the file.
+ """
+ def copy(
+ self,
+ source: builtins.str | os.PathLike | pathlib.Path,
+ target: builtins.str | os.PathLike | pathlib.Path,
+ ) -> collections.abc.Awaitable[None]:
+ r"""
+ Copy a file from one path to another.
+
+ Parameters
+ ----------
+ source : str
+ The path to the source file.
+ target : str
+ The path to the target file.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that completes when the copy is finished.
+ """
+ def rename(
+ self,
+ source: builtins.str | os.PathLike | pathlib.Path,
+ target: builtins.str | os.PathLike | pathlib.Path,
+ ) -> collections.abc.Awaitable[None]:
+ r"""
+ Rename (move) a file from one path to another.
+
+ Parameters
+ ----------
+ source : str
+ The path to the source file.
+ target : str
+ The path to the target file.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that completes when the rename is finished.
+ """
+ def remove_all(
+ self, path: builtins.str | os.PathLike | pathlib.Path
+ ) -> collections.abc.Awaitable[None]:
+ r"""
+ Recursively remove all files and directories at the given path.
+
+ Parameters
+ ----------
+ path : str
+ The path to remove.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that completes when the removal is finished.
+ """
+ def check(self) -> collections.abc.Awaitable[None]:
+ r"""
+ Check if the operator is able to work correctly.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that completes when the check is finished.
+
+ Raises
+ ------
+ Exception
+ If the operator is not able to work correctly.
+ """
+ def create_dir(
+ self, path: builtins.str | os.PathLike | pathlib.Path
+ ) -> collections.abc.Awaitable[None]:
+ r"""
+ Create a directory at the given path.
+
+ Notes
+ -----
+ To indicate that a path is a directory, it must end with a `/`.
+ This operation is always recursive, like `mkdir -p`.
+
+ Parameters
+ ----------
+ path : str
+ The path to the directory.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that completes when the directory is created.
+ """
+ def delete(
+ self, path: builtins.str | os.PathLike | pathlib.Path
+ ) -> collections.abc.Awaitable[None]:
+ r"""
+ Delete a file at the given path.
+
+ Notes
+ -----
+ This operation will not return an error if the path does not exist.
+
+ Parameters
+ ----------
+ path : str
+ The path to the file.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that completes when the file is deleted.
+ """
+ def exists(
+ self, path: builtins.str | os.PathLike | pathlib.Path
+ ) -> collections.abc.Awaitable[builtins.bool]:
+ r"""
+ Check if a path exists.
+
+ Parameters
+ ----------
+ path : str
+ The path to check.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that returns True if the path exists, False otherwise.
+ """
+ def list(
+ self,
+ path: builtins.str | os.PathLike | pathlib.Path,
+ *,
+ limit: builtins.int | None = None,
+ start_after: builtins.str | None = None,
+ recursive: builtins.bool | None = None,
+ versions: builtins.bool | None = None,
+ deleted: builtins.bool | None = None,
+ ) -> collections.abc.AsyncIterable[opendal.types.Entry]:
+ r"""
+ List entries in the given directory.
+
+ Parameters
+ ----------
+ path : str
+ The path to the directory.
+ limit : int, optional
+ The maximum number of entries to return.
+ start_after : str, optional
+ The entry to start after.
+ recursive : bool, optional
+ Whether to list recursively.
+ versions : bool, optional
+ Whether to list versions.
+ deleted : bool, optional
+ Whether to list deleted entries.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that returns an async iterator over the entries.
+ """
+ def presign_stat(
+ self,
+ path: builtins.str | os.PathLike | pathlib.Path,
+ expire_second: builtins.int,
+ ) -> opendal.types.PresignedRequest:
+ r"""
+ Create a presigned request for a stat operation.
+
+ Parameters
+ ----------
+ path : str
+ The path of the object to stat.
+ expire_second : int
+ The number of seconds until the presigned URL expires.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that returns a presigned request object.
+ """
+ def presign_read(
+ self,
+ path: builtins.str | os.PathLike | pathlib.Path,
+ expire_second: builtins.int,
+ ) -> opendal.types.PresignedRequest:
+ r"""
+ Create a presigned request for a read operation.
+
+ Parameters
+ ----------
+ path : str
+ The path of the object to read.
+ expire_second : int
+ The number of seconds until the presigned URL expires.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that returns a presigned request object.
+ """
+ def presign_write(
+ self,
+ path: builtins.str | os.PathLike | pathlib.Path,
+ expire_second: builtins.int,
+ ) -> opendal.types.PresignedRequest:
+ r"""
+ Create a presigned request for a write operation.
+
+ Parameters
+ ----------
+ path : str
+ The path of the object to write to.
+ expire_second : int
+ The number of seconds until the presigned URL expires.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that returns a presigned request object.
+ """
+ def presign_delete(
+ self,
+ path: builtins.str | os.PathLike | pathlib.Path,
+ expire_second: builtins.int,
+ ) -> opendal.types.PresignedRequest:
+ r"""
+ Create a presigned request for a delete operation.
+
+ Parameters
+ ----------
+ path : str
+ The path of the object to delete.
+ expire_second : int
+ The number of seconds until the presigned URL expires.
+
+ Returns
+ -------
+ coroutine
+ An awaitable that returns a presigned request object.
+ """
+ def capability(self) -> Capability:
+ r"""
+ Get all capabilities of this operator.
+
+ Returns
+ -------
+ Capability
+ The capability of the operator.
+ """
+ def to_operator(self) -> Operator:
+ r"""
+ Create a new blocking `Operator` from this async operator.
+
+ Returns
+ -------
+ Operator
+ The blocking operator.
+ """
+
+@typing.final
+class Operator:
+ r"""
+ The blocking equivalent of `AsyncOperator`.
+
+ `Operator` is the entry point for all blocking APIs.
+
+ See Also
+ --------
+ AsyncOperator
+ """
+
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.YandexDisk | typing.Literal["yandex-disk"],
+ /,
+ *,
+ access_token: builtins.str,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `yandex-disk` service.
+
+ Parameters
+ ----------
+ access_token : builtins.str
+ yandex disk oauth access_token.
+ root : builtins.str, optional
+ root of this backend.
+ All operations will happen under this root.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `yandex-disk` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Webhdfs | typing.Literal["webhdfs"],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ user_name: builtins.str = ...,
+ delegation: builtins.str = ...,
+ disable_list_batch: builtins.bool = ...,
+ atomic_write_dir: 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.
+ 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
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `webhdfs` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Webdav | typing.Literal["webdav"],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ token: builtins.str = ...,
+ root: builtins.str = ...,
+ disable_copy: builtins.bool = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `webdav` service.
+
+ Parameters
+ ----------
+ 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.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `webdav` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.VercelArtifacts
+ | typing.Literal["vercel-artifacts"],
+ /,
+ *,
+ access_token: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `vercel-artifacts` service.
+
+ Parameters
+ ----------
+ access_token : builtins.str, optional
+ The access token for Vercel.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `vercel-artifacts` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Upyun | typing.Literal["upyun"],
+ /,
+ *,
+ bucket: builtins.str,
+ root: builtins.str = ...,
+ operator: builtins.str = ...,
+ password: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `upyun` service.
+
+ Parameters
+ ----------
+ 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.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `upyun` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Swift | typing.Literal["swift"],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ container: builtins.str = ...,
+ root: builtins.str = ...,
+ token: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `swift` service.
+
+ Parameters
+ ----------
+ endpoint : builtins.str, optional
+ The endpoint for Swift.
+ container : builtins.str, optional
+ The container for Swift.
+ root : builtins.str, optional
+ The root for Swift.
+ token : builtins.str, optional
+ The token for Swift.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `swift` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Sqlite | typing.Literal["sqlite"],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `sqlite` service.
+
+ Parameters
+ ----------
+ connection_string : builtins.str, optional
+ Set the connection_string of the sqlite service.
+ This connection string is used to connect to the
+ sqlite service.
+ The format of connect string resembles the url
+ format of the sqlite client: - `sqlite::memory:` -
+ `sqlite:data.db` - `sqlite://data.db` For more
+ information, please visit
+ <https://docs.rs/sqlx/latest/sqlx/sqlite/struct.SqliteConnectOptions.html>.
+ 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: "/"
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `sqlite` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Sled | typing.Literal["sled"],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ root: builtins.str = ...,
+ tree: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `sled` service.
+
+ Parameters
+ ----------
+ datadir : builtins.str, optional
+ That path to the sled data directory.
+ root : builtins.str, optional
+ The root for sled.
+ tree : builtins.str, optional
+ The tree for sled.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `sled` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Seafile | typing.Literal["seafile"],
+ /,
+ *,
+ 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
+ ----------
+ 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
+ The new `Operator` for `seafile` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.S3 | typing.Literal["s3"],
+ /,
+ *,
+ bucket: builtins.str,
+ root: builtins.str = ...,
+ enable_versioning: builtins.bool = ...,
+ endpoint: 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 = ...,
+ 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 = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `s3` service.
+
+ Parameters
+ ----------
+ 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.
+ enable_versioning : builtins.bool, optional
+ is bucket versioning enabled for this bucket
+ endpoint : builtins.str, optional
+ endpoint of this backend.
+ Endpoint must be full uri, e.g.
+ - AWS S3: `https://s3.amazonaws.com` or
+ `https://s3.{region}.amazonaws.com` - Cloudflare R2:
+ `https://<ACCOUNT_ID>.r2.cloudflarestorage.com` -
+ Aliyun OSS: `https://{region}.aliyuncs.com` -
+ Tencent COS: `https://cos.{region}.myqcloud.com` -
+ Minio: `http://127.0.0.1:9000` If user inputs
+ endpoint without scheme like "s3.amazonaws.com", we
+ will prepend "https://" before it.
+ - If endpoint is set, we will take user's input
+ first.
+ - If not, we will try to load it from environment.
+ - If still not set, default to
+ `https://s3.amazonaws.com`.
+ region : builtins.str, optional
+ Region represent the signing region of this
+ endpoint.
+ This is required if you are using the default AWS S3
+ endpoint.
+ If using a custom endpoint, - If region is set, we
+ will take user's input first.
+ - If not, we will try to load it from environment.
+ 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`.
+ 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
+ `aws:kms`, and
+ `server_side_encryption_aws_kms_key_id` is not set,
+ S3 will use aws managed kms key to encrypt data.
+ - If `server_side_encryption` set to `aws:kms`, and
+ `server_side_encryption_aws_kms_key_id` is a valid
+ kms key id, S3 will use the provided kms key to
+ encrypt data.
+ - If the `server_side_encryption_aws_kms_key_id` is
+ invalid or not found, an error will be returned.
+ - If `server_side_encryption` is not `aws:kms`,
+ setting `server_side_encryption_aws_kms_key_id` is a
+ noop.
+ server_side_encryption_customer_algorithm : builtins.str, optional
+ server_side_encryption_customer_algorithm for this
+ backend.
+ Available values: `AES256`.
+ server_side_encryption_customer_key : builtins.str, optional
+ server_side_encryption_customer_key for this
+ backend.
+ Value: BASE64-encoded key that matches algorithm
+ specified in
+ `server_side_encryption_customer_algorithm`.
+ server_side_encryption_customer_key_md5 : builtins.str, optional
+ Set server_side_encryption_customer_key_md5 for this
+ 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.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `s3` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Redis | typing.Literal["redis"],
+ /,
+ *,
+ db: builtins.int,
+ endpoint: builtins.str = ...,
+ cluster_endpoints: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ root: builtins.str = ...,
+ default_ttl: typing.Any = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `redis` service.
+
+ Parameters
+ ----------
+ db : builtins.int
+ the number of DBs redis can take is unlimited
+ default is db 0
+ 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
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `redis` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Redb | typing.Literal["redb"],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ root: builtins.str = ...,
+ table: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `redb` service.
+
+ Parameters
+ ----------
+ datadir : builtins.str, optional
+ path to the redb data directory.
+ root : builtins.str, optional
+ The root for redb.
+ table : builtins.str, optional
+ The table name for redb.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `redb` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Postgresql | typing.Literal["postgresql"],
+ /,
+ *,
+ root: builtins.str = ...,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `postgresql` service.
+
+ 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://`.
+ - `postgresql://user@localhost` -
+ `postgresql://user:password@%2Fvar%2Flib%2Fpostgresql/mydb?connect_timeout=10`
+ -
+ `postgresql://user@host1:1234,host2,host3:5678?target_session_attrs=read-write`
+ -
+ `postgresql:///mydb?user=user&host=/var/lib/postgresql`
+ For more information, please visit
+ <https://docs.rs/sqlx/latest/sqlx/postgres/struct.PgConnectOptions.html>.
+ table : builtins.str, optional
+ the table of postgresql
+ key_field : builtins.str, optional
+ the key field of postgresql
+ value_field : builtins.str, optional
+ the value field of postgresql
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `postgresql` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Persy | typing.Literal["persy"],
+ /,
+ *,
+ datafile: builtins.str = ...,
+ segment: builtins.str = ...,
+ index: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `persy` service.
+
+ Parameters
+ ----------
+ 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.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `persy` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ batch_max_operations: builtins.int = ...,
+ delete_max_size: builtins.int = ...,
+ role_arn: builtins.str = ...,
+ role_session_name: builtins.str = ...,
+ oidc_provider_arn: builtins.str = ...,
+ oidc_token_file: builtins.str = ...,
+ sts_endpoint: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `oss` service.
+
+ 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:
+ [`ALIBABA_CLOUD_ACCESS_KEY_ID`]
+ access_key_secret : builtins.str, optional
+ 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`]
+ batch_max_operations : builtins.int, optional
+ The size of max batch operations.
+ 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.
+ oidc_provider_arn : builtins.str, optional
+ `oidc_provider_arn` will be loaded from - this field
+ if it's `is_some` - env value:
+ [`ALIBABA_CLOUD_OIDC_PROVIDER_ARN`]
+ oidc_token_file : builtins.str, optional
+ `oidc_token_file` will be loaded from - this field
+ if it's `is_some` - env value:
+ [`ALIBABA_CLOUD_OIDC_TOKEN_FILE`]
+ sts_endpoint : builtins.str, optional
+ `sts_endpoint` will be loaded from - this field if
+ it's `is_some` - env value:
+ [`ALIBABA_CLOUD_STS_ENDPOINT`]
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `oss` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ ) -> 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
+ client_secret : builtins.str, optional
+ Microsoft Graph API Application client secret that
+ is in the Azure's app registration portal
+ enable_versioning : builtins.bool, optional
+ Enabling version support
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `onedrive` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ ) -> 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
+ -------
+ Operator
+ The new `Operator` for `obs` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Mysql | typing.Literal["mysql"],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `mysql` service.
+
+ Parameters
+ ----------
+ connection_string : builtins.str, optional
+ This connection string is used to connect to the
+ mysql service.
+ There are url based formats.
+ The format of connect string resembles the url
+ format of the mysql client.
+ The format is:
+ `[scheme://][user[:[password]]@]host[:port][/schema][?attribute1=value1&attribute2=value2...`
+ - `mysql://user@localhost` -
+ `mysql://user:password@localhost` -
+ `mysql://user:password@localhost:3306` -
+ `mysql://user:password@localhost:3306/db` For more
+ information, please refer to
+ <https://docs.rs/sqlx/latest/sqlx/mysql/struct.MySqlConnectOptions.html>.
+ 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.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `mysql` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Mongodb | typing.Literal["mongodb"],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ database: builtins.str = ...,
+ collection: builtins.str = ...,
+ root: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `mongodb` service.
+
+ Parameters
+ ----------
+ 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
+ value_field : builtins.str, optional
+ value field of this backend
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `mongodb` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ root: 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)
+ 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
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `moka` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.MiniMoka | typing.Literal["mini-moka"],
+ /,
+ *,
+ max_capacity: builtins.int = ...,
+ time_to_live: builtins.str = ...,
+ time_to_idle: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `mini-moka` service.
+
+ Parameters
+ ----------
+ max_capacity : builtins.int, optional
+ 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)
+ 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
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `mini-moka` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Memory | typing.Literal["memory"],
+ /,
+ *,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `memory` service.
+
+ Parameters
+ ----------
+ root : builtins.str, optional
+ root of the backend.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `memory` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Memcached | typing.Literal["memcached"],
+ /,
+ *,
+ endpoint: 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
+ ----------
+ endpoint : builtins.str, optional
+ network address of the memcached service.
+ For example: "tcp://localhost:11211"
+ 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
+ The new `Operator` for `memcached` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Koofr | typing.Literal["koofr"],
+ /,
+ *,
+ endpoint: builtins.str,
+ email: builtins.str,
+ root: builtins.str = ...,
+ password: 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.
+ password : builtins.str, optional
+ password of this backend.
+ (Must be the application password)
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `koofr` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Ipmfs | typing.Literal["ipmfs"],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: 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.
+
+ Returns
+ -------
+ Operator
+ The new `Operator` for `ipmfs` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Ipfs | typing.Literal["ipfs"],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `ipfs` service.
+
+ Parameters
+ ----------
+ endpoint : builtins.str, optional
+ IPFS gateway endpoint.
+ root : builtins.str, optional
+ IPFS root.
Returns
-------
- coroutine
- An awaitable that completes when the write is finished.
+ Operator
+ The new `Operator` for `ipfs` service
"""
- def stat(
- self,
- path: builtins.str | os.PathLike | pathlib.Path,
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Huggingface | typing.Literal["huggingface"],
+ /,
*,
- version: builtins.str | None = None,
- if_match: builtins.str | None = None,
- if_none_match: builtins.str | None = None,
- if_modified_since: datetime.datetime = None,
- if_unmodified_since: datetime.datetime = None,
- content_type: builtins.str | None = None,
- cache_control: builtins.str | None = None,
- content_disposition: builtins.str | None = None,
- ) -> collections.abc.Awaitable[Metadata]:
+ repo_type: builtins.str = ...,
+ repo_id: builtins.str = ...,
+ revision: builtins.str = ...,
+ root: builtins.str = ...,
+ token: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Get the metadata of a file at the given path.
+ Create a new `Operator` for `huggingface` service.
Parameters
----------
- path : str
- The path to the file.
- version : str, optional
- The version of the file.
- if_match : str, optional
- The ETag of the file.
- if_none_match : str, optional
- The ETag of the file.
- if_modified_since : datetime, optional
- The last modified time of the file.
- if_unmodified_since : datetime, optional
- The last modified time of the file.
- content_type : str, optional
- The content type of the file.
- cache_control : str, optional
- The cache control of the file.
- content_disposition : str, optional
- The content disposition of the file.
+ 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.
+ root : builtins.str, optional
+ Root of this backend.
+ Can be "/path/to/dir".
+ Default is "/".
+ token : builtins.str, optional
+ Token of this backend.
+ This is optional.
Returns
-------
- coroutine
- An awaitable that returns the metadata of the file.
+ Operator
+ The new `Operator` for `huggingface` service
"""
- def copy(
- self,
- source: builtins.str | os.PathLike | pathlib.Path,
- target: builtins.str | os.PathLike | pathlib.Path,
- ) -> collections.abc.Awaitable[None]:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Http | typing.Literal["http"],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ token: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Copy a file from one path to another.
+ Create a new `Operator` for `http` service.
Parameters
----------
- source : str
- The path to the source file.
- target : str
- The path to the target file.
+ 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
Returns
-------
- coroutine
- An awaitable that completes when the copy is finished.
+ Operator
+ The new `Operator` for `http` service
"""
- def rename(
- self,
- source: builtins.str | os.PathLike | pathlib.Path,
- target: builtins.str | os.PathLike | pathlib.Path,
- ) -> collections.abc.Awaitable[None]:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.HdfsNative | typing.Literal["hdfs-native"],
+ /,
+ *,
+ root: builtins.str = ...,
+ name_node: builtins.str = ...,
+ enable_append: builtins.bool = ...,
+ ) -> typing_extensions.Self:
r"""
- Rename (move) a file from one path to another.
+ Create a new `Operator` for `hdfs-native` service.
Parameters
----------
- source : str
- The path to the source file.
- target : str
- The path to the target file.
+ 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
Returns
-------
- coroutine
- An awaitable that completes when the rename is finished.
+ Operator
+ The new `Operator` for `hdfs-native` service
"""
- def remove_all(
- self, path: builtins.str | os.PathLike | pathlib.Path
- ) -> collections.abc.Awaitable[None]:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Gridfs | typing.Literal["gridfs"],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ database: builtins.str = ...,
+ bucket: builtins.str = ...,
+ chunk_size: builtins.int = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Recursively remove all files and directories at the given path.
+ Create a new `Operator` for `gridfs` service.
Parameters
----------
- path : str
- The path to remove.
+ 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.
+ root : builtins.str, optional
+ The working directory, all operations will be
+ performed under it.
Returns
-------
- coroutine
- An awaitable that completes when the removal is finished.
+ Operator
+ The new `Operator` for `gridfs` service
"""
- def check(self) -> collections.abc.Awaitable[None]:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Ghac | typing.Literal["ghac"],
+ /,
+ *,
+ root: builtins.str = ...,
+ version: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ runtime_token: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Check if the operator is able to work correctly.
+ 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.
+ runtime_token : builtins.str, optional
+ The runtime token for ghac service.
Returns
-------
- coroutine
- An awaitable that completes when the check is finished.
-
- Raises
- ------
- Exception
- If the operator is not able to work correctly.
+ Operator
+ The new `Operator` for `ghac` service
"""
- def create_dir(
- self, path: builtins.str | os.PathLike | pathlib.Path
- ) -> collections.abc.Awaitable[None]:
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ ) -> typing_extensions.Self:
r"""
- Create a directory at the given path.
-
- Notes
- -----
- To indicate that a path is a directory, it must end with a `/`.
- This operation is always recursive, like `mkdir -p`.
+ Create a new `Operator` for `gdrive` service.
Parameters
----------
- path : str
- The path to the directory.
+ 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.
Returns
-------
- coroutine
- An awaitable that completes when the directory is created.
+ Operator
+ The new `Operator` for `gdrive` service
"""
- def delete(
- self, path: builtins.str | os.PathLike | pathlib.Path
- ) -> collections.abc.Awaitable[None]:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Gcs | typing.Literal["gcs"],
+ /,
+ *,
+ 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 = ...,
+ ) -> typing_extensions.Self:
r"""
- Delete a file at the given path.
-
- Notes
- -----
- This operation will not return an error if the path does not exist.
+ Create a new `Operator` for `gcs` service.
Parameters
----------
- path : str
- The path to the file.
+ 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_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.
+ token : builtins.str, optional
+ A Google Cloud OAuth2 token.
+ Takes precedence over `credential` and
+ `credential_path`.
Returns
-------
- coroutine
- An awaitable that completes when the file is deleted.
+ Operator
+ The new `Operator` for `gcs` service
"""
- def exists(
- self, path: builtins.str | os.PathLike | pathlib.Path
- ) -> collections.abc.Awaitable[builtins.bool]:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Fs | typing.Literal["fs"],
+ /,
+ *,
+ root: builtins.str = ...,
+ atomic_write_dir: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Check if a path exists.
+ Create a new `Operator` for `fs` service.
Parameters
----------
- path : str
- The path to check.
+ root : builtins.str, optional
+ root dir for backend
+ atomic_write_dir : builtins.str, optional
+ tmp dir for atomic write
Returns
-------
- coroutine
- An awaitable that returns True if the path exists, False otherwise.
+ Operator
+ The new `Operator` for `fs` service
"""
- def list(
- self,
- path: builtins.str | os.PathLike | pathlib.Path,
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Dropbox | typing.Literal["dropbox"],
+ /,
*,
- limit: builtins.int | None = None,
- start_after: builtins.str | None = None,
- recursive: builtins.bool | None = None,
- versions: builtins.bool | None = None,
- deleted: builtins.bool | None = None,
- ) -> collections.abc.AsyncIterable[opendal.types.Entry]:
+ root: builtins.str = ...,
+ access_token: builtins.str = ...,
+ refresh_token: builtins.str = ...,
+ client_id: builtins.str = ...,
+ client_secret: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- List entries in the given directory.
+ Create a new `Operator` for `dropbox` service.
Parameters
----------
- path : str
- The path to the directory.
- limit : int, optional
- The maximum number of entries to return.
- start_after : str, optional
- The entry to start after.
- recursive : bool, optional
- Whether to list recursively.
- versions : bool, optional
- Whether to list versions.
- deleted : bool, optional
- Whether to list deleted entries.
+ 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
-------
- coroutine
- An awaitable that returns an async iterator over the entries.
+ Operator
+ The new `Operator` for `dropbox` service
"""
- def presign_stat(
- self,
- path: builtins.str | os.PathLike | pathlib.Path,
- expire_second: builtins.int,
- ) -> opendal.types.PresignedRequest:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Dashmap | typing.Literal["dashmap"],
+ /,
+ *,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Create a presigned request for a stat operation.
+ Create a new `Operator` for `dashmap` service.
Parameters
----------
- path : str
- The path of the object to stat.
- expire_second : int
- The number of seconds until the presigned URL expires.
+ root : builtins.str, optional
+ root path of this backend
Returns
-------
- coroutine
- An awaitable that returns a presigned request object.
+ Operator
+ The new `Operator` for `dashmap` service
"""
- def presign_read(
- self,
- path: builtins.str | os.PathLike | pathlib.Path,
- expire_second: builtins.int,
- ) -> opendal.types.PresignedRequest:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Cos | typing.Literal["cos"],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: 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 presigned request for a read operation.
+ Create a new `Operator` for `cos` service.
Parameters
----------
- path : str
- The path of the object to read.
- expire_second : int
- The number of seconds until the presigned URL expires.
+ root : builtins.str, optional
+ Root of this backend.
+ endpoint : builtins.str, optional
+ Endpoint 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
-------
- coroutine
- An awaitable that returns a presigned request object.
+ Operator
+ The new `Operator` for `cos` service
"""
- def presign_write(
- self,
- path: builtins.str | os.PathLike | pathlib.Path,
- expire_second: builtins.int,
- ) -> opendal.types.PresignedRequest:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Cacache | typing.Literal["cacache"],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Create a presigned request for a write operation.
+ Create a new `Operator` for `cacache` service.
Parameters
----------
- path : str
- The path of the object to write to.
- expire_second : int
- The number of seconds until the presigned URL expires.
+ datadir : builtins.str, optional
+ That path to the cacache data directory.
Returns
-------
- coroutine
- An awaitable that returns a presigned request object.
+ Operator
+ The new `Operator` for `cacache` service
"""
- def presign_delete(
- self,
- path: builtins.str | os.PathLike | pathlib.Path,
- expire_second: builtins.int,
- ) -> opendal.types.PresignedRequest:
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.B2 | typing.Literal["b2"],
+ /,
+ *,
+ 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 presigned request for a delete operation.
+ Create a new `Operator` for `b2` service.
Parameters
----------
- path : str
- The path of the object to delete.
- expire_second : int
- The number of seconds until the presigned URL expires.
+ bucket : builtins.str
+ bucket of this backend.
+ required.
+ bucket_id : builtins.str
+ bucket id of this backend.
+ required.
+ 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
-------
- coroutine
- An awaitable that returns a presigned request object.
+ Operator
+ The new `Operator` for `b2` service
"""
- def capability(self) -> Capability:
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ sas_token: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Get all capabilities of this operator.
+ 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.
+ sas_token : builtins.str, optional
+ The sas token for azfile.
Returns
-------
- Capability
- The capability of the operator.
+ Operator
+ The new `Operator` for `azfile` service
"""
- def to_operator(self) -> Operator:
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ client_id: builtins.str = ...,
+ sas_token: builtins.str = ...,
+ authority_host: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Create a new blocking `Operator` from this async operator.
+ 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
+ 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
+ client_id : builtins.str, optional
+ client_id The client id of the service principal.
+ - required for client_credentials authentication
+ 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`
Returns
-------
Operator
- The blocking operator.
+ The new `Operator` for `azdls` service
"""
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ encryption_key: builtins.str = ...,
+ encryption_key_sha256: builtins.str = ...,
+ encryption_algorithm: builtins.str = ...,
+ sas_token: builtins.str = ...,
+ batch_max_operations: builtins.int = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `azblob` service.
-@typing.final
-class Operator:
- r"""
- The blocking equivalent of `AsyncOperator`.
+ Parameters
+ ----------
+ 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.
+ 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.
+ 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.
- `Operator` is the entry point for all blocking APIs.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `azblob` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ scheme: opendal.services.Scheme.Alluxio | typing.Literal["alluxio"],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `alluxio` service.
- See Also
- --------
- AsyncOperator
- """
+ 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`.
- def __new__(cls, scheme: builtins.str, **kwargs: typing.Any) -> Operator:
+ Returns
+ -------
+ Operator
+ The new `Operator` for `alluxio` service
+ """
+ @typing.overload
+ def __new__(
+ cls,
+ 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 = ...,
+ refresh_token: builtins.str = ...,
+ ) -> typing_extensions.Self:
r"""
- Create a new blocking `Operator`.
+ Create a new `Operator` for `aliyun-drive` service.
Parameters
----------
- scheme : str
- The scheme of the service.
- **kwargs : dict
- The options for the service.
+ 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.
+ #4733 Required if no client_id, client_secret and
+ refresh_token are provided.
+ client_id : builtins.str, optional
+ The client_id of this backend.
+ Required if no access_token is provided.
+ client_secret : builtins.str, optional
+ The client_secret of this backend.
+ Required if no access_token is provided.
+ refresh_token : builtins.str, optional
+ The refresh_token of this backend.
+ Required if no access_token is provided.
Returns
-------
Operator
- The new operator.
+ The new `Operator` for `aliyun-drive` service
"""
def layer(self, layer: Layer) -> Operator:
r"""
diff --git a/bindings/python/python/opendal/services.pyi b/bindings/python/python/opendal/services.pyi
new file mode 100644
index 000000000..edfda5dd3
--- /dev/null
+++ b/bindings/python/python/opendal/services.pyi
@@ -0,0 +1,85 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This file is automatically generated by pyo3_stub_gen
+# ruff: noqa: E501, F401
+r"""
+Services.
+
+>> DO NOT EDIT THIS FILE MANUALLY <<
+
+This file is automatically generated by just recipe with name `stub-gen`
+alongwith the rest of the stubs.
+
+See justfile at path ``../../justfile`` for more details.
+"""
+
+import builtins
+import enum
+import typing
+
+@typing.final
+class Scheme(enum.Enum):
+ AliyunDrive = ...
+ Alluxio = ...
+ Azblob = ...
+ Azdls = ...
+ Azfile = ...
+ B2 = ...
+ Cacache = ...
+ Cos = ...
+ Dashmap = ...
+ Dropbox = ...
+ Fs = ...
+ Gcs = ...
+ Gdrive = ...
+ Ghac = ...
+ Gridfs = ...
+ HdfsNative = ...
+ Http = ...
+ Huggingface = ...
+ Ipfs = ...
+ Ipmfs = ...
+ Koofr = ...
+ Memcached = ...
+ Memory = ...
+ MiniMoka = ...
+ Moka = ...
+ Mongodb = ...
+ Mysql = ...
+ Obs = ...
+ Onedrive = ...
+ Oss = ...
+ Persy = ...
+ Postgresql = ...
+ Redb = ...
+ Redis = ...
+ S3 = ...
+ Seafile = ...
+ Sled = ...
+ Sqlite = ...
+ Swift = ...
+ Upyun = ...
+ VercelArtifacts = ...
+ Webdav = ...
+ Webhdfs = ...
+ YandexDisk = ...
+
+ @property
+ def name(self) -> builtins.str: ...
+ @property
+ def value(self) -> builtins.str: ...
diff --git a/bindings/python/ruff.toml b/bindings/python/ruff.toml
index 82ab34682..76cc69f06 100644
--- a/bindings/python/ruff.toml
+++ b/bindings/python/ruff.toml
@@ -73,6 +73,6 @@ strict = true
known-first-party = ["opendal"]
[lint.per-file-ignores]
-"*.pyi" = ["PYI021", "ANN003", "RUF100", "ANN401"]
+"*.pyi" = ["PYI021", "ANN401", "D418"]
"benchmark/*" = ["D100", "D101", "D103", "ANN201"]
"tests/*" = ["D101", "D100", "D103", "ANN201", "ANN001"]
diff --git a/bindings/python/src/file.rs b/bindings/python/src/file.rs
index 3a5547351..000f44721 100644
--- a/bindings/python/src/file.rs
+++ b/bindings/python/src/file.rs
@@ -694,7 +694,7 @@ impl AsyncFile {
})
}
- #[gen_stub(override_return_type(type_repr="typing.Self", imports=("typing")))]
+ #[gen_stub(override_return_type(type_repr="typing_extensions.Self", imports=("typing_extensions")))]
fn __aenter__<'a>(slf: PyRef<'a, Self>, py: Python<'a>) -> PyResult<Bound<'a, PyAny>> {
let slf = slf.into_py_any(py)?;
future_into_py(py, async move { Ok(slf) })
diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs
index 46c41f430..18143a794 100644
--- a/bindings/python/src/lib.rs
+++ b/bindings/python/src/lib.rs
@@ -38,7 +38,9 @@ mod errors;
pub use errors::*;
mod options;
pub use options::*;
+mod services;
use pyo3_stub_gen::{define_stub_info_gatherer, derive::*};
+pub use services::*;
#[pymodule(gil_used = false)]
fn _opendal(py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
@@ -54,6 +56,9 @@ fn _opendal(py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
// Capability module
add_pymodule!(py, m, "capability", [Capability])?;
+ // Services module
+ add_pymodule!(py, m, "services", [PyScheme])?;
+
// Layers module
add_pymodule!(
py,
diff --git a/bindings/python/src/operator.rs b/bindings/python/src/operator.rs
index 1225c854f..d575a9ab1 100644
--- a/bindings/python/src/operator.rs
+++ b/bindings/python/src/operator.rs
@@ -71,7 +71,7 @@ impl Operator {
///
/// Parameters
/// ----------
- /// scheme : str
+ /// scheme : str | opendal.services.Scheme
/// The scheme of the service.
/// **kwargs : dict
/// The options for the service.
@@ -80,15 +80,28 @@ impl Operator {
/// -------
/// Operator
/// The new operator.
+ #[gen_stub(skip)]
#[new]
#[pyo3(signature = (scheme, *, **kwargs))]
- pub fn new(scheme: &str, kwargs: Option<&Bound<PyDict>>) -> PyResult<Self> {
- let scheme = ocore::Scheme::from_str(scheme)
- .map_err(|err| {
- ocore::Error::new(ocore::ErrorKind::Unexpected, "unsupported scheme")
- .set_source(err)
- })
- .map_err(format_pyerr)?;
+ pub fn new(
+ #[gen_stub(override_type(type_repr = "builtins.str | opendal.services.Scheme", imports=("builtins", "opendal.services")))]
+ scheme: Bound<PyAny>,
+ kwargs: Option<&Bound<PyDict>>,
+ ) -> PyResult<Self> {
+ let scheme = if let Ok(scheme_str) = scheme.extract::<&str>() {
+ ocore::Scheme::from_str(scheme_str)
+ .map_err(|err| {
+ ocore::Error::new(ocore::ErrorKind::Unexpected, "unsupported scheme")
+ .set_source(err)
+ })
+ .map_err(format_pyerr)
+ } else if let Ok(py_scheme) = scheme.extract::<PyScheme>() {
+ Ok(py_scheme.into())
+ } else {
+ Err(Unsupported::new_err(
+ "Invalid type for scheme, expected str or Scheme",
+ ))
+ }?;
let map = kwargs
.map(|v| {
v.extract::<HashMap<String, String>>()
@@ -707,7 +720,7 @@ impl AsyncOperator {
///
/// Parameters
/// ----------
- /// scheme : str
+ /// scheme : str | opendal.services.Scheme
/// The scheme of the service.
/// **kwargs : dict
/// The options for the service.
@@ -716,15 +729,29 @@ impl AsyncOperator {
/// -------
/// AsyncOperator
/// The new async operator.
+ #[gen_stub(skip)]
#[new]
#[pyo3(signature = (scheme, * ,**kwargs))]
- pub fn new(scheme: &str, kwargs: Option<&Bound<PyDict>>) -> PyResult<Self> {
- let scheme = ocore::Scheme::from_str(scheme)
- .map_err(|err| {
- ocore::Error::new(ocore::ErrorKind::Unexpected, "unsupported scheme")
- .set_source(err)
- })
- .map_err(format_pyerr)?;
+ pub fn new(
+ #[gen_stub(override_type(type_repr = "builtins.str | opendal.services.Scheme", imports=("builtins", "opendal.services")))]
+ scheme: Bound<PyAny>,
+ kwargs: Option<&Bound<PyDict>>,
+ ) -> PyResult<Self> {
+ let scheme = if let Ok(scheme_str) = scheme.extract::<&str>() {
+ ocore::Scheme::from_str(scheme_str)
+ .map_err(|err| {
+ ocore::Error::new(ocore::ErrorKind::Unexpected, "unsupported scheme")
+ .set_source(err)
+ })
+ .map_err(format_pyerr)
+ } else if let Ok(py_scheme) = scheme.extract::<PyScheme>() {
+ Ok(py_scheme.into())
+ } else {
+ Err(Unsupported::new_err(
+ "Invalid type for scheme, expected str or Scheme",
+ ))
+ }?;
+
let map = kwargs
.map(|v| {
v.extract::<HashMap<String, String>>()
diff --git a/bindings/python/src/services.rs b/bindings/python/src/services.rs
new file mode 100644
index 000000000..621c2cdfa
--- /dev/null
+++ b/bindings/python/src/services.rs
@@ -0,0 +1,4714 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use crate::*;
+use pyo3_stub_gen::{derive::*, inventory::submit, module_doc};
+
+module_doc!(
+ "opendal.services",
+ r#"
+Services.
+
+>> DO NOT EDIT THIS FILE MANUALLY <<
+
+This file is automatically generated by just recipe with name `stub-gen`
+alongwith the rest of the stubs.
+
+See justfile at path ``../../justfile`` for more details.
+"#
+);
+
+#[gen_stub_pyclass_enum]
+#[pyclass(
+ eq,
+ eq_int,
+ dict,
+ hash,
+ frozen,
+ name = "Scheme",
+ module = "opendal.services"
+)]
+#[pyo3(rename_all = "PascalCase")]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
+pub enum PyScheme {
+ #[cfg(feature = "services-aliyun-drive")]
+ AliyunDrive,
+ #[cfg(feature = "services-alluxio")]
+ Alluxio,
+ #[cfg(feature = "services-azblob")]
+ Azblob,
+ #[cfg(feature = "services-azdls")]
+ Azdls,
+ #[cfg(feature = "services-azfile")]
+ Azfile,
+ #[cfg(feature = "services-b2")]
+ B2,
+ #[cfg(feature = "services-cacache")]
+ Cacache,
+ #[cfg(feature = "services-cos")]
+ Cos,
+ #[cfg(feature = "services-dashmap")]
+ Dashmap,
+ #[cfg(feature = "services-dropbox")]
+ Dropbox,
+ #[cfg(feature = "services-fs")]
+ Fs,
+ #[cfg(feature = "services-gcs")]
+ Gcs,
+ #[cfg(feature = "services-gdrive")]
+ Gdrive,
+ #[cfg(feature = "services-ghac")]
+ Ghac,
+ #[cfg(feature = "services-gridfs")]
+ Gridfs,
+ #[cfg(feature = "services-hdfs-native")]
+ HdfsNative,
+ #[cfg(feature = "services-http")]
+ Http,
+ #[cfg(feature = "services-huggingface")]
+ Huggingface,
+ #[cfg(feature = "services-ipfs")]
+ Ipfs,
+ #[cfg(feature = "services-ipmfs")]
+ Ipmfs,
+ #[cfg(feature = "services-koofr")]
+ Koofr,
+ #[cfg(feature = "services-memcached")]
+ Memcached,
+ #[cfg(feature = "services-memory")]
+ Memory,
+ #[cfg(feature = "services-mini-moka")]
+ MiniMoka,
+ #[cfg(feature = "services-moka")]
+ Moka,
+ #[cfg(feature = "services-mongodb")]
+ Mongodb,
+ #[cfg(feature = "services-mysql")]
+ Mysql,
+ #[cfg(feature = "services-obs")]
+ Obs,
+ #[cfg(feature = "services-onedrive")]
+ Onedrive,
+ #[cfg(feature = "services-oss")]
+ Oss,
+ #[cfg(feature = "services-persy")]
+ Persy,
+ #[cfg(feature = "services-postgresql")]
+ Postgresql,
+ #[cfg(feature = "services-redb")]
+ Redb,
+ #[cfg(feature = "services-redis")]
+ Redis,
+ #[cfg(feature = "services-s3")]
+ S3,
+ #[cfg(feature = "services-seafile")]
+ Seafile,
+ #[cfg(feature = "services-sled")]
+ Sled,
+ #[cfg(feature = "services-sqlite")]
+ Sqlite,
+ #[cfg(feature = "services-swift")]
+ Swift,
+ #[cfg(feature = "services-upyun")]
+ Upyun,
+ #[cfg(feature = "services-vercel-artifacts")]
+ VercelArtifacts,
+ #[cfg(feature = "services-webdav")]
+ Webdav,
+ #[cfg(feature = "services-webhdfs")]
+ Webhdfs,
+ #[cfg(feature = "services-yandex-disk")]
+ YandexDisk,
+}
+
+#[gen_stub_pymethods]
+#[pymethods]
+impl PyScheme {
+ #[getter]
+ pub fn name(&self) -> String {
+ format!("{:?}", &self)
+ }
+
+ #[getter]
+ pub fn value(&self) -> &'static str {
+ let scheme: ocore::Scheme = (*self).into();
+ scheme.into_static()
+ }
+}
+
+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.AliyunDrive, typing.Literal["aliyun-drive"]],
+ /,
+ *,
+ drive_type: builtins.str,
+ root: builtins.str = ...,
+ access_token: builtins.str = ...,
+ client_id: builtins.str = ...,
+ client_secret: builtins.str = ...,
+ refresh_token: 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.
+ #4733 Required if no client_id, client_secret and
+ refresh_token are provided.
+ client_id : builtins.str, optional
+ The client_id of this backend.
+ Required if no access_token is provided.
+ client_secret : builtins.str, optional
+ The client_secret of this backend.
+ Required if no access_token is provided.
+ refresh_token : builtins.str, optional
+ The refresh_token of this backend.
+ Required if no access_token is provided.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `aliyun-drive` 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.Alluxio, typing.Literal["alluxio"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: 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`.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `alluxio` 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.Azblob, typing.Literal["azblob"]],
+ /,
+ *,
+ container: builtins.str,
+ root: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ account_name: builtins.str = ...,
+ account_key: builtins.str = ...,
+ encryption_key: builtins.str = ...,
+ encryption_key_sha256: builtins.str = ...,
+ encryption_algorithm: builtins.str = ...,
+ sas_token: builtins.str = ...,
+ batch_max_operations: builtins.int = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `azblob` service.
+
+ Parameters
+ ----------
+ 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.
+ 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.
+ 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
+ The new `Operator` for `azblob` 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.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 = ...,
+ client_id: builtins.str = ...,
+ sas_token: builtins.str = ...,
+ authority_host: 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
+ 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
+ client_id : builtins.str, optional
+ client_id The client id of the service principal.
+ - required for client_credentials authentication
+ 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`
+ Returns
+ -------
+ Operator
+ The new `Operator` for `azdls` 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.Azfile, typing.Literal["azfile"]],
+ /,
+ *,
+ share_name: builtins.str,
+ root: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ account_name: builtins.str = ...,
+ account_key: builtins.str = ...,
+ sas_token: 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.
+ sas_token : builtins.str, optional
+ The sas token for azfile.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `azfile` 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.B2, typing.Literal["b2"]],
+ /,
+ *,
+ 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
+ ----------
+ bucket : builtins.str
+ bucket of this backend.
+ required.
+ bucket_id : builtins.str
+ bucket id of this backend.
+ required.
+ 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
+ The new `Operator` for `b2` 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.Cacache, typing.Literal["cacache"]],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `cacache` service.
+
+ Parameters
+ ----------
+ datadir : builtins.str, optional
+ That path to the cacache data directory.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `cacache` 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.Cos, typing.Literal["cos"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: 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.
+ endpoint : builtins.str, optional
+ Endpoint 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
+ The new `Operator` for `cos` 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.Dashmap, typing.Literal["dashmap"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `dashmap` service.
+
+ Parameters
+ ----------
+ root : builtins.str, optional
+ root path of this backend
+ Returns
+ -------
+ Operator
+ The new `Operator` for `dashmap` 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.Dropbox, typing.Literal["dropbox"]],
+ /,
+ *,
+ 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 `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.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `dropbox` 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.Fs, typing.Literal["fs"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ atomic_write_dir: 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
+ Returns
+ -------
+ Operator
+ The new `Operator` for `fs` 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"]],
+ /,
+ *,
+ 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 = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `gcs` 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.
+ allow_anonymous : builtins.bool, optional
+ Allow opendal to send requests without signing when
+ credentials are not loaded.
+ 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.
+ token : builtins.str, optional
+ A Google Cloud OAuth2 token.
+ Takes precedence over `credential` and
+ `credential_path`.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `gcs` 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.Gdrive, typing.Literal["gdrive"]],
+ /,
+ *,
+ 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 `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.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `gdrive` 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.Ghac, typing.Literal["ghac"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ version: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ runtime_token: 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.
+ runtime_token : builtins.str, optional
+ The runtime token for ghac service.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `ghac` 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.Gridfs, typing.Literal["gridfs"]],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ database: builtins.str = ...,
+ bucket: builtins.str = ...,
+ chunk_size: builtins.int = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `gridfs` service.
+
+ 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.
+ root : builtins.str, optional
+ The working directory, all operations will be
+ performed under it.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `gridfs` 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.HdfsNative, typing.Literal["hdfs-native"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ name_node: builtins.str = ...,
+ enable_append: builtins.bool = ...,
+ ) -> 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
+ Returns
+ -------
+ Operator
+ The new `Operator` for `hdfs-native` 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.Http, typing.Literal["http"]],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ token: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `http` service.
+
+ Parameters
+ ----------
+ 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
+ Returns
+ -------
+ Operator
+ The new `Operator` for `http` 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.Huggingface, typing.Literal["huggingface"]],
+ /,
+ *,
+ repo_type: builtins.str = ...,
+ repo_id: builtins.str = ...,
+ revision: builtins.str = ...,
+ root: builtins.str = ...,
+ token: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `huggingface` service.
+
+ Parameters
+ ----------
+ 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.
+ root : builtins.str, optional
+ Root of this backend.
+ Can be "/path/to/dir".
+ Default is "/".
+ token : builtins.str, optional
+ Token of this backend.
+ This is optional.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `huggingface` 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.Ipfs, typing.Literal["ipfs"]],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `ipfs` service.
+
+ Parameters
+ ----------
+ endpoint : builtins.str, optional
+ IPFS gateway endpoint.
+ root : builtins.str, optional
+ IPFS root.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `ipfs` 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.Ipmfs, typing.Literal["ipmfs"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: 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.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `ipmfs` 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.Koofr, typing.Literal["koofr"]],
+ /,
+ *,
+ endpoint: builtins.str,
+ email: builtins.str,
+ root: builtins.str = ...,
+ password: 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.
+ password : builtins.str, optional
+ password of this backend.
+ (Must be the application password)
+ Returns
+ -------
+ Operator
+ The new `Operator` for `koofr` 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.Memcached, typing.Literal["memcached"]],
+ /,
+ *,
+ endpoint: 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
+ ----------
+ endpoint : builtins.str, optional
+ network address of the memcached service.
+ For example: "tcp://localhost:11211"
+ 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
+ The new `Operator` for `memcached` 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.Memory, typing.Literal["memory"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `memory` service.
+
+ Parameters
+ ----------
+ root : builtins.str, optional
+ root of the backend.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `memory` 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.MiniMoka, typing.Literal["mini-moka"]],
+ /,
+ *,
+ max_capacity: builtins.int = ...,
+ time_to_live: builtins.str = ...,
+ time_to_idle: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `mini-moka` service.
+
+ Parameters
+ ----------
+ max_capacity : builtins.int, optional
+ 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)
+ 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
+ Returns
+ -------
+ Operator
+ The new `Operator` for `mini-moka` 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.Moka, typing.Literal["moka"]],
+ /,
+ *,
+ name: builtins.str = ...,
+ max_capacity: builtins.int = ...,
+ time_to_live: builtins.str = ...,
+ time_to_idle: builtins.str = ...,
+ root: 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)
+ 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
+ Returns
+ -------
+ Operator
+ The new `Operator` for `moka` 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.Mongodb, typing.Literal["mongodb"]],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ database: builtins.str = ...,
+ collection: builtins.str = ...,
+ root: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `mongodb` service.
+
+ Parameters
+ ----------
+ 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
+ value_field : builtins.str, optional
+ value field of this backend
+ Returns
+ -------
+ Operator
+ The new `Operator` for `mongodb` 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.Mysql, typing.Literal["mysql"]],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `mysql` service.
+
+ Parameters
+ ----------
+ connection_string : builtins.str, optional
+ This connection string is used to connect to the
+ mysql service.
+ There are url based formats.
+ The format of connect string resembles the url
+ format of the mysql client.
+ The format is:
+ `[scheme://][user[:[password]]@]host[:port][/schema][?attribute1=value1&attribute2=value2...`
+ - `mysql://user@localhost` -
+ `mysql://user:password@localhost` -
+ `mysql://user:password@localhost:3306` -
+ `mysql://user:password@localhost:3306/db` For more
+ information, please refer to
+ <https://docs.rs/sqlx/latest/sqlx/mysql/struct.MySqlConnectOptions.html>.
+ 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.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `mysql` 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.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 = ...,
+ ) -> 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
+ -------
+ Operator
+ The new `Operator` for `obs` 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.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 = ...,
+ ) -> 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
+ client_secret : builtins.str, optional
+ Microsoft Graph API Application client secret that
+ is in the Azure's app registration portal
+ enable_versioning : builtins.bool, optional
+ Enabling version support
+ Returns
+ -------
+ Operator
+ The new `Operator` for `onedrive` 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.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 = ...,
+ batch_max_operations: builtins.int = ...,
+ delete_max_size: builtins.int = ...,
+ role_arn: builtins.str = ...,
+ role_session_name: builtins.str = ...,
+ oidc_provider_arn: builtins.str = ...,
+ oidc_token_file: builtins.str = ...,
+ sts_endpoint: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `oss` service.
+
+ 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:
+ [`ALIBABA_CLOUD_ACCESS_KEY_ID`]
+ access_key_secret : builtins.str, optional
+ 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`]
+ batch_max_operations : builtins.int, optional
+ The size of max batch operations.
+ 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.
+ oidc_provider_arn : builtins.str, optional
+ `oidc_provider_arn` will be loaded from - this field
+ if it's `is_some` - env value:
+ [`ALIBABA_CLOUD_OIDC_PROVIDER_ARN`]
+ oidc_token_file : builtins.str, optional
+ `oidc_token_file` will be loaded from - this field
+ if it's `is_some` - env value:
+ [`ALIBABA_CLOUD_OIDC_TOKEN_FILE`]
+ sts_endpoint : builtins.str, optional
+ `sts_endpoint` will be loaded from - this field if
+ it's `is_some` - env value:
+ [`ALIBABA_CLOUD_STS_ENDPOINT`]
+ Returns
+ -------
+ Operator
+ The new `Operator` for `oss` 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.Persy, typing.Literal["persy"]],
+ /,
+ *,
+ datafile: builtins.str = ...,
+ segment: builtins.str = ...,
+ index: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `persy` service.
+
+ Parameters
+ ----------
+ 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.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `persy` 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.Postgresql, typing.Literal["postgresql"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `postgresql` service.
+
+ 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://`.
+ - `postgresql://user@localhost` -
+ `postgresql://user:password@%2Fvar%2Flib%2Fpostgresql/mydb?connect_timeout=10`
+ -
+ `postgresql://user@host1:1234,host2,host3:5678?target_session_attrs=read-write`
+ -
+ `postgresql:///mydb?user=user&host=/var/lib/postgresql`
+ For more information, please visit
+ <https://docs.rs/sqlx/latest/sqlx/postgres/struct.PgConnectOptions.html>.
+ table : builtins.str, optional
+ the table of postgresql
+ key_field : builtins.str, optional
+ the key field of postgresql
+ value_field : builtins.str, optional
+ the value field of postgresql
+ Returns
+ -------
+ Operator
+ The new `Operator` for `postgresql` 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.Redb, typing.Literal["redb"]],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ root: builtins.str = ...,
+ table: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `redb` service.
+
+ Parameters
+ ----------
+ datadir : builtins.str, optional
+ path to the redb data directory.
+ root : builtins.str, optional
+ The root for redb.
+ table : builtins.str, optional
+ The table name for redb.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `redb` 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.Redis, typing.Literal["redis"]],
+ /,
+ *,
+ db: builtins.int,
+ endpoint: builtins.str = ...,
+ cluster_endpoints: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ root: builtins.str = ...,
+ default_ttl: typing.Any = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `redis` service.
+
+ Parameters
+ ----------
+ db : builtins.int
+ the number of DBs redis can take is unlimited
+ default is db 0
+ 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
+ Returns
+ -------
+ Operator
+ The new `Operator` for `redis` 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.S3, typing.Literal["s3"]],
+ /,
+ *,
+ bucket: builtins.str,
+ root: builtins.str = ...,
+ enable_versioning: builtins.bool = ...,
+ endpoint: 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 = ...,
+ 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 = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `s3` service.
+
+ Parameters
+ ----------
+ 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.
+ enable_versioning : builtins.bool, optional
+ is bucket versioning enabled for this bucket
+ endpoint : builtins.str, optional
+ endpoint of this backend.
+ Endpoint must be full uri, e.g.
+ - AWS S3: `https://s3.amazonaws.com` or
+ `https://s3.{region}.amazonaws.com` - Cloudflare R2:
+ `https://<ACCOUNT_ID>.r2.cloudflarestorage.com` -
+ Aliyun OSS: `https://{region}.aliyuncs.com` -
+ Tencent COS: `https://cos.{region}.myqcloud.com` -
+ Minio: `http://127.0.0.1:9000` If user inputs
+ endpoint without scheme like "s3.amazonaws.com", we
+ will prepend "https://" before it.
+ - If endpoint is set, we will take user's input
+ first.
+ - If not, we will try to load it from environment.
+ - If still not set, default to
+ `https://s3.amazonaws.com`.
+ region : builtins.str, optional
+ Region represent the signing region of this
+ endpoint.
+ This is required if you are using the default AWS S3
+ endpoint.
+ If using a custom endpoint, - If region is set, we
+ will take user's input first.
+ - If not, we will try to load it from environment.
+ 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`.
+ 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
+ `aws:kms`, and
+ `server_side_encryption_aws_kms_key_id` is not set,
+ S3 will use aws managed kms key to encrypt data.
+ - If `server_side_encryption` set to `aws:kms`, and
+ `server_side_encryption_aws_kms_key_id` is a valid
+ kms key id, S3 will use the provided kms key to
+ encrypt data.
+ - If the `server_side_encryption_aws_kms_key_id` is
+ invalid or not found, an error will be returned.
+ - If `server_side_encryption` is not `aws:kms`,
+ setting `server_side_encryption_aws_kms_key_id` is a
+ noop.
+ server_side_encryption_customer_algorithm : builtins.str, optional
+ server_side_encryption_customer_algorithm for this
+ backend.
+ Available values: `AES256`.
+ server_side_encryption_customer_key : builtins.str, optional
+ server_side_encryption_customer_key for this
+ backend.
+ Value: BASE64-encoded key that matches algorithm
+ specified in
+ `server_side_encryption_customer_algorithm`.
+ server_side_encryption_customer_key_md5 : builtins.str, optional
+ Set server_side_encryption_customer_key_md5 for this
+ 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.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `s3` 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.Seafile, typing.Literal["seafile"]],
+ /,
+ *,
+ 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
+ ----------
+ 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
+ The new `Operator` for `seafile` 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.Sled, typing.Literal["sled"]],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ root: builtins.str = ...,
+ tree: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `sled` service.
+
+ Parameters
+ ----------
+ datadir : builtins.str, optional
+ That path to the sled data directory.
+ root : builtins.str, optional
+ The root for sled.
+ tree : builtins.str, optional
+ The tree for sled.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `sled` 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.Sqlite, typing.Literal["sqlite"]],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `sqlite` service.
+
+ Parameters
+ ----------
+ connection_string : builtins.str, optional
+ Set the connection_string of the sqlite service.
+ This connection string is used to connect to the
+ sqlite service.
+ The format of connect string resembles the url
+ format of the sqlite client: - `sqlite::memory:` -
+ `sqlite:data.db` - `sqlite://data.db` For more
+ information, please visit
+ <https://docs.rs/sqlx/latest/sqlx/sqlite/struct.SqliteConnectOptions.html>.
+ 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: "/"
+ Returns
+ -------
+ Operator
+ The new `Operator` for `sqlite` 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.Swift, typing.Literal["swift"]],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ container: builtins.str = ...,
+ root: builtins.str = ...,
+ token: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `swift` service.
+
+ Parameters
+ ----------
+ endpoint : builtins.str, optional
+ The endpoint for Swift.
+ container : builtins.str, optional
+ The container for Swift.
+ root : builtins.str, optional
+ The root for Swift.
+ token : builtins.str, optional
+ The token for Swift.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `swift` 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.Upyun, typing.Literal["upyun"]],
+ /,
+ *,
+ bucket: builtins.str,
+ root: builtins.str = ...,
+ operator: builtins.str = ...,
+ password: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `upyun` service.
+
+ Parameters
+ ----------
+ 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.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `upyun` 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.VercelArtifacts, typing.Literal["vercel-artifacts"]],
+ /,
+ *,
+ access_token: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `vercel-artifacts` service.
+
+ Parameters
+ ----------
+ access_token : builtins.str, optional
+ The access token for Vercel.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `vercel-artifacts` 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.Webdav, typing.Literal["webdav"]],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ token: builtins.str = ...,
+ root: builtins.str = ...,
+ disable_copy: builtins.bool = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `webdav` service.
+
+ Parameters
+ ----------
+ 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.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `webdav` 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.Webhdfs, typing.Literal["webhdfs"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ user_name: builtins.str = ...,
+ delegation: builtins.str = ...,
+ disable_list_batch: builtins.bool = ...,
+ atomic_write_dir: 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.
+ 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
+ Returns
+ -------
+ Operator
+ The new `Operator` for `webhdfs` 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.YandexDisk, typing.Literal["yandex-disk"]],
+ /,
+ *,
+ access_token: builtins.str,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `Operator` for `yandex-disk` service.
+
+ Parameters
+ ----------
+ access_token : builtins.str
+ yandex disk oauth access_token.
+ root : builtins.str, optional
+ root of this backend.
+ All operations will happen under this root.
+ Returns
+ -------
+ Operator
+ The new `Operator` for `yandex-disk` 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.AliyunDrive, typing.Literal["aliyun-drive"]],
+ /,
+ *,
+ drive_type: builtins.str,
+ root: builtins.str = ...,
+ access_token: builtins.str = ...,
+ client_id: builtins.str = ...,
+ client_secret: builtins.str = ...,
+ refresh_token: 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.
+ #4733 Required if no client_id, client_secret and
+ refresh_token are provided.
+ client_id : builtins.str, optional
+ The client_id of this backend.
+ Required if no access_token is provided.
+ client_secret : builtins.str, optional
+ The client_secret of this backend.
+ Required if no access_token is provided.
+ refresh_token : builtins.str, optional
+ The refresh_token of this backend.
+ Required if no access_token is provided.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `aliyun-drive` 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.Alluxio, typing.Literal["alluxio"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: 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`.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `alluxio` 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.Azblob, typing.Literal["azblob"]],
+ /,
+ *,
+ container: builtins.str,
+ root: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ account_name: builtins.str = ...,
+ account_key: builtins.str = ...,
+ encryption_key: builtins.str = ...,
+ encryption_key_sha256: builtins.str = ...,
+ encryption_algorithm: builtins.str = ...,
+ sas_token: builtins.str = ...,
+ batch_max_operations: builtins.int = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `azblob` service.
+
+ Parameters
+ ----------
+ 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.
+ 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.
+ 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
+ The new `AsyncOperator` for `azblob` 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.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 = ...,
+ client_id: builtins.str = ...,
+ sas_token: builtins.str = ...,
+ authority_host: 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
+ 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
+ client_id : builtins.str, optional
+ client_id The client id of the service principal.
+ - required for client_credentials authentication
+ 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`
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `azdls` 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.Azfile, typing.Literal["azfile"]],
+ /,
+ *,
+ share_name: builtins.str,
+ root: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ account_name: builtins.str = ...,
+ account_key: builtins.str = ...,
+ sas_token: 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.
+ sas_token : builtins.str, optional
+ The sas token for azfile.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `azfile` 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.B2, typing.Literal["b2"]],
+ /,
+ *,
+ 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
+ ----------
+ bucket : builtins.str
+ bucket of this backend.
+ required.
+ bucket_id : builtins.str
+ bucket id of this backend.
+ required.
+ 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
+ The new `AsyncOperator` for `b2` 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.Cacache, typing.Literal["cacache"]],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `cacache` service.
+
+ Parameters
+ ----------
+ datadir : builtins.str, optional
+ That path to the cacache data directory.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `cacache` 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.Cos, typing.Literal["cos"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: 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.
+ endpoint : builtins.str, optional
+ Endpoint 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
+ The new `AsyncOperator` for `cos` 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.Dashmap, typing.Literal["dashmap"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `dashmap` service.
+
+ Parameters
+ ----------
+ root : builtins.str, optional
+ root path of this backend
+ Returns
+ -------
+ AsyncOperator
+ 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"]],
+ /,
+ *,
+ 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.
+
+ 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
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `dropbox` 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.Fs, typing.Literal["fs"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ atomic_write_dir: 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
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `fs` 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.Gcs, typing.Literal["gcs"]],
+ /,
+ *,
+ 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 = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `gcs` 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.
+ allow_anonymous : builtins.bool, optional
+ Allow opendal to send requests without signing when
+ credentials are not loaded.
+ 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.
+ token : builtins.str, optional
+ A Google Cloud OAuth2 token.
+ Takes precedence over `credential` and
+ `credential_path`.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `gcs` 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.Gdrive, typing.Literal["gdrive"]],
+ /,
+ *,
+ 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 `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.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `gdrive` 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.Ghac, typing.Literal["ghac"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ version: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ runtime_token: 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.
+ runtime_token : builtins.str, optional
+ The runtime token for ghac service.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `ghac` 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.Gridfs, typing.Literal["gridfs"]],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ database: builtins.str = ...,
+ bucket: builtins.str = ...,
+ chunk_size: builtins.int = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `gridfs` service.
+
+ 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.
+ root : builtins.str, optional
+ The working directory, all operations will be
+ performed under it.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `gridfs` 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.HdfsNative, typing.Literal["hdfs-native"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ name_node: builtins.str = ...,
+ enable_append: builtins.bool = ...,
+ ) -> 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
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `hdfs-native` 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.Http, typing.Literal["http"]],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ token: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `http` service.
+
+ Parameters
+ ----------
+ 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
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `http` 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.Huggingface, typing.Literal["huggingface"]],
+ /,
+ *,
+ repo_type: builtins.str = ...,
+ repo_id: builtins.str = ...,
+ revision: builtins.str = ...,
+ root: builtins.str = ...,
+ token: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `huggingface` service.
+
+ Parameters
+ ----------
+ 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.
+ root : builtins.str, optional
+ Root of this backend.
+ Can be "/path/to/dir".
+ Default is "/".
+ token : builtins.str, optional
+ Token of this backend.
+ This is optional.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `huggingface` 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.Ipfs, typing.Literal["ipfs"]],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `ipfs` service.
+
+ Parameters
+ ----------
+ endpoint : builtins.str, optional
+ IPFS gateway endpoint.
+ root : builtins.str, optional
+ IPFS root.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `ipfs` 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.Ipmfs, typing.Literal["ipmfs"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: 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.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `ipmfs` 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.Koofr, typing.Literal["koofr"]],
+ /,
+ *,
+ endpoint: builtins.str,
+ email: builtins.str,
+ root: builtins.str = ...,
+ password: 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.
+ password : builtins.str, optional
+ password of this backend.
+ (Must be the application password)
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `koofr` 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.Memcached, typing.Literal["memcached"]],
+ /,
+ *,
+ endpoint: 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
+ ----------
+ endpoint : builtins.str, optional
+ network address of the memcached service.
+ For example: "tcp://localhost:11211"
+ 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
+ The new `AsyncOperator` for `memcached` 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.Memory, typing.Literal["memory"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `memory` service.
+
+ Parameters
+ ----------
+ root : builtins.str, optional
+ root of the backend.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `memory` 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.MiniMoka, typing.Literal["mini-moka"]],
+ /,
+ *,
+ max_capacity: builtins.int = ...,
+ time_to_live: builtins.str = ...,
+ time_to_idle: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `mini-moka` service.
+
+ Parameters
+ ----------
+ max_capacity : builtins.int, optional
+ 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)
+ 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
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `mini-moka` 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.Moka, typing.Literal["moka"]],
+ /,
+ *,
+ name: builtins.str = ...,
+ max_capacity: builtins.int = ...,
+ time_to_live: builtins.str = ...,
+ time_to_idle: builtins.str = ...,
+ root: 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)
+ 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
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `moka` 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.Mongodb, typing.Literal["mongodb"]],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ database: builtins.str = ...,
+ collection: builtins.str = ...,
+ root: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `mongodb` service.
+
+ Parameters
+ ----------
+ 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
+ value_field : builtins.str, optional
+ value field of this backend
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `mongodb` 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.Mysql, typing.Literal["mysql"]],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `mysql` service.
+
+ Parameters
+ ----------
+ connection_string : builtins.str, optional
+ This connection string is used to connect to the
+ mysql service.
+ There are url based formats.
+ The format of connect string resembles the url
+ format of the mysql client.
+ The format is:
+ `[scheme://][user[:[password]]@]host[:port][/schema][?attribute1=value1&attribute2=value2...`
+ - `mysql://user@localhost` -
+ `mysql://user:password@localhost` -
+ `mysql://user:password@localhost:3306` -
+ `mysql://user:password@localhost:3306/db` For more
+ information, please refer to
+ <https://docs.rs/sqlx/latest/sqlx/mysql/struct.MySqlConnectOptions.html>.
+ 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.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `mysql` 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.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 = ...,
+ ) -> 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
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `obs` 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.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 = ...,
+ ) -> 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
+ client_secret : builtins.str, optional
+ Microsoft Graph API Application client secret that
+ is in the Azure's app registration portal
+ enable_versioning : builtins.bool, optional
+ Enabling version support
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `onedrive` 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.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 = ...,
+ batch_max_operations: builtins.int = ...,
+ delete_max_size: builtins.int = ...,
+ role_arn: builtins.str = ...,
+ role_session_name: builtins.str = ...,
+ oidc_provider_arn: builtins.str = ...,
+ oidc_token_file: builtins.str = ...,
+ sts_endpoint: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `oss` service.
+
+ 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:
+ [`ALIBABA_CLOUD_ACCESS_KEY_ID`]
+ access_key_secret : builtins.str, optional
+ 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`]
+ batch_max_operations : builtins.int, optional
+ The size of max batch operations.
+ 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.
+ oidc_provider_arn : builtins.str, optional
+ `oidc_provider_arn` will be loaded from - this field
+ if it's `is_some` - env value:
+ [`ALIBABA_CLOUD_OIDC_PROVIDER_ARN`]
+ oidc_token_file : builtins.str, optional
+ `oidc_token_file` will be loaded from - this field
+ if it's `is_some` - env value:
+ [`ALIBABA_CLOUD_OIDC_TOKEN_FILE`]
+ sts_endpoint : builtins.str, optional
+ `sts_endpoint` will be loaded from - this field if
+ it's `is_some` - env value:
+ [`ALIBABA_CLOUD_STS_ENDPOINT`]
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `oss` 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.Persy, typing.Literal["persy"]],
+ /,
+ *,
+ datafile: builtins.str = ...,
+ segment: builtins.str = ...,
+ index: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `persy` service.
+
+ Parameters
+ ----------
+ 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.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `persy` 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.Postgresql, typing.Literal["postgresql"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `postgresql` service.
+
+ 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://`.
+ - `postgresql://user@localhost` -
+ `postgresql://user:password@%2Fvar%2Flib%2Fpostgresql/mydb?connect_timeout=10`
+ -
+ `postgresql://user@host1:1234,host2,host3:5678?target_session_attrs=read-write`
+ -
+ `postgresql:///mydb?user=user&host=/var/lib/postgresql`
+ For more information, please visit
+ <https://docs.rs/sqlx/latest/sqlx/postgres/struct.PgConnectOptions.html>.
+ table : builtins.str, optional
+ the table of postgresql
+ key_field : builtins.str, optional
+ the key field of postgresql
+ value_field : builtins.str, optional
+ the value field of postgresql
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `postgresql` 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.Redb, typing.Literal["redb"]],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ root: builtins.str = ...,
+ table: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `redb` service.
+
+ Parameters
+ ----------
+ datadir : builtins.str, optional
+ path to the redb data directory.
+ root : builtins.str, optional
+ The root for redb.
+ table : builtins.str, optional
+ The table name for redb.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `redb` 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.Redis, typing.Literal["redis"]],
+ /,
+ *,
+ db: builtins.int,
+ endpoint: builtins.str = ...,
+ cluster_endpoints: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ root: builtins.str = ...,
+ default_ttl: typing.Any = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `redis` service.
+
+ Parameters
+ ----------
+ db : builtins.int
+ the number of DBs redis can take is unlimited
+ default is db 0
+ 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
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `redis` 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.S3, typing.Literal["s3"]],
+ /,
+ *,
+ bucket: builtins.str,
+ root: builtins.str = ...,
+ enable_versioning: builtins.bool = ...,
+ endpoint: 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 = ...,
+ 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 = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `s3` service.
+
+ Parameters
+ ----------
+ 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.
+ enable_versioning : builtins.bool, optional
+ is bucket versioning enabled for this bucket
+ endpoint : builtins.str, optional
+ endpoint of this backend.
+ Endpoint must be full uri, e.g.
+ - AWS S3: `https://s3.amazonaws.com` or
+ `https://s3.{region}.amazonaws.com` - Cloudflare R2:
+ `https://<ACCOUNT_ID>.r2.cloudflarestorage.com` -
+ Aliyun OSS: `https://{region}.aliyuncs.com` -
+ Tencent COS: `https://cos.{region}.myqcloud.com` -
+ Minio: `http://127.0.0.1:9000` If user inputs
+ endpoint without scheme like "s3.amazonaws.com", we
+ will prepend "https://" before it.
+ - If endpoint is set, we will take user's input
+ first.
+ - If not, we will try to load it from environment.
+ - If still not set, default to
+ `https://s3.amazonaws.com`.
+ region : builtins.str, optional
+ Region represent the signing region of this
+ endpoint.
+ This is required if you are using the default AWS S3
+ endpoint.
+ If using a custom endpoint, - If region is set, we
+ will take user's input first.
+ - If not, we will try to load it from environment.
+ 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`.
+ 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
+ `aws:kms`, and
+ `server_side_encryption_aws_kms_key_id` is not set,
+ S3 will use aws managed kms key to encrypt data.
+ - If `server_side_encryption` set to `aws:kms`, and
+ `server_side_encryption_aws_kms_key_id` is a valid
+ kms key id, S3 will use the provided kms key to
+ encrypt data.
+ - If the `server_side_encryption_aws_kms_key_id` is
+ invalid or not found, an error will be returned.
+ - If `server_side_encryption` is not `aws:kms`,
+ setting `server_side_encryption_aws_kms_key_id` is a
+ noop.
+ server_side_encryption_customer_algorithm : builtins.str, optional
+ server_side_encryption_customer_algorithm for this
+ backend.
+ Available values: `AES256`.
+ server_side_encryption_customer_key : builtins.str, optional
+ server_side_encryption_customer_key for this
+ backend.
+ Value: BASE64-encoded key that matches algorithm
+ specified in
+ `server_side_encryption_customer_algorithm`.
+ server_side_encryption_customer_key_md5 : builtins.str, optional
+ Set server_side_encryption_customer_key_md5 for this
+ 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.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `s3` 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.Seafile, typing.Literal["seafile"]],
+ /,
+ *,
+ 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
+ ----------
+ 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
+ The new `AsyncOperator` for `seafile` 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.Sled, typing.Literal["sled"]],
+ /,
+ *,
+ datadir: builtins.str = ...,
+ root: builtins.str = ...,
+ tree: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `sled` service.
+
+ Parameters
+ ----------
+ datadir : builtins.str, optional
+ That path to the sled data directory.
+ root : builtins.str, optional
+ The root for sled.
+ tree : builtins.str, optional
+ The tree for sled.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `sled` 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.Sqlite, typing.Literal["sqlite"]],
+ /,
+ *,
+ connection_string: builtins.str = ...,
+ table: builtins.str = ...,
+ key_field: builtins.str = ...,
+ value_field: builtins.str = ...,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `sqlite` service.
+
+ Parameters
+ ----------
+ connection_string : builtins.str, optional
+ Set the connection_string of the sqlite service.
+ This connection string is used to connect to the
+ sqlite service.
+ The format of connect string resembles the url
+ format of the sqlite client: - `sqlite::memory:` -
+ `sqlite:data.db` - `sqlite://data.db` For more
+ information, please visit
+ <https://docs.rs/sqlx/latest/sqlx/sqlite/struct.SqliteConnectOptions.html>.
+ 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: "/"
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `sqlite` 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.Swift, typing.Literal["swift"]],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ container: builtins.str = ...,
+ root: builtins.str = ...,
+ token: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `swift` service.
+
+ Parameters
+ ----------
+ endpoint : builtins.str, optional
+ The endpoint for Swift.
+ container : builtins.str, optional
+ The container for Swift.
+ root : builtins.str, optional
+ The root for Swift.
+ token : builtins.str, optional
+ The token for Swift.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `swift` 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.Upyun, typing.Literal["upyun"]],
+ /,
+ *,
+ bucket: builtins.str,
+ root: builtins.str = ...,
+ operator: builtins.str = ...,
+ password: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `upyun` service.
+
+ Parameters
+ ----------
+ 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.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `upyun` 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.VercelArtifacts, typing.Literal["vercel-artifacts"]],
+ /,
+ *,
+ access_token: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `vercel-artifacts` service.
+
+ Parameters
+ ----------
+ access_token : builtins.str, optional
+ The access token for Vercel.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `vercel-artifacts` 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.Webdav, typing.Literal["webdav"]],
+ /,
+ *,
+ endpoint: builtins.str = ...,
+ username: builtins.str = ...,
+ password: builtins.str = ...,
+ token: builtins.str = ...,
+ root: builtins.str = ...,
+ disable_copy: builtins.bool = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `webdav` service.
+
+ Parameters
+ ----------
+ 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.
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `webdav` 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.Webhdfs, typing.Literal["webhdfs"]],
+ /,
+ *,
+ root: builtins.str = ...,
+ endpoint: builtins.str = ...,
+ user_name: builtins.str = ...,
+ delegation: builtins.str = ...,
+ disable_list_batch: builtins.bool = ...,
+ atomic_write_dir: 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.
+ 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
+ Returns
+ -------
+ AsyncOperator
+ The new `AsyncOperator` for `webhdfs` 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.YandexDisk, typing.Literal["yandex-disk"]],
+ /,
+ *,
+ access_token: builtins.str,
+ root: builtins.str = ...,
+ ) -> typing_extensions.Self:
+ r"""
+ Create a new `AsyncOperator` for `yandex-disk` service.
... 703 lines suppressed ...