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.8.tar.gz (712.7 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.8-cp311-abi3-win_amd64.whl (13.7 MB view details)

Uploaded CPython 3.11+Windows x86-64

opendal-0.45.8-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.4 MB view details)

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

opendal-0.45.8-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (14.6 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARMv7l

opendal-0.45.8-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.1 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

opendal-0.45.8-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (24.8 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.8.tar.gz.

File metadata

  • Download URL: opendal-0.45.8.tar.gz
  • Upload date:
  • Size: 712.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for opendal-0.45.8.tar.gz
Algorithm Hash digest
SHA256 826d0f3a582a3227033ddb9bac6995b30bd28982ecb91f08b97d799666057b2c
MD5 14ae6f8e15f254cb69cf734b058b8532
BLAKE2b-256 8aa4f20cc9c6cca5bb12758447bdaf4d9cbd4df74ec53a1ca07441685482c758

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for opendal-0.45.8-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 85b3e8ad7d9e9a45a50444f33f95602c69a9caadef561ed1703325e2c4a63339
MD5 9b6ea76eb48c910afd399a5424679537
BLAKE2b-256 00a95ca511811ce120a31e0d6644e3bedcdc4632892a3740f102903f0a69b585

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.8-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6ef654bb38f86a4629308e20ee28f1fd3bc5fb6f089bc766bdcbc293feb450f
MD5 4bac4afb7b9d3736e738eda7b76d4ecb
BLAKE2b-256 71430f796ea9b2f6d1730049e70591153808f9fbf4e45666eb82835c325db762

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.8-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 2df3f6a2395f1ef98aef44130c5795d7b42e25eaeecf1209f2587502bf8b9a47
MD5 cb6a18b624e13a143faa75adef71a4a3
BLAKE2b-256 14dcb6d0b24e00e3db45c0885821edfcfe40ed0ddc8f5a6fbb82ae21d051cd14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.8-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 94a0c571617a9b20f17942534a66dc97053c3c0e46a08895aa26438fc433f713
MD5 cba54cd464e5388b042c1e46abffbb97
BLAKE2b-256 e7a905c43453016ba73583381660a83304f4c98b6b1596e39d89eb9965c415fa

See more details on using hashes here.

File details

Details for the file opendal-0.45.8-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.8-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 d32c87f433b4625c12334a92fe0d3a1c23f620f7af29fa64f232c362b9c35e6c
MD5 2d1013c809807598ac5b3135ea111842
BLAKE2b-256 9e436a2a8f9bc168c2fc55bf3dbea8d6219f5708a79c2a4a3e47fcfec0c02ef5

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