diff --git a/bindings/python/README.md b/bindings/python/README.md index 478b3ae5655..44d850094c0 100644 --- a/bindings/python/README.md +++ b/bindings/python/README.md @@ -2,7 +2,37 @@ This crate intends to build a native python binding. -## Building +## Installation + +```bash +pip install opendal +``` + +## Usage + +```python +import opendal + +op = opendal.Operator("fs", root="/tmp") +op.write("test.txt", "Hello World") +print(op.read("test.txt")) +print(op.stat("test.txt").content_length) +``` + +Or using the async API: + +```python +import asyncio + +async main(): + op = opendal.AsyncOperator("fs", root="/tmp") + await op.write("test.txt", "Hello World") + print(await op.read("test.txt")) + +asyncio.run(main()) +``` + +## Development Install `maturin`: diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index 125061aad4a..e43f7da7e28 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -23,4 +23,12 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] name = "opendal" +description = "OpenDAL Python Binding" requires-python = ">=3.7" +license = {text = "Apache-2.0"} +readme = "README.md" + +[project.urls] +Homepage = "https://opendal.databend.rs/" +Repository = "https://github.com/datafuselabs/opendal" +Documentation = "https://docs.rs/opendal/"