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

Uploaded CPython 3.11+Windows x86-64

opendal-0.45.4-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.6 MB view details)

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

opendal-0.45.4-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (15.7 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARMv7l

opendal-0.45.4-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (16.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

opendal-0.45.4-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (29.8 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.4.tar.gz.

File metadata

  • Download URL: opendal-0.45.4.tar.gz
  • Upload date:
  • Size: 702.3 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.4.tar.gz
Algorithm Hash digest
SHA256 bc31fa5e97194433de0f7ea3e8e545d44b945880dfb0781a3c1873bfa08bb29d
MD5 097befed5f4811ebda6750f86365da91
BLAKE2b-256 f66c12031f6dc4dce6fe76d62972cc24fa3159e6d972e5b10ab623df0ebeee69

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opendal-0.45.4-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 14.7 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.4-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 69418f6ee3d98e1267257fd01b81b633d2f72a96a8021eaf1de8213cea51047e
MD5 320a19af3c4a5bd280f905701cf2fc46
BLAKE2b-256 c6cc0615d087b997e5947352e4f498378476abf321b513e37b70ae767796ca9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.4-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 43e00ba9cdeeec4b127372ad10185c64a5cb5b0474b7902ab22e092f3958e5c3
MD5 f9242010d6bc62571e81850edac550fa
BLAKE2b-256 12d9a11c135b973d6128f3d0b7945ac6d6fd746352602ba6f29b4b6d5d699e93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.4-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 09bde351dd35ca98bfd7ffc99c8f9cff40e3062bd7e9abc909c701ff16f509e6
MD5 deece2b097020e179c6d352dbdf7467d
BLAKE2b-256 149719021b8726c34d4d85c60ef1dfe74c4a89ee4295c26aa36c7bccadda6714

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opendal-0.45.4-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0257f51fa538380b5afcdc655c1231196decbe2540dee2402151414301dca045
MD5 df5955270024c3c772eb70fb1db488a8
BLAKE2b-256 221501a26ed7f8bc39039c07a46b01500e173587d7fac4f4f2e54b9ebccb28ab

See more details on using hashes here.

File details

Details for the file opendal-0.45.4-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.4-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 b6451390f76c7c429a057715533a10c50543cda919565c7fea2a4d97dff7ef02
MD5 49590fd78bd5620f751990476f769012
BLAKE2b-256 2ca097029eb3b7a6402d414cf4cb452e38b396ec9223143bf358b2b3de0961ad

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