OpenDAL provides a unified, simple, efficient, reliable, and observable data access layer, allowing developers to seamlessly use different storage services and enjoy the best user experience.

OpenDAL not only simplifies the interface of different storage services, but also provides features such as automatic retry, request optimization and observability. Developers only need to use OpenDAL to painlessly access dozens of storage services without knowing and mastering the details of a specific SDK.

characteristic:

  • Supports a variety of storage services, including dozens of services such as local file systems, HDFS, S3, and OSS.
  • Provide a unified data access interface without caring about the details of the underlying storage.
  • Supports a variety of common data operations, including read ,write ,list wait.
  • Support automatic retry, request optimization, observability mechanism.
  • No cost, maps directly to API calls.
  • Cross-language bindings: Python, Node.js, C (working on) etc.

quick start

use opendal::Result;
use opendal::layers::LoggingLayer;
use opendal::services;
use opendal::Operator;

#[tokio::main]
async fn main() -> Result<()> {
    // Pick a builder and configure it.
    let mut builder = services::S3::default();
    builder.bucket("test");

    // Init an operator
    let op = Operator::create(builder)?
        // Init with logging layer enabled.
        .layer(LoggingLayer::default())
        .finish();

    // Write data
    op.write("hello.txt", "Hello, World!").await?;

    // Read data
    let bs = op.read("hello.txt").await?;

    // Fetch metadata
    let meta = op.stat("hello.txt").await?;
    let mode = meta.mode();
    let length = meta.content_length();

    // Delete
    op.delete("hello.txt").await?;

    Ok(())
}

For more examples seedocument.

#Apache #OpenDAL #Homepage #Documentation #Downloads #Free #Easy #Efficient #Access #Data #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *