Coder Social home page Coder Social logo

kkxiaotikk / opendal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/opendal

0.0 1.0 0.0 3.06 MB

OpenDAL: Access data freely, painlessly, and efficiently

Home Page: https://opendal.databend.rs

License: Apache License 2.0

Shell 0.18% Rust 99.82%

opendal's Introduction

OpenDAL โ€ƒ Build Status Latest Version Crate Downloads

Open Data Access Layer: Access data freely, painlessly, and efficiently


You may be looking for:

Services

Features

Access data freely

  • Access different storage services in the same way
  • Behavior tests for all services

Access data painlessly

  • 100% documents covered
  • Powerful Layers
  • Automatic retry support
  • Full observability support: logging, tracing, metrics.
  • Native decompress support
  • Native service-side encryption support

Access data efficiently

  • Zero cost: mapping to underlying API calls directly
  • Auto metadata reuse: avoid extra metadata calls

Quickstart

use anyhow::Result;
use futures::StreamExt;
use futures::TryStreamExt;
use opendal::ObjectStreamer;
use opendal::Object;
use opendal::ObjectMetadata;
use opendal::ObjectMode;
use opendal::Operator;
use opendal::Scheme;

#[tokio::main]
async fn main() -> Result<()> {
    // Init Operator
    let op = Operator::from_env(Scheme::Fs)?;

    // Create object handler.
    let o = op.object("test_file");

    // Write data info object;
    o.write("Hello, World!").await?;

    // Read data from object;
    let bs = o.read().await?;

    // Read range from object;
    let bs = o.range_read(1..=11).await?;

    // Get object's path
    let name = o.name();
    let path = o.path();

    // Fetch more meta about object.
    let meta = o.metadata().await?;
    let mode = meta.mode();
    let length = meta.content_length();
    let content_md5 = meta.content_md5();
    let etag = meta.etag();

    // Delete object.
    o.delete().await?;

    // List dir object.
    let o = op.object("test_dir/");
    let mut os = o.list().await?;
    while let Some(entry) = os.try_next().await? {
        let path = entry.path();
        let mode = entry.mode().await?;
    }

    Ok(())
}

More examples could be found at Documentation.

Projects

  • Databend: A modern Elasticity and Performance cloud data warehouse.
  • GreptimeDB: An open-source, cloud-native, distributed time-series database.
  • deepeth/mars: The powerful analysis platform to explore and visualize data from blockchain.

Contributing

Check out the CONTRIBUTING.md guide for more details on getting started with contributing to this project.

Getting help

Submit issues for bug report or asking questions in discussion.

License

Licensed under Apache License, Version 2.0.

opendal's People

Contributors

arbersephirotheca avatar clslaid avatar d2lark avatar damooo avatar dependabot[bot] avatar killme2008 avatar messense avatar mqudsi avatar ranxy avatar strrl avatar sundy-li avatar sunng87 avatar teckick avatar wenyxu avatar wfxr avatar xprazak2 avatar xuanwo avatar youngsofun avatar zhihanz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.