Skip to content

Nycto/S3cala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An non-blocking S3 client written for Scala

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages