OpenDAL Python Binding
Project description
OpenDAL Python Binding
Documentation: main
This crate intends to build a native python binding.
Installation
pip install opendal
Usage
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:
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())
Development
Setup virtualenv:
python -m venv venv
Activate venv:
source venv/bin/activate
Install maturin
:
pip install maturin[patchelf]
Build bindings:
maturin develop
Run some tests:
maturin develop -E test
behave tests
Build API docs:
maturin develop -E docs
pdoc opendal
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
opendal-0.38.0.tar.gz
(442.3 kB
view hashes)
Built Distributions
Close
Hashes for opendal-0.38.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da3abe98e8ca956f81d430fbcb0f5babe0a981dca87518c2725fc5c81257006d |
|
MD5 | 60b23ea83cef1db10529786ed0834d29 |
|
BLAKE2b-256 | 6c5854bdfb28dbcaee610c4d2fda1b4c9cc24f13b16aafc23d02fa7cc90a05a5 |
Close
Hashes for opendal-0.38.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9443f20032842d52ff0aaa0b31ac328d933cb4736b1f5c99b2d0bb44f2b4920 |
|
MD5 | 8c09b05be4ecc61dded6f195905f5ae8 |
|
BLAKE2b-256 | 524daeaf5a8ecae0cb4aa57525dd1de094a01e71597f34963e76e949df11f4eb |
Close
Hashes for opendal-0.38.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31a5a7fa9bec34a9e8bdcc99bf3304564bed24b64212e2f53de0e40b24ed53bd |
|
MD5 | 17093a4d2fb88817e5998d0c43fa5f1f |
|
BLAKE2b-256 | 8db6bacd437701b1ad759c32cf03c827ec5c3684b7cd36c6e87be57c5cf3afe9 |