opendal-0.46.0
توضیحات
Apache OpenDAL™ Python Binding
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | opendal-0.46.0 |
| نام | opendal |
| نسخه کتابخانه | 0.46.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Apache OpenDAL <dev@opendal.apache.org> |
| ایمیل نویسنده | Apache OpenDAL <dev@opendal.apache.org> |
| آدرس صفحه اصلی | https://opendal.apache.org/ |
| آدرس اینترنتی | https://pypi.org/project/opendal/ |
| مجوز | Apache-2.0 |
# Apache OpenDAL™ Python Binding
[](https://pypi.org/project/opendal/)
[](https://pypi.org/project/opendal/)
[](https://opendal.apache.org/docs/python/)
This package intends to build a native python binding for Apache OpenDAL.

## Useful Links
- [Documentation](https://opendal.apache.org/docs/python/)
- [Examples](./docs/examples)
- [Upgrade Guide](./upgrade.md)
## Installation
```bash
pip install opendal
```
## Usage
fs service example:
```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())
```
s3 service example:
```python
import opendal
op = opendal.Operator("s3", root="/tmp", bucket="your_bucket_name", region="your_region")
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("s3", root="/tmp", bucket="your_bucket_name", region="your_region")
await op.write("test.txt", b"Hello World")
print(await op.read("test.txt"))
asyncio.run(main())
```
## Development
Setup virtualenv:
```shell
uv venv --python 3.11
```
Install all the dependencies:
```shell
uv sync --all-groups --all-extras
```
Run some tests:
```shell
# To run `test_write.py` and use `fs` operator
OPENDAL_TEST=fs OPENDAL_FS_ROOT=/tmp uv run pytest -vk test_write
```
Build API docs:
```shell
uv run mkdocs build
```
## Used by
Check out the [users](./users.md) list for more details on who is using OpenDAL.
## License and Trademarks
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl opendal-0.46.0:
pip install opendal-0.46.0.whl
نصب پکیج tar.gz opendal-0.46.0:
pip install opendal-0.46.0.tar.gz