blob: 3adb040b6b9e88b0844f32f56dc070e758b6d5c2 [file] [log] [blame] [view]
# Apache OpenDALâ„¢ Python binding
## Installation
```bash
pip install opendal
```
## Usage
```python
import opendal
op = opendal.Operator("fs", root="/tmp")
op.write("test.txt", b"Hello World")
print(op.read("test.txt"))
print(op.stat("test.txt").content_length)
```
Or using the async API:
```python
import asyncio
async def main():
op = opendal.AsyncOperator("fs", root="/tmp")
await op.write("test.txt", b"Hello World")
print(await op.read("test.txt"))
asyncio.run(main())
```