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:

# Ensure the dependencies are installed
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.13.tar.gz (759.8 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.13-cp311-abi3-win_amd64.whl (15.1 MB view details)

Uploaded CPython 3.11+Windows x86-64

opendal-0.45.13-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB view details)

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

opendal-0.45.13-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (15.8 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARMv7l

opendal-0.45.13-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (16.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

opendal-0.45.13-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (30.3 MB view details)

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

opendal-0.45.13-cp310-cp310-win_amd64.whl (15.1 MB view details)

Uploaded CPython 3.10Windows x86-64

opendal-0.45.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

opendal-0.45.13-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (15.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARMv7l

opendal-0.45.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (16.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

opendal-0.45.13-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (30.3 MB view details)

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

File details

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

File metadata

  • Download URL: opendal-0.45.13.tar.gz
  • Upload date:
  • Size: 759.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.8

File hashes

Hashes for opendal-0.45.13.tar.gz
Algorithm Hash digest
SHA256 ed818dd564beeace57a040f65415525838ad78c20bdffdbe0ba54281e7f17064
MD5 ce6a8a865654a91b273c6985dff17add
BLAKE2b-256 f51d6a6ddbd83992d6b12d50496503a9fd86fa421313c19ed4e8040dd72c58ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.13-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 ab187174dede49a7e9821a4d4792676a62c887279465d33624009e720a086667
MD5 241a7d26d88ba61ebcc783e21417e733
BLAKE2b-256 9886efefc13265a1b6ec4df4409fdb4bb20e2526d8ba8c9cbc0e6823f60add79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.13-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 606e99a147de8a0a41285fb240e0280fea6a7436fe3f7341815157bce69104d6
MD5 4edc8a58ee02f78de0a6cfa07552babf
BLAKE2b-256 7366d05669ed36bf81332e6ddd3515bad9f082e541d82ee3568429e1ac3a41eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.13-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9fb89b30ee3cb8fd432ada45be0ae9dad9d7483e1e1db22deb3074ef61a194ca
MD5 6116ad08d41a81637b8ee3505e7021ee
BLAKE2b-256 13905bb8ba10468d2795164643363febb682410bbd38a2ea2c2fd05004b73b19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.13-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f1987cc0ac3e05ebcd963b431a0c05607d9a9d7ed204ba8053258f812434b262
MD5 481520c4c37441f3e0499a37289c6706
BLAKE2b-256 cff2e4895d3f009f2d17c4457eb332bc39e7416ab15f9588879ca77e21ad894c

See more details on using hashes here.

File details

Details for the file opendal-0.45.13-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.13-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 4b8faf7f780849c6bd777528080864c6c5e46e61488fafb8d2dcb0f9e4e88845
MD5 ab82499685a8b6cbbaf4cbdec1e05103
BLAKE2b-256 abd8c0bf513e8362d2f34530c9609661b578ede80a40b7479e04cb4749e50b70

See more details on using hashes here.

File details

Details for the file opendal-0.45.13-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for opendal-0.45.13-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e451e1ae63343d07fa57225417e898639240083d2a53ecd7dbafa72254f058bd
MD5 15848e34f4bc33f713f55cadd6f98895
BLAKE2b-256 c930d7a8c96ccf8dece0c5f180d8e6e8243f600dbe5985383bc7995dc8358d9b

See more details on using hashes here.

File details

Details for the file opendal-0.45.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for opendal-0.45.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 122942d8185b441774d566c6970b0012ffde9370282c4384c84e6eaa793d4891
MD5 cd5919a34517f697b5ecdda4bff9a18f
BLAKE2b-256 e6b397ac82cb3ace08203194b04c721ff508b37234eff0b3212885991d500f61

See more details on using hashes here.

File details

Details for the file opendal-0.45.13-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for opendal-0.45.13-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 5cb06d73cc93a13e1a4faa2f369ffe64726f459e53358058720d67efec6dd5fd
MD5 722ab3750d8bec037b3d9632cebef978
BLAKE2b-256 bf594ad16b953084c47b327098d6f7ec3552b99c69e0d2beecc40cc09432d027

See more details on using hashes here.

File details

Details for the file opendal-0.45.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for opendal-0.45.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3a0062482d348617abdc89515fa9cea5c17ae8ac28694b8b5a704530eb91c90e
MD5 12ba8f933c52846fce206d0c062115ab
BLAKE2b-256 7ea99a317e1c8387bd41c4745e6ae320f443dbc38897fa54623dd1b86b88deeb

See more details on using hashes here.

File details

Details for the file opendal-0.45.13-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for opendal-0.45.13-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 3afe389215249b1d067cace6b8d1259ab1a2a74bc963d1c7e47dac5e85c8ffc5
MD5 7269ebfdd77d7ccec0ab3ab799e2fb47
BLAKE2b-256 1299219d24bd99cd86cccfe1589af6fbad4cae4b561c778382a452c97f227ac8

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