Skip to main content

Apache OpenDAL™ Python Binding

Project description

Apache OpenDAL™ Python Binding

PyPI Website

Documentation: main

This package intends to build a native python binding for Apache OpenDAL.

Installation

pip install opendal

Usage

fs service example:

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())

s3 service example:

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:

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:

python -m venv venv

Activate venv:

source venv/bin/activate

Install maturin:

pip install maturin

Build bindings:

maturin develop

Run some tests:

maturin develop -E test
# To run `test_write.py` and use `fs` operator
OPENDAL_TEST=fs OPENDAL_FS_ROOT=/tmp pytest -vk test_write

Build API docs:

maturin develop -E docs
pdoc -t ./template 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.

Project details


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.45.3.tar.gz (700.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

opendal-0.45.3-cp311-abi3-win_amd64.whl (14.9 MB view details)

Uploaded CPython 3.11+Windows x86-64

opendal-0.45.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (52.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

opendal-0.45.3-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (50.5 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARMv7l

opendal-0.45.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (52.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

opendal-0.45.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (31.5 MB view details)

Uploaded CPython 3.11+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file opendal-0.45.3.tar.gz.

File metadata

  • Download URL: opendal-0.45.3.tar.gz
  • Upload date:
  • Size: 700.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for opendal-0.45.3.tar.gz
Algorithm Hash digest
SHA256 6c801abd374fd7fc5ec9d455f00b35e9e558a1f436cb5e2414366b6f8e0964d8
MD5 f5e33f437e19d7ffaadd1421afcb193d
BLAKE2b-256 8a253b8d9f535c685047cc5376e5684d4333496b45015c867814c87553a69d8d

See more details on using hashes here.

File details

Details for the file opendal-0.45.3-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: opendal-0.45.3-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 14.9 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for opendal-0.45.3-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b1cfe334518816e9cb2459a1a75a7eaba864129aa9f266ff6f71fceaaa70face
MD5 4681da1d7df7ca20151b9c7866252782
BLAKE2b-256 80c96669293fe8a5a59505ac6c7e37f5738dc58c1767523a8add91987d521866

See more details on using hashes here.

File details

Details for the file opendal-0.45.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for opendal-0.45.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e5809f546e705a21f73e0d4c1a3ddc6e14e505a8ecebd8949d75aad818259cb
MD5 82b072500156ff5e91afe2df2f76d93f
BLAKE2b-256 4d757a6dcbd11d4bcc1a4ea9e042b152395355ee1d3bdd000de7ee2fe04b0d12

See more details on using hashes here.

File details

Details for the file opendal-0.45.3-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for opendal-0.45.3-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 01aec21454490eaad62295d2ac60b969d790ce4b0809e50a8c36b384332a8325
MD5 c6ac24a1dd1f09786a37a6f78a9feccd
BLAKE2b-256 51dafa5741716ae0fb08dfde093d42779975d02736b55418dbcb19f677d914a9

See more details on using hashes here.

File details

Details for the file opendal-0.45.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for opendal-0.45.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 57673ecc6bb8e4638e7c4fa978433c5acd85e1b6699c22fb22bc4ed7665947bd
MD5 4b4d13883abe032bd7c0eed34133bc09
BLAKE2b-256 d07f995ae8323edc57efbdf8a243d1a8bf3b1f8b5f82d327a185ce29453ea687

See more details on using hashes here.

File details

Details for the file opendal-0.45.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for opendal-0.45.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 8342bf4d19d9bf976d1abea8e7ed67f8387f8dce2ad001abbf50b271da6f8fa9
MD5 7f3296b6977d1837dc04807a3dcddf73
BLAKE2b-256 677bf34bf367fd0691219cd17079f84c0616333c9cd7d3947653a6d466bd4e42

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page