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

Uploaded CPython 3.11+Windows x86-64

opendal-0.45.7-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.0 MB view details)

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

opendal-0.45.7-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (16.1 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARMv7l

opendal-0.45.7-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (16.6 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

opendal-0.45.7-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (30.5 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.7.tar.gz.

File metadata

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

File hashes

Hashes for opendal-0.45.7.tar.gz
Algorithm Hash digest
SHA256 67ec8c1889cfd2026db4c00f282ad33e0f136af88706599cf6a8c7105864ca8d
MD5 25ba2decd2c230c73eb6191ea44d0d75
BLAKE2b-256 f493dd1253e2841d653e3ab2eaab012f335cc45b22962a0f9fd1493627cce21f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for opendal-0.45.7-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6833450d693e3b1d1dbcfc8478d461a46f4756f4bf423477ecd9484d03aa57fe
MD5 0f8e2c6a40d4f03d9ed0481d54fbb69f
BLAKE2b-256 5ba2b51a93f75b5c2319b563d6b9db74260bc1009158f29bd588e85e4ad08fa4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.7-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2700223ac91607556e1bad998b178ed912622931823de968a14514a07147e863
MD5 ffe7bb2faf4f351f04cc70eceda32cab
BLAKE2b-256 a7e3c658d51ff496d6a1a4a01255e8dd6977006b3a118e3a50a43a7b58f42341

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.7-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 06b032a67cb1654de033bcf1d25ef7a54aa55aef1d5c053482c1a152e064bba0
MD5 c744981d8096320413f3e0f2c5542cc0
BLAKE2b-256 78ef3fd28cdbb0754ba6d3a1eadcaca47caf8457da39b9698a93fc838d0e4343

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.7-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 90fc9138e14c6864fd9fa15d77a3e0f16a7f29262b03a0edea6677ba071ac64a
MD5 676f2fec3ec33f74eecf5d0987fabbeb
BLAKE2b-256 9845ebb928af72f594fdc9295b02995b19fea6e1f436ab3e3330826b176e8ec0

See more details on using hashes here.

File details

Details for the file opendal-0.45.7-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.7-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 29749f52f80404ff3e3ef40d55fec484138081a4f8d8775a186d3a418292810c
MD5 496d3266f69edb8af7918f58e1c4a650
BLAKE2b-256 fb6ccd6e26232ff515f4d4660587e630e6c5b7a8ffe87851caee3c242699d351

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