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

Uploaded Source

Built Distributions

opendal-0.45.12-cp311-abi3-win_amd64.whl (14.8 MB view details)

Uploaded CPython 3.11+ Windows x86-64

opendal-0.45.12-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.6 MB view details)

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

opendal-0.45.12-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (15.7 MB view details)

Uploaded CPython 3.11+ manylinux: glibc 2.17+ ARMv7l

opendal-0.45.12-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (16.1 MB view details)

Uploaded CPython 3.11+ manylinux: glibc 2.17+ ARM64

opendal-0.45.12-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (30.0 MB view details)

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

File details

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

File metadata

  • Download URL: opendal-0.45.12.tar.gz
  • Upload date:
  • Size: 742.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for opendal-0.45.12.tar.gz
Algorithm Hash digest
SHA256 5b35a1abf6a30a6dc82e343a5c8403f245c89125cc037c2b89ed7803409c717c
MD5 457d37639a59845ff7b3a10e6a61556a
BLAKE2b-256 4dd4c6a035463c8f79f6acf0ae895be72c14b79a4889f933c295a1a17cb728d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for opendal-0.45.12.tar.gz:

Publisher: release_python.yml on apache/opendal

Attestations:

File details

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

File metadata

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

File hashes

Hashes for opendal-0.45.12-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c87f488c547e17174d53f98da1c25135595bf93c29bab731d732f55d993534e0
MD5 ef796fcf3faa1245542cea1e712a60a9
BLAKE2b-256 ad631bf0426289ef07cc27afb570653669a6a7d57d988d6f877ff852483b38cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for opendal-0.45.12-cp311-abi3-win_amd64.whl:

Publisher: release_python.yml on apache/opendal

Attestations:

File details

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

File metadata

File hashes

Hashes for opendal-0.45.12-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 389908b68845991f5bf4e75fbf1b415f14b02fab3201d01f5b3a9ae0030ee164
MD5 5f2ee6420eed1c4971f05b0fffd63637
BLAKE2b-256 180501655f602edd4525f0bfb9e2437a916a8a857e954eaa44f7f45379778452

See more details on using hashes here.

Provenance

The following attestation bundles were made for opendal-0.45.12-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release_python.yml on apache/opendal

Attestations:

File details

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

File metadata

File hashes

Hashes for opendal-0.45.12-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 6803edda7c0936722ecc5c2cf01fd84dcb520f11e1643f285605451df6b7c20b
MD5 3272a50555e380bc08b6940f5714bae6
BLAKE2b-256 d8bc29766fd6ecf50a8178346a3ff21d583193a65d86b9541144b6f6c244d014

See more details on using hashes here.

Provenance

The following attestation bundles were made for opendal-0.45.12-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl:

Publisher: release_python.yml on apache/opendal

Attestations:

File details

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

File metadata

File hashes

Hashes for opendal-0.45.12-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ec6fb9dc5021c5a62785fdf81a2d6ab97b65b8ef86ccded119fe242a10655263
MD5 fa3cac7809d3f2859d7b1e59acff9c40
BLAKE2b-256 e923ce63b7afe24ec1de350f0140ff9480c53f0a654755a8cdc5e20a9fc70f4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for opendal-0.45.12-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release_python.yml on apache/opendal

Attestations:

File details

Details for the file opendal-0.45.12-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.12-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 fd6551780194870867ed205135d5e7e2d411145d3cc4faa63830f54bbf48acdb
MD5 f47016da7501b2559bbbe3105215f25c
BLAKE2b-256 423b6c067f5910c360cb6e98e2f64569f394abc9a48db775738b154dff2d742e

See more details on using hashes here.

Provenance

The following attestation bundles were made for opendal-0.45.12-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release_python.yml on apache/opendal

Attestations:

Supported by

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