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

Uploaded CPython 3.11+Windows x86-64

opendal-0.45.6-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB view details)

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

opendal-0.45.6-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.6-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.6-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.6.tar.gz.

File metadata

  • Download URL: opendal-0.45.6.tar.gz
  • Upload date:
  • Size: 703.5 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.6.tar.gz
Algorithm Hash digest
SHA256 a7bd341433778a5786c7232b7a5bff05d14ff5491ff190725a2db695bfcd1ffe
MD5 e9600c63420bfffe8df122436f9bfe2d
BLAKE2b-256 94292baf94e9131ee0b1ec56e6c959732114c5ff74ffd8e2b5e1cbd4ae9b07e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opendal-0.45.6-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 14.9 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.6-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 ddfac058ba55f8b520452b5a02e9dcf6035c014d2c8e591cd224a64fa778eeba
MD5 c7f9825de9652c03ce198b25b5ca5f9c
BLAKE2b-256 a124e2aa4b3330d68010e2ca219be200a7101eb79946e6fedeaaff9133799fc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.6-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 79ccaff9a10342f45dbd880647e501d258bf64b7d49656ba6831ff9d9e523369
MD5 26c675f73db6ce1ef2b0dc8ea8cff89c
BLAKE2b-256 e98827dfc6a02a816253b9d18b7f05760e12cd2400252592ce8b5d01f6dde110

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.6-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 d4c57da10f669cba178a5f91195ccc2bc8f2013d8d0df5cd468be0cb5e21cd2b
MD5 4dea32801af89c8d597c7da83c0bcf32
BLAKE2b-256 b4afd153f559236ec3675fca972ecd932134c23a5109df33b74f07382f8b18b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.6-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2e1f77096444cff48a2859db6aad3e2647db16d0bb8947638e3f022b333bd70c
MD5 f521bb3223ba96a17f34c2314e2501c9
BLAKE2b-256 4addd2603121d2a83a5773932bca4754bc1aa8624d4d4a072070370cb88bc1a6

See more details on using hashes here.

File details

Details for the file opendal-0.45.6-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.6-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e0df69e184de2dd1b1c33588b9960a25a42f59ff196990463c88c1c1cab9f168
MD5 0a4dd64e58f91f15a7b1b22a8fcd03f4
BLAKE2b-256 ba30c835b51a6ef5e4876e950fc39e3ba871409b511add0f5af29c03ba630b47

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