An non-blocking S3 client written for Scala
Scala
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
project
src/main/scala/s3cala
.gitignore
.travis.yml
LICENSE.md
README.md
build.sbt

README.md

S3cala Build Status

A non-block S3 client for Scala

Usage

This project is not production ready; use at your own risk.

Example Usage

Internally, S3cala is a thin wrapper around the AWS Java SDK. It adapts the asynchronous API to use Scala's Futures, making it incredibly easy to use.

package org.example.s3cala

import com.roundeights.s3cala
import import java.io.InputStream

object Main extends App {

    val client = S3("yourAwsAccessKey", "yourAwsSecretKey")

    // "get" returns a Scala Future
    val future = client.bucket("BucketName").get("Key")

    future.onSuccess {
        case stream: InputStream => {
            // Do work with your input stream...

            client.close
        }
    }

    future.onFailure {
        case err: Exception => {
            println( err.getMessage )
            client.close
        }
    }

}

License

S3cala is released under the MIT License, which is pretty spiffy. You should have received a copy of the MIT License along with this program. If not, see http://www.opensource.org/licenses/mit-license.php.