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.36.1.tar.gz
(419.4 kB
view hashes)
Built Distributions
Close
Hashes for opendal-0.36.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bd098026f64f4b41018964f17909ad06041d32acbe727b73b5ce54977c47478 |
|
MD5 | 78f1fefa71681194ea7351542f3b44ef |
|
BLAKE2b-256 | 228a371f5bc236e4d2d3c9cef76189076e477dd717d85319414a3c791b1ad344 |
Close
Hashes for opendal-0.36.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5560d87b97193f4fecf83b8e9f1acb2220a07b828a2f1cf699a86b03f5f6a87 |
|
MD5 | 64baba9fd438a58b83ac95310f62f9b9 |
|
BLAKE2b-256 | 0de43066517132eb748a3ad1d88e7b2daa91c14569fc891c665bcc011378791b |
Close
Hashes for opendal-0.36.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44aeae9b52446bc4a527cb77dfe821b2df8641dbe22a3d2e6a6a9c0092ddb300 |
|
MD5 | 8bb9d909d73750973cabe616528ecb8d |
|
BLAKE2b-256 | 9c232c5f4a36ac6434c1b25b59c113b7f718bcb499dee64655a2254c2e419c12 |