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.10.tar.gz (728.3 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.10-cp311-abi3-win_amd64.whl (14.5 MB view details)

Uploaded CPython 3.11+Windows x86-64

opendal-0.45.10-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.2 MB view details)

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

opendal-0.45.10-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (15.5 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARMv7l

opendal-0.45.10-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (16.0 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

opendal-0.45.10-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (29.3 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.10.tar.gz.

File metadata

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

File hashes

Hashes for opendal-0.45.10.tar.gz
Algorithm Hash digest
SHA256 310d63a199c9e08e4de2378e217ba56d6f050119aabb10b5129f8b5844631fc3
MD5 ee9aede71d801e6118a9609c948c8f76
BLAKE2b-256 d4459e31908aaa8cde88d10173a5d85b484387e2ff49185ad9538c302213cfaa

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for opendal-0.45.10-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f288991fdd5a24b10a8176c66c637711fe1e1fe725c0db116233e639d067cbde
MD5 43d9fa7812b77f48139a9163741a22f2
BLAKE2b-256 f4530390daaec5db4ef06e7f1d144bc16876b0a471c543ec300703c66748efa9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.10-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5eac0577b57ebfd7d60bd1423b73fd4366eec020fb72b5bd8ee35259233784fb
MD5 7467508f87681a38c903bcfe0bcf529f
BLAKE2b-256 dfcaf1321a7e1619eafd80f4ab28dbaa9481d73cb1ef2cd21a1f70dff9463fd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.10-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 cf5bc06dcc199829a03685a2da49fcf796c7d18d85892ca6747e3c489b6bca22
MD5 6583e792c15088841b4ab4512d82c2b3
BLAKE2b-256 1d0683800d671b9722e4c521ec6e282094e3e546ecb5a972bf4e754751d0ae62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.10-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1d714f1e9afea16e173095ffca24df08313fee35ac519c39a67ce2010b05ef7f
MD5 f872afedc4d2a0a2f9b05cbc3fc4b639
BLAKE2b-256 e606dc800ae5bd1180e1d6c986386e81fd9b03b3cb6fd69c8efa0a54f92b19cf

See more details on using hashes here.

File details

Details for the file opendal-0.45.10-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.10-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 16db1092a831d58beecfba858e2cc25624fcba7e57e3499c368ea2f0aa4f9030
MD5 10a4a5a1361ee42dc3007bd08f0fee1a
BLAKE2b-256 44d5eb739fac7e4c6052185ec14d120dd8a6facb60d51c229b2f0df77e8ddacc

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