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.1.tar.gz
(452.5 kB
view hashes)
Built Distributions
Close
Hashes for opendal-0.38.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 279353e91b754ed6f93a6b5f26928b77cdc16be7adbc3c1cc60364a114ffb490 |
|
MD5 | 2009a3d2a2c3a5b700968209debd431a |
|
BLAKE2b-256 | f56ad0c156f3c9e5469466d4264c73b0648d86eb0692c88c75a6644077ec5907 |
Close
Hashes for opendal-0.38.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a6b775f04b240d05ba59ffea995cc509fe6f0dadc3fcf893f439d7d66e4190e |
|
MD5 | f72837b7e0549f96a1cf2e2dee99b806 |
|
BLAKE2b-256 | c449b75024bf74b7c09aa3841f80427057852a167bfe41b42c15d46ef74711ad |
Close
Hashes for opendal-0.38.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95e008199d33387a2cdcb004d314f9a3f132ff6ceb5cafafb90e5722bdd53fe5 |
|
MD5 | 0c46c346d22350d365146e37e900dede |
|
BLAKE2b-256 | 27c1dd275b94a9fce88d926d8e346ff107eae4a6b7522de766861ee6a2b2b2c1 |