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

Uploaded CPython 3.11+Windows x86-64

opendal-0.45.9-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.9-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.9-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.9-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (27.7 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.9.tar.gz.

File metadata

  • Download URL: opendal-0.45.9.tar.gz
  • Upload date:
  • Size: 727.0 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.9.tar.gz
Algorithm Hash digest
SHA256 de12996aa2d4d710fd7f6ce3391aa7840b369f4423080028ccf55bbd9e193b6a
MD5 419b04dae521e13abd589c4bee7361bf
BLAKE2b-256 08b6116c0c0fbcdc659262aa33e65100d0b25402ba04fca3b5f89af46221e05c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opendal-0.45.9-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.9-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 34ba5f29156f7b04e6483e8c6e87c34f3a74b1b21ca0d70eede0e28f1fdafaa2
MD5 124c8d6951756968e422ab4a21fd8548
BLAKE2b-256 0c94504b15a9f4ae9827ade21ce643e5d20ba3e2cdef23557174d964b8bd1ce8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.9-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ca5e43b7c8e605d36453a73187b2191798fb0fe6f5575428b8cab5bb4f6d4e40
MD5 67e8642303fcbbaa0a40e2c79fa73514
BLAKE2b-256 01f962d780f1098be23ab4da1a75a62f384f76e1cf3c3913aff49d7a209532c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.9-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 d58b44cfc0c317aa7ee1ce210f2640cf6494809fbf82960492aa069230f6a12c
MD5 c9844f0af879a5e5ea455c2a73f55f89
BLAKE2b-256 43cd9ab85e554cd679db719ca12fe9a0a91cc3a3ae7284a459c0d0163fe272f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.9-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 860f303ec24f7da60d4f04b172f9cb8e61a64457c83d786e36d25deeb6931d36
MD5 45ccecdf5fe64ea005d17095d4aaef88
BLAKE2b-256 1f9c52f81e54ade011a8b0a3f418919c6b3ecd6b7957e93f6dd494a0e0598790

See more details on using hashes here.

File details

Details for the file opendal-0.45.9-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.9-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 6d93e3681148a2693363be35c9b8dc1a8499d02c033f68f5b5b8c0859534b879
MD5 c17e5711a1606c6f70fc2500dccdd52d
BLAKE2b-256 1a5b073b08885aec4573b6618771dc1a3e7a665a3fdcf44265279871c4a5788e

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