open
Asynchronously open a file and return an async context manager. This function checks if the underlying filesystem supports obstore bypass. If it does, it uses obstore to open the file. Otherwise, it falls back to the standard _open function which uses AsyncFileSystem. It will raise NotImplementedError if neither obstore nor AsyncFileSystem is supported.
async def open(path: str, mode: str = "rb", **kwargs) -> AsyncReadableFile | AsyncWritableFile: ...
Asynchronously open a file and return an async context manager. This function checks if the underlying filesystem supports obstore bypass. If it does, it uses obstore to open the file. Otherwise, it falls back to the standard _open function which uses AsyncFileSystem. It will raise NotImplementedError if neither obstore nor AsyncFileSystem is supported.
Parameters
| Name | Type | Description |
|---|---|---|
| path | string | The file path or URI identifying the resource to be opened. |
| mode | string = "rb" | The mode in which the file is opened (e.g., 'rb' for read-binary, 'wb' for write-binary). |
| **kwargs | dict | Additional filesystem-specific arguments passed to the underlying open implementation. |
Returns
| Type | Description |
|---|---|
| `AsyncReadableFile | AsyncWritableFile` |