<commit_before># scredis

Scredis is an advanced [Redis](http://redis.io) client entirely written in Scala. It has been (and still is) extensively used in production at Livestream.

* [Documentation](https://github.com/Livestream/scredis/wiki)
* [Scaladoc](http://livestream.github.io/scredis/api/snapshot/)
 
> Redis v2.8.x commands are now supported! Scredis v1.1.0 has been released with the following [changes](https://github.com/Livestream/scredis/releases/tag/v1.1.0-2.10).

## Features
* Supports all Redis commands up to v2.8.x
* Native Scala types and customizable parsing
* Asynchronous and synchronous commands processing
* Transactions, pipelining and configurable automatic pipelining
* Customizable timeouts and retries on a per-command basis
* Client pooling

## Getting started

### Binaries
Scredis is compatible with Scala 2.9.x and 2.10.x. Binary releases are hosted on the Sonatype Central Repository.

```scala
resolvers += "Sonatype OSS Releases" at "https://oss.sonatype.org/content/repositories/releases/"

libraryDependencies ++= Seq("com.livestream" %% "scredis" % "1.1.0")
```

Snapshots are hosted on a separate repository.

```scala
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"

libraryDependencies ++= Seq("com.livestream" %% "scredis" % "1.1.0-SNAPSHOT")
```

### Quick example
```scala
import scredis._
import scala.util.{ Success, Failure }
// Creates a rich asynchronous client with default parameters.
// See reference.conf for the complete list of configurable parameters.
val redis = Redis()

// Import the default execution context for working with futures
import redis.ec

// Futures handling
redis.hGetAll("my-hash") onComplete {
  case Success(content) => println(content)
  case Failure(e) => e.printStackTrace()
}

// Explicit pipelining
redis.pipelined { p =>
  p.hSet("my-hash")("name", "value")
  p.hGet("my-hash")("name")
}

// Executes a synchronous command, or any other command synchronously<commit_msg>Set current snapshot version to 1.1.1-SNAPSHOT<commit_after># scredis

Scredis is an advanced [Redis](http://redis.io) client entirely written in Scala. It has been (and still is) extensively used in production at Livestream.

* [Documentation](https://github.com/Livestream/scredis/wiki)
* [Scaladoc](http://livestream.github.io/scredis/api/snapshot/)
 
> Redis v2.8.x commands are now supported! Scredis v1.1.0 has been released with the following [changes](https://github.com/Livestream/scredis/releases/tag/v1.1.0-2.10).

## Features
* Supports all Redis commands up to v2.8.x
* Native Scala types and customizable parsing
* Asynchronous and synchronous commands processing
* Transactions, pipelining and configurable automatic pipelining
* Customizable timeouts and retries on a per-command basis
* Client pooling

## Getting started

### Binaries
Scredis is compatible with Scala 2.9.x and 2.10.x. Binary releases are hosted on the Sonatype Central Repository.

```scala
resolvers += "Sonatype OSS Releases" at "https://oss.sonatype.org/content/repositories/releases/"

libraryDependencies ++= Seq("com.livestream" %% "scredis" % "1.1.0")
```

Snapshots are hosted on a separate repository.

```scala
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"

libraryDependencies ++= Seq("com.livestream" %% "scredis" % "1.1.1-SNAPSHOT")
```

### Quick example
```scala
import scredis._
import scala.util.{ Success, Failure }
// Creates a rich asynchronous client with default parameters.
// See reference.conf for the complete list of configurable parameters.
val redis = Redis()

// Import the default execution context for working with futures
import redis.ec

// Futures handling
redis.hGetAll("my-hash") onComplete {
  case Success(content) => println(content)
  case Failure(e) => e.printStackTrace()
}

// Explicit pipelining
redis.pipelined { p =>
  p.hSet("my-hash")("name", "value")
  p.hGet("my-hash")("name")
}

// Executes a synchronous command, or any other command synchronously
{'fraction_non_alphanumeric': 0.1232403062484564, 'fraction_numerical': 0.012595702642627809, 'mean_word_length': 4.728429985855729, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '580491', 'n_tokens_mistral': 1346, 'n_tokens_neox': 1269, 'n_words': 386}