Skip to main content

Apache OpenDAL™ Python Binding

Project description

Apache OpenDAL™ Python Binding

Status PyPI Website

This package provides a native Python binding for Apache OpenDAL™, a data access layer that allows you to access various storage services in a unified way.

OpenDAL Python Usage Demo

Note: This binding has its own independent version number, which may differ from the Rust core version. When checking for updates or compatibility, always refer to this binding's version rather than the core version.

Useful Links


Features

  • Unified API: Access S3, GCS, Azure Blob, HDFS, FTP, and more with the same set of commands.
  • Native Performance: Built in Rust for high performance and safety.
  • Async Support: First-class async API for modern Python applications.
  • Easy to Use: Simple and intuitive API design.

Installation

Install the package directly from PyPI:

pip install opendal

Usage

Here are a few examples of how to use OpenDAL with different storage backends.

Local Filesystem (fs)

import opendal

# Initialize the operator for the local filesystem
op = opendal.Operator("fs", root="/tmp")

# Write data to a file
op.write("test.txt", b"Hello World")

# Read data from the file
content = op.read("test.txt")
print(op.read("test.txt"))

# Get metadata
metadata = op.stat("test.txt")
print(f"Content length: {metadata.content_length}") # Output: 11

Amazon S3

The API remains the same—just change the scheme and credentials.

import opendal

# Initialize the operator for S3
op = opendal.Operator(
    "s3",
    bucket="your_bucket_name",
    region="your_region",
    root="/path/to/root"
)

op.write("test.txt", b"Hello World")
print(op.read("test.txt"))
print(op.stat("test.txt").content_length)

Async Usage (s3)

OpenDAL also provides a fully asynchronous API.

import asyncio
import opendal

async def main():
    # Use AsyncOperator for async operations
    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

This project uses just as a command runner to simplify the development workflow.

  1. Clone the repository and set up the environment:

    # This will create a virtual environment and install all dependencies
    just setup
    
  2. Run tests:

    # Example: Run tests for the 'fs' operator
    OPENDAL_TEST=fs OPENDAL_FS_ROOT=/tmp just test
    

For a complete guide on building, testing, and contributing, please see our CONTRIBUTING.md file.


Used By

Check out the users list for more details on who is using 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

opendal_panoramax_fork-0.47.2-cp314-cp314t-manylinux_2_34_x86_64.whl (15.2 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.34+ x86-64

opendal_panoramax_fork-0.47.2-cp313-cp313t-manylinux_2_34_x86_64.whl (15.2 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.34+ x86-64

opendal_panoramax_fork-0.47.2-cp312-cp312-manylinux_2_34_x86_64.whl (15.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

opendal_panoramax_fork-0.47.2-cp311-abi3-manylinux_2_34_x86_64.whl (15.2 MB view details)

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

File details

Details for the file opendal_panoramax_fork-0.47.2-cp314-cp314t-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: opendal_panoramax_fork-0.47.2-cp314-cp314t-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 15.2 MB
  • Tags: CPython 3.14t, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for opendal_panoramax_fork-0.47.2-cp314-cp314t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ba5cbc253afb2827523b39dd5537bf1170cfa59438000b61d70a71bee4f6aaa0
MD5 3cb294df277e5713ed5b3a9e3fe64939
BLAKE2b-256 a7b8560922e3ff686c2968e634aee70faef551dab782208d6a1ca257ade77d6a

See more details on using hashes here.

File details

Details for the file opendal_panoramax_fork-0.47.2-cp313-cp313t-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: opendal_panoramax_fork-0.47.2-cp313-cp313t-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 15.2 MB
  • Tags: CPython 3.13t, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for opendal_panoramax_fork-0.47.2-cp313-cp313t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3e7f994921874f0e642b6f2bdf1d7885c424d9a8587daf118d12e51042cd5512
MD5 8d24db72932b231c79ee39bf681dda2f
BLAKE2b-256 f0428f2e26cdc88ab0a272649b835b06c30cf8f5269749436c3332372bb8a756

See more details on using hashes here.

File details

Details for the file opendal_panoramax_fork-0.47.2-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: opendal_panoramax_fork-0.47.2-cp312-cp312-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 15.2 MB
  • Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for opendal_panoramax_fork-0.47.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bcd426302bf8cdf5ce9d40e0e161d272fd3aefd31d9c24edab1a2f938f729ee0
MD5 54232e558042a280b600235ab2a30a6f
BLAKE2b-256 1c87cd60a5322b6df227575c52842e8708d0071b499d7684ab98a5f9e2bc3634

See more details on using hashes here.

File details

Details for the file opendal_panoramax_fork-0.47.2-cp311-abi3-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: opendal_panoramax_fork-0.47.2-cp311-abi3-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 15.2 MB
  • Tags: CPython 3.11+, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for opendal_panoramax_fork-0.47.2-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 57370ef85089a87fd4c55aade2e6c4d2354d3e93529b19260aa77574a62fc220
MD5 b3cef49c556f4ed78875a050142f7b02
BLAKE2b-256 d150f72d3591ef490e6f0688e04412a74b3d9fd26ab54de81e361563f1644870

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