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.37.0.tar.gz
(421.6 kB
view hashes)
Built Distributions
Close
Hashes for opendal-0.37.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01d879598f664f1daa811f9efd9120d3338266f192d1fa96e7093ff79ea03e00 |
|
MD5 | e7380ad561d4580661075ca5454e84b9 |
|
BLAKE2b-256 | 6ed7a2655f1c8fe258911d85e16d2a160857277f5db850bd0748770b3954b7e6 |
Close
Hashes for opendal-0.37.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6def111f42f73a603466bfa5bdf9e488d2c0f0af1bc4587ffd715a70888882fd |
|
MD5 | 29cc5fc43eb28c3618b9167abf475cdc |
|
BLAKE2b-256 | 0294d5d0fce164d3fd22bb45de85d4b9122a5de37ea76343e5c438180313ebc5 |
Close
Hashes for opendal-0.37.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9bb890364cd06c04b84957520129981cb7bbf0c465261bc6f16efa354b7553c |
|
MD5 | 85b32a88c9169fe0a313c59851f28db2 |
|
BLAKE2b-256 | e8a13dda1b4401e3c350679a503ab5cc14b8d053b9c5ba3cdd6e5764b15dd46d |