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

Uploaded CPython 3.11+Windows x86-64

opendal-0.45.5-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.9 MB view details)

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

opendal-0.45.5-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (15.9 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARMv7l

opendal-0.45.5-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (16.5 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

opendal-0.45.5-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (30.2 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.5.tar.gz.

File metadata

  • Download URL: opendal-0.45.5.tar.gz
  • Upload date:
  • Size: 703.8 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.5.tar.gz
Algorithm Hash digest
SHA256 52d6117197d7da86fed109faed47996c971e8ecd10b2679aff2c7e54363b5e05
MD5 ceebf75cbe832a7f4a7bfdc2b989b5e4
BLAKE2b-256 93b2d3dcf384f4077247c00ef7938e0f4f43029ab0f7e309d936d9e97307312f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opendal-0.45.5-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 15.0 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.5-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9c65e8ac5eb8a1e1ac52a89fb6a12220356ff1e8559caeea8cb9edb43858af42
MD5 64cdc4378e05d529222d73157c72f966
BLAKE2b-256 3d10f3d2fd7608a9029ee17f7228ab032b9a318f13a48362f9d3977bf16ef5a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.5-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 81201040573a41a4fd8035f7c2ea83f0eecb2d0db83cb180278e02a45fd1840a
MD5 14da47d717bc3d9c66837d55122cac77
BLAKE2b-256 42dc8bafb9938cb80e7420cbf6a3f083072a19ed701a8a0a8a8b17641b6191ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.5-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 e25dca5d3e1c88a25627b3626a767252ecf7c2f3b097b91f3ae223246433790c
MD5 e06eea3ce630be387e65f87fa98fffb9
BLAKE2b-256 aa28318e608afde256d16efc67755e07b7854006f3b5610b71f645ad9b42e6f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.5-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 72e78b2168d0a8cdb6c7d80ed1ee948e9ab5957f28976ae07ee10819e569d030
MD5 65efa66164491832316219fc79ddf601
BLAKE2b-256 a0ed068f877f3bd958a055ed611909fbde22b7adc82620f39b011ef58095bae1

See more details on using hashes here.

File details

Details for the file opendal-0.45.5-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.5-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 1051a41751fa499cebefd223ed84de7616b684ec38d95ca89fa86c8be7b7fed7
MD5 d36033c56acc229980b2e6809b4af9bf
BLAKE2b-256 3a608a9e7b10ea57a9f73ab912c64157648fcb26b4d908d784cdbca2ac2da401

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