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

Uploaded CPython 3.11+Windows x86-64

opendal-0.45.11-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.3 MB view details)

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

opendal-0.45.11-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.11-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.8 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

opendal-0.45.11-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (29.4 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.11.tar.gz.

File metadata

  • Download URL: opendal-0.45.11.tar.gz
  • Upload date:
  • Size: 740.0 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.11.tar.gz
Algorithm Hash digest
SHA256 caad0dc4ce3d59d52b224d49f1edaf5efb65bbd18f5476957130f41944dabb33
MD5 03407cba65104a8ac6cc554a6032cfb9
BLAKE2b-256 b7c29bff01d8e59c1b168d3ce0c642bbe61841118a330e10d1d4cbf8a0ffc09c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opendal-0.45.11-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 14.4 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.11-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9bd4bdac96a6f0d21cc933f0ea11100c0c8be0c157e0d81f138a66a56c8ca789
MD5 006a66108e230f3d1fc65a63c1328797
BLAKE2b-256 f86880b17a403dcddd8be342b348cb007ef2c151d4fb7fa9f9c71fe354a5ac4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.11-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e984f317ab871dc75b65028ec0c1451cc6faa41d105443b749d7d6a3440cd31d
MD5 b68a85d3637eac2738b67d79d40f91a6
BLAKE2b-256 3d61a9dfe04443585967e313c68083644bffcb485cfc00f639845ff99e5b56c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.11-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 ad22109a3ad837b34ee181222c5c5cd53888f57a57253259024357f668e8224a
MD5 514d90e14861a8a748aedf87ad614313
BLAKE2b-256 cd9cb92d6bf214f039aa43ec8a35c1a03eb422ea7484088aed3e55fd23626a4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.11-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 718b782ff2909ca2599c0de326f0fa613063a2a6b18738d6702844c963536e0b
MD5 2e1a674d80361390157ed8e910e7794d
BLAKE2b-256 7e4b54b50be2ecdcc6353e54d2809add3bb5ae5df982c22ba137c7d7ee4723f9

See more details on using hashes here.

File details

Details for the file opendal-0.45.11-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.11-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 31cb8fff90775c72dd55e7ce12df23784a19b7b8baaa41dcbc1a2e983f3e3e6b
MD5 983bc657c5def72dd07ed36da59993d5
BLAKE2b-256 6bdc3ddc7f0eb393cd1c5c7b700fd2d9557cf5dd283ab98ab0a9093446c3011d

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