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.3-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.3-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.3-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.3-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.3-cp314-cp314t-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: opendal_panoramax_fork-0.47.3-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.3-cp314-cp314t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9f12972ede90380e346b20d8970df1085b5a76ed23d1ec68c18deb1888e89994
MD5 870386caf9ca64983c268d38f812bda0
BLAKE2b-256 87e8ea198291036a3878e1f87cef17da95f8ab4e2eac6cfe9818028dbee922f3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opendal_panoramax_fork-0.47.3-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.3-cp313-cp313t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ef61347bb2b410b24d20eaa062365abda36bd83fabb6e0051f3b1a1750d8e745
MD5 672d274098cdf3cb8e5556b2422e2907
BLAKE2b-256 a651701361326952b48ef42c83ecc82c7d4175ff31a92808349a5641048214a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opendal_panoramax_fork-0.47.3-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.3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fa8bd895bc367b72133314c39fa13a86aa7f7a73b16ae884cd48320dcbc0016a
MD5 1e4264b5007233ee574b1d61eb3c6ec7
BLAKE2b-256 3abde9147bd1f0fa698f260455117c44c7d253b1e19506bc3d6fc84077a57725

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opendal_panoramax_fork-0.47.3-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.3-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0339a28dd0135d08fbfe5e1089177c0023c5cbcd3d589d96e138c9d89aa7abbf
MD5 e6c7d462252d7101672bf7d8c8c8ed67
BLAKE2b-256 cb415fb389af3446c3f1af11511cd4eb2c9ae7ed0c48b120a0aa900f5006a603

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