Scala
made by https://0x3d.site
GitHub - lloydmeta/enumeratum: A type-safe, reflection-free, powerful enumeration implementation for Scala with exhaustive pattern match warnings and helpful integrations.A type-safe, reflection-free, powerful enumeration implementation for Scala with exhaustive pattern match warnings and helpful integrations. - lloydmeta/enumeratum
Visit Site
GitHub - lloydmeta/enumeratum: A type-safe, reflection-free, powerful enumeration implementation for Scala with exhaustive pattern match warnings and helpful integrations.
Enumeratum
Enumeratum is a type-safe and powerful enumeration implementation for Scala that offers exhaustive pattern match warnings,
integrations with popular Scala libraries, and idiomatic usage that won't break your IDE. It aims to be similar enough
to Scala's built in Enumeration
to be easy-to-use and understand while offering more flexibility, type-safety (see this blog
post describing erasure on Scala's Enumeration
), and
richer enum values without having to maintain your own collection of values.
Enumeratum has the following niceties:
- Zero dependencies
- Performant: Faster than
Enumeration
in the standard library (see benchmarks) - Allows your Enum members to be full-fledged normal objects with methods, values, inheritance, etc.
ValueEnum
s that map to various primitive values and have compile-time uniqueness constraints.- Idiomatic: you're very clearly still writing Scala, and no funny colours in your IDE means less cognitive overhead for your team
- Simplicity; most of the complexity in this lib is in its macro, and the macro is fairly simple conceptually
- No usage of reflection at runtime. This may also help with performance but it means Enumeratum is compatible with ScalaJS and other environments where reflection is a best effort (such as Android)
- No usage of
synchronized
, which may help with performance and deadlocks prevention - All magic happens at compile-time so you know right away when things go awry
- Comprehensive automated testing to make sure everything is in tip-top shape
Enumeratum is published for Scala 2.12.x, 2.13.x, 3.x as well as ScalaJS and ScalaNative.
Note that there are a couple of limitations for 3.x:
- All "immediate" parent types of enum entries need to be
sealed
(reasoning here) - The
-Yretain-trees
Scalac option must be set when using ValueEnums
Integrations are available for:
- Play: JVM only
- Play JSON: JVM (included in Play integration but also available separately) and ScalaJS
- Circe: JVM and ScalaJS
- ReactiveMongo BSON: JVM only
- Argonaut: JVM and ScalaJS
- Json4s: JVM only
- ScalaCheck: JVM and ScalaJS
- Slick: JVM only
- Quill: JVM and ScalaJS
- sttp tapir: JVM and ScalaJS
- Scalafix
Table of Contents
- Quick start
- More examples
- ScalaJS
- Play integration
- Play JSON integration
- Circe integration
- ReactiveMongo BSON integration
- Argonaut integration
- Json4s integration
- Slick integration
- ScalaCheck
- Quill integration
- Cats integration
- Doobie integration
- Anorm integration
- Benchmarking
- Publishing
Quick start
SBT
In build.sbt
, set the Enumeratum version in a variable (for the latest version, set val enumeratumVersion =
the version you see
in the Maven badge above).
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum" % enumeratumVersion
)
Enumeratum has different integrations that can be added to your build à la carte. For more info, see the respective sections in the Table of Contents
Usage
Using Enumeratum is simple. Just declare your own sealed trait or class A
that extends EnumEntry
and implement it as case objects inside
an object that extends from Enum[A]
as shown below.
import enumeratum._
sealed trait Greeting extends EnumEntry
object Greeting extends Enum[Greeting] {
/*
`findValues` is a protected method that invokes a macro to find all `Greeting` object declarations inside an `Enum`
You use it to implement the `val values` member
*/
val values = findValues
case object Hello extends Greeting
case object GoodBye extends Greeting
case object Hi extends Greeting
case object Bye extends Greeting
}
// Object Greeting has a `withName(name: String)` method
Greeting.withName("Hello")
// => res0: Greeting = Hello
Greeting.withName("Haro")
// => java.lang.NoSuchElementException: Haro is not a member of Enum (Hello, GoodBye, Hi, Bye)
// A safer alternative would be to use `withNameOption(name: String)` method which returns an Option[Greeting]
Greeting.withNameOption("Hello")
// => res1: Option[Greeting] = Some(Hello)
Greeting.withNameOption("Haro")
// => res2: Option[Greeting] = None
// It is also possible to use strings case insensitively
Greeting.withNameInsensitive("HeLLo")
// => res3: Greeting = Hello
Greeting.withNameInsensitiveOption("HeLLo")
// => res4: Option[Greeting] = Some(Hello)
// Uppercase-only strings may also be used
Greeting.withNameUppercaseOnly("HELLO")
// => res5: Greeting = Hello
Greeting.withNameUppercaseOnlyOption("HeLLo")
// => res6: Option[Greeting] = None
// Similarly, lowercase-only strings may also be used
Greeting.withNameLowercaseOnly("hello")
// => res7: Greeting = Hello
Greeting.withNameLowercaseOnlyOption("hello")
// => res8: Option[Greeting] = Some(Hello)
Note that by default, findValues
will return a Seq
with the enum members listed in written-order (relevant if you want to
use the indexOf
method).
Enum members found in nested objects will be included by findValues
as well, and will appear in the order they are
written in the companion object, top to bottom. Note that enum members declared in traits or classes will not be
discovered by findValues
. For example:
sealed trait Nesting extends EnumEntry
object Nesting extends Enum[Nesting] {
val values = findValues
case object Hello extends Nesting
object others {
case object GoodBye extends Nesting
}
case object Hi extends Nesting
class InnerClass {
case object NotFound extends Nesting
}
}
Nesting.values
// => res0: scala.collection.immutable.IndexedSeq[Nesting] = Vector(Hello, GoodBye, Hi)
For an interactive demo, checkout this Scastie snippet.
More examples
Enum
Continuing from the Greeting
enum declared in the quick-start section:
import Greeting._
def tryMatching(v: Greeting): Unit = v match {
case Hello => println("Hello")
case GoodBye => println("GoodBye")
case Hi => println("Hi")
}
/**
Pattern match warning ...
<console>:24: warning: match may not be exhaustive.
It would fail on the following input: Bye
def tryMatching(v: Greeting): Unit = v match {
*/
Greeting.indexOf(Bye)
// => res2: Int = 3
The name is taken from the toString
method of the particular
EnumEntry
. This behavior can be changed in two ways.
Manual override of name
The first way to change the name behaviour is to manually override the def entryName: String
method.
import enumeratum._
sealed abstract class State(override val entryName: String) extends EnumEntry
object State extends Enum[State] {
val values = findValues
case object Alabama extends State("AL")
case object Alaska extends State("AK")
// and so on and so forth.
}
import State._
State.withName("AL")
Mixins to override the name
The second way to override the name behaviour is to mixin the stackable traits provided for common string
conversions, Snakecase
, UpperSnakecase
, CapitalSnakecase
, Hyphencase
, UpperHyphencase
, CapitalHyphencase
, Dotcase
, UpperDotcase
, CapitalDotcase
, Words
, UpperWords
, CapitalWords
, Camelcase
, LowerCamelcase
, Uppercase
, Lowercase
, and Uncapitalised
.
import enumeratum._
import enumeratum.EnumEntry._
sealed trait Greeting extends EnumEntry with Snakecase
object Greeting extends Enum[Greeting] {
val values = findValues
case object Hello extends Greeting
case object GoodBye extends Greeting
case object ShoutGoodBye extends Greeting with Uppercase
}
Greeting.withName("hello")
Greeting.withName("good_bye")
Greeting.withName("SHOUT_GOOD_BYE")
ValueEnum
Asides from enumerations that resolve members from String
names, Enumeratum also supports ValueEnum
s, enums that resolve
members from simple values like Int
, Long
, Short
, Char
, Byte
, and String
(without support for runtime transformations).
These enums are not modelled after Enumeration
from standard lib, and therefore have the added ability to make sure, at compile-time,
that multiple members do not share the same value.
import enumeratum.values._
sealed abstract class LibraryItem(val value: Int, val name: String) extends IntEnumEntry
object LibraryItem extends IntEnum[LibraryItem] {
case object Book extends LibraryItem(value = 1, name = "book")
case object Movie extends LibraryItem(name = "movie", value = 2)
case object Magazine extends LibraryItem(3, "magazine")
case object CD extends LibraryItem(4, name = "cd")
// case object Newspaper extends LibraryItem(4, name = "newspaper") <-- will fail to compile because the value 4 is shared
/*
val five = 5
case object Article extends LibraryItem(five, name = "article") <-- will fail to compile because the value is not a literal
*/
val values = findValues
}
assert(LibraryItem.withValue(1) == LibraryItem.Book)
LibraryItem.withValue(10) // => java.util.NoSuchElementException:
If you want to allow aliases in your enumeration, i.e. multiple entries that share the same value, you can extend the
enumeratum.values.AllowAlias
trait:
import enumeratum.values._
sealed abstract class Judgement(val value: Int) extends IntEnumEntry with AllowAlias
object Judgement extends IntEnum[Judgement] {
case object Good extends Judgement(1)
case object OK extends Judgement(2)
case object Meh extends Judgement(2)
case object Bad extends Judgement(3)
val values = findValues
}
Calling withValue
with an aliased value will return one of the corresponding entries. Which one it returns is undefined:
assert(Judgement.withValue(2) == Judgement.OK || Judgement.withValue(2) == Judgement.Meh)
Restrictions
ValueEnum
s must have their value members implemented as literal values.
ScalaJS
In a ScalaJS project, add the following to build.sbt
:
libraryDependencies ++= Seq(
"com.beachape" %%% "enumeratum" % enumeratumVersion
)
As expected, usage is exactly the same as normal Scala.
Play Integration
The enumeratum-play
project is published separately and gives you access to various tools
to help you avoid boilerplate in your Play project.
SBT
For enumeratum with full Play support:
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum-play" % enumeratumPlayVersion
)
Dependencies and compatibility notes
- As of version 1.8,
enumeratum-play
requires Scala 2.13+ and Play >= 3
Usage
PlayEnum
The included PlayEnum
trait is probably going to be the most interesting as it includes a bunch
of built-in implicits like Json formats, Path bindables, Query string bindables, and Form field support.
For example:
package enums
import enumeratum._
sealed trait Greeting extends EnumEntry
object Greeting extends PlayEnum[Greeting] {
val values = findValues
case object Hello extends Greeting
case object GoodBye extends Greeting
case object Hi extends Greeting
case object Bye extends Greeting
}
/*
Then make sure to import your PlayEnums into your routes in your Build.scala
or build.sbt so that you can use them in your routes file.
`routesImport += "enums._"`
*/
// You can also use the String Interpolating Routing DSL:
import play.api.routing.sird._
import play.api.routing._
import play.api.mvc._
Router.from {
case GET(p"/hello/${Greeting.fromPath(greeting)}") => Action {
Results.Ok(s"$greeting")
}
}
PlayValueEnums
There are IntPlayEnum
, LongPlayEnum
, and ShortPlayEnum
traits for use with IntEnumEntry
, LongEnumEntry
, and
ShortEnumEntry
respectively that provide Play-specific implicits as with normal PlayEnum
. For example:
import enumeratum.values._
sealed abstract class PlayLibraryItem(val value: Int, val name: String) extends IntEnumEntry
case object PlayLibraryItem extends IntPlayEnum[PlayLibraryItem] {
// A good mix of named, unnamed, named + unordered args
case object Book extends PlayLibraryItem(value = 1, name = "book")
case object Movie extends PlayLibraryItem(name = "movie", value = 2)
case object Magazine extends PlayLibraryItem(3, "magazine")
case object CD extends PlayLibraryItem(4, name = "cd")
val values = findValues
}
import play.api.libs.json.{ JsNumber, JsString, Json => PlayJson }
PlayLibraryItem.values.foreach { item =>
assert(PlayJson.toJson(item) == JsNumber(item.value))
}
PlayFormFieldEnum
PlayEnum
extends the trait PlayFormFieldEnum
wich offers formField
for mapping within a play.api.data.Form
object.
import play.api.data.Form
import play.api.data.Forms._
object GreetingForm {
val form = Form(
mapping(
"name" -> nonEmptyText,
"greeting" -> Greeting.formField
)(Data.apply)(Data.unapply)
)
case class Data(
name: String,
greeting: Greeting)
}
Another alternative (if for example your Enum
can't extend PlayEnum
or PlayFormFieldEnum
) is to create an implicit Format
and bring it into scope using Play's of
, i.e.
import play.api.data.Form
import play.api.data.Forms._
object Formats {
implicit val greetingFormat = enumeratum.Forms.format(Greeting)
}
object GreetingForm {
import Formats._
val form = Form(
mapping(
"name" -> nonEmptyText,
"greeting" -> of[Greeting]
)(Data.apply)(Data.unapply)
)
case class Data(
name: String,
greeting: Greeting)
}
Play JSON
The enumeratum-play-json
project is published separately and gives you access to Play's auto-generated boilerplate
for JSON serialization in your Enum's.
SBT
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum-play-json" % enumeratumPlayJsonVersion
)
Usage
PlayJsonEnum
There are also PlayInsensitiveJsonEnum
, PlayLowercaseJsonEnum
, and PlayUppercaseJsonEnum
traits for use. For example:
import enumeratum.{ PlayJsonEnum, Enum, EnumEntry }
sealed trait Greeting extends EnumEntry
object Greeting extends Enum[Greeting] with PlayJsonEnum[Greeting] {
val values = findValues
case object Hello extends Greeting
case object GoodBye extends Greeting
case object Hi extends Greeting
case object Bye extends Greeting
}
PlayJsonValueEnum
There are IntPlayJsonValueEnum
, LongPlayJsonValueEnum
, and ShortPlayJsonValueEnum
traits for use with IntEnumEntry
, LongEnumEntry
, and
ShortEnumEntry
respectively. For example:
import enumeratum.values._
sealed abstract class JsonDrinks(val value: Short, name: String) extends ShortEnumEntry
case object JsonDrinks extends ShortEnum[JsonDrinks] with ShortPlayJsonValueEnum[JsonDrinks] {
case object OrangeJuice extends JsonDrinks(value = 1, name = "oj")
case object AppleJuice extends JsonDrinks(value = 2, name = "aj")
case object Cola extends JsonDrinks(value = 3, name = "cola")
case object Beer extends JsonDrinks(value = 4, name = "beer")
val values = findValues
}
import play.api.libs.json.{ JsNumber, JsString, Json => PlayJson, JsSuccess }
// Use to deserialise numbers to enum members directly
JsonDrinks.values.foreach { drink =>
assert(PlayJson.toJson(drink) == JsNumber(drink.value))
}
assert(PlayJson.fromJson[JsonDrinks](JsNumber(3)) == JsSuccess(JsonDrinks.Cola))
assert(PlayJson.fromJson[JsonDrinks](JsNumber(19)).isError)
Circe
SBT
To use enumeratum with Circe:
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum-circe" % enumeratumCirceVersion
)
To use with ScalaJS:
libraryDependencies ++= Seq(
"com.beachape" %%% "enumeratum-circe" % enumeratumCirceVersion
)
Usage
Enum
import enumeratum._
sealed trait ShirtSize extends EnumEntry
case object ShirtSize extends Enum[ShirtSize] with CirceEnum[ShirtSize] {
case object Small extends ShirtSize
case object Medium extends ShirtSize
case object Large extends ShirtSize
val values = findValues
}
import io.circe.Json
import io.circe.syntax._
ShirtSize.values.foreach { size =>
assert(size.asJson == Json.fromString(size.entryName))
}
ValueEnum
import enumeratum.values._
sealed abstract class CirceLibraryItem(val value: Int, val name: String) extends IntEnumEntry
case object CirceLibraryItem extends IntEnum[CirceLibraryItem] with IntCirceEnum[CirceLibraryItem] {
// A good mix of named, unnamed, named + unordered args
case object Book extends CirceLibraryItem(value = 1, name = "book")
case object Movie extends CirceLibraryItem(name = "movie", value = 2)
case object Magazine extends CirceLibraryItem(3, "magazine")
case object CD extends CirceLibraryItem(4, name = "cd")
val values = findValues
}
import io.circe.Json
import io.circe.syntax._
CirceLibraryItem.values.foreach { item =>
assert(item.asJson == Json.fromInt(item.value))
}
ReactiveMongo BSON
The enumeratum-reactivemongo-bson
project is published separately and gives you access to ReactiveMongo's auto-generated boilerplate
for BSON serialization in your Enum's.
SBT
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum-reactivemongo-bson" % enumeratumReactiveMongoVersion
)
Usage
ReactiveMongoBsonEnum
For example:
import enumeratum.{ ReactiveMongoBsonEnum, Enum, EnumEntry }
sealed trait Greeting extends EnumEntry
object Greeting extends Enum[Greeting] with ReactiveMongoBsonEnum[Greeting] {
val values = findValues
case object Hello extends Greeting
case object GoodBye extends Greeting
case object Hi extends Greeting
case object Bye extends Greeting
}
ReactiveMongoBsonValueEnum
There are IntReactiveMongoBsonValueEnum
, LongReactiveMongoBsonValueEnum
, and ShortReactiveMongoBsonValueEnum
traits for use with IntEnumEntry
, LongEnumEntry
, and
ShortEnumEntry
respectively. For example:
import enumeratum.values._
sealed abstract class BsonDrinks(val value: Short, name: String) extends ShortEnumEntry
case object BsonDrinks extends ShortEnum[BsonDrinks] with ShortReactiveMongoBsonValueEnum[BsonDrinks] {
case object OrangeJuice extends BsonDrinks(value = 1, name = "oj")
case object AppleJuice extends BsonDrinks(value = 2, name = "aj")
case object Cola extends BsonDrinks(value = 3, name = "cola")
case object Beer extends BsonDrinks(value = 4, name = "beer")
val values = findValues
}
import reactivemongo.api.bson._
// Use to deserialise numbers to enum members directly
BsonDrinks.values.foreach { drink =>
val writer = implicitly[BSONWriter[BsonDrinks]]
assert(writer.write(drink) == BSONInteger(drink.value))
}
val reader = implicitly[BSONReader[BsonDrinks]]
assert(reader.read(BSONInteger(3)) == BsonDrinks.Cola)
Argonaut
SBT
To use enumeratum with Argonaut:
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum-argonaut" % enumeratumArgonautVersion
)
Usage
Enum
import enumeratum._
sealed trait TrafficLight extends EnumEntry
object TrafficLight extends Enum[TrafficLight] with ArgonautEnum[TrafficLight] {
case object Red extends TrafficLight
case object Yellow extends TrafficLight
case object Green extends TrafficLight
val values = findValues
}
import argonaut._
import Argonaut._
TrafficLight.values.foreach { entry =>
assert(entry.asJson == entry.entryName.asJson)
}
ValueEnum
import enumeratum.values._
sealed abstract class ArgonautDevice(val value: Short) extends ShortEnumEntry
case object ArgonautDevice
extends ShortEnum[ArgonautDevice]
with ShortArgonautEnum[ArgonautDevice] {
case object Phone extends ArgonautDevice(1)
case object Laptop extends ArgonautDevice(2)
case object Desktop extends ArgonautDevice(3)
case object Tablet extends ArgonautDevice(4)
val values = findValues
}
import argonaut._
import Argonaut._
ArgonautDevice.values.foreach { item =>
assert(item.asJson == item.value.asJson)
}
Json4s
SBT
To use enumeratum with Json4s:
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum-json4s" % enumeratumJson4sVersion
)
Usage
Enum
import enumeratum._
sealed trait TrafficLight extends EnumEntry
object TrafficLight extends Enum[TrafficLight] /* nothing extra here */ {
case object Red extends TrafficLight
case object Yellow extends TrafficLight
case object Green extends TrafficLight
val values = findValues
}
import org.json4s.DefaultFormats
implicit val formats = DefaultFormats + Json4s.serializer(TrafficLight)
ValueEnum
import enumeratum.values._
sealed abstract class Device(val value: Short) extends ShortEnumEntry
case object Device
extends ShortEnum[Device] /* nothing extra here */ {
case object Phone extends Device(1)
case object Laptop extends Device(2)
case object Desktop extends Device(3)
case object Tablet extends Device(4)
val values = findValues
}
import org.json4s.DefaultFormats
implicit val formats = DefaultFormats + Json4s.serializer(Device)
ScalaCheck
SBT
To use enumeratum with ScalaCheck:
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum-scalacheck" % enumeratumScalacheckVersion
)
Usage
Enum
Given the enum declared in the quick-start section, you can get an Arbitrary[Greeting]
(to generate instances of Greeting
) and a Cogen[Greeting]
(to generate instances of Greeting => (A: Arbitrary)
) by importing generators in the scope of your tests:
import enumeratum.scalacheck._
ValueEnum
Similarly, you can get Arbitrary
and Cogen
instances for every ValueEnum
subtype by importing generators in the scope of your tests:
import enumeratum.values.scalacheck._
Quill
SBT
To use enumeratum with Quill:
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum-quill" % enumeratumQuillVersion
)
To use with ScalaJS:
libraryDependencies ++= Seq(
"com.beachape" %%% "enumeratum-quill" % enumeratumQuillVersion
)
Usage
Enum
import enumeratum._
sealed trait ShirtSize extends EnumEntry
case object ShirtSize extends Enum[ShirtSize] with QuillEnum[ShirtSize] {
case object Small extends ShirtSize
case object Medium extends ShirtSize
case object Large extends ShirtSize
val values = findValues
}
case class Shirt(size: ShirtSize)
import io.getquill._
lazy val ctx = new PostgresJdbcContext(SnakeCase, "ctx")
import ctx._
ctx.run(query[Shirt].insert(_.size -> lift(ShirtSize.Small: ShirtSize)))
ctx.run(query[Shirt]).foreach(println)
- Note that a type ascription to the
EnumEntry
trait (eg.ShirtSize.Small: ShirtSize
) is required when binding hardcodedEnumEntry
s
ValueEnum
import enumeratum._
sealed abstract class ShirtSize(val value: Int) extends IntEnumEntry
case object ShirtSize extends IntEnum[ShirtSize] with IntQuillEnum[ShirtSize] {
case object Small extends ShirtSize(1)
case object Medium extends ShirtSize(2)
case object Large extends ShirtSize(3)
val values = findValues
}
case class Shirt(size: ShirtSize)
import io.getquill._
lazy val ctx = new PostgresJdbcContext(SnakeCase, "ctx")
import ctx._
ctx.run(query[Shirt].insert(_.size -> lift(ShirtSize.Small: ShirtSize)))
ctx.run(query[Shirt]).foreach(println)
- Note that a type ascription to the
ValueEnumEntry
abstract class (eg.ShirtSize.Small: ShirtSize
) is required when binding hardcodedValueEnumEntry
s quill-cassandra
currently does not supportShortEnum
andByteEnum
(see getquill/quill#1009)quill-orientdb
currently does not supportByteEnum
(see getquill/quill#1029)
Slick integration
Column Mappings
In order to use your enumeratum Enums in Slick tables as columns, you will
need to construct instances of MappedColumnType
and make them available
where you define and query your slick tables. In order to more easily
construct these instances, the enumeratum-slick integration provides a trait
enumeratum.SlickEnumSupport
. This trait provides a method mappedColumnTypeForEnum
(and variants) for constructing a mapped column type for your enum. For example
if you want to use Enum[Greeting]
in your slick table, mix in SlickEnumSupport
where you define your table.
trait GreetingRepository extends SlickEnumSupport {
val profile: slick.jdbc.Profile
implicit lazy val greetingMapper = mappedColumnTypeForEnum(Greeting)
class GreetingTable(tag: Tag) extends Table[(String, Greeting)](tag, "greeting") {
def id = column[String]("id", O.PrimaryKey)
def greeting = column[Greeting]("greeting") // Maps to a varchar/text column
def * = (id, greeting)
}
ValueEnum Mappings
If you want to represent a ValueEnum
by its value
rather than its string
name, simply mix in SlickValueEnumSupport
and proceed mostly as above:
implicit lazy val libraryItemMapper = mappedColumnTypeForIntEnum(LibraryItem)
...
def item = column[LibraryItem]("LIBRARY_ITEM") // Maps to a numeric column
Common Mappers
An alternate approach which is useful when mappers need to be shared across repositories (perhaps for something common like a "Status" enum) is to define your mappers in a module on their own, then make use of them in your repositories:
trait CommonMappers extends SlickEnumSupport {
val profile: Profile
implicit lazy val statusMapper = mappedColumnTypeForEnum(Status)
...
}
trait UserRepository extends CommonMappers {
val profile: Profile
class UserTable(tag: Tag) extends Table[UserRow](tag, "user") {
...
def status = column[Status]("status")
...
}
}
Querying by enum column types
Note that because your enum values are singleton objects, you may get errors when you try to use them in Slick queries like the following:
.filter(_.trafficLight === TrafficLight.Red)
This is because TrafficLight.Red
in the above example is inferred to
be of its unique type (TrafficLight.Red
) rather than TrafficLight
,
thus causing a failure to find your mapping. In order to fix this,
simply assist the compiler by ascribing the type to be TrafficLight
:
.filter(_.trafficLight === (TrafficLight.Red: TrafficLight))
A way around this if you find the type expansion offensive is to define val accessors for your enum entries that are typed as the parent type. You can do this inside your Enums companion object or more locally:
val red: TrafficLight = Red // Not red: TrafficLight.Red = Red
val yellow: TrafficLight = Yellow
val green: TrafficLight = Green
...
.filter(_.trafficLight === red)
Interpolated / Plain SQL integration
If you want to use slick interpolated SQL queries you can use the provided
constructors to instantiate instances of GetResult[_]
and SetParameter[_]
for your enum:
import SlickEnumPlainSqlSupport._
Or mix it in...
trait Foo extends SlickEnumPlainSqlSupport {
...
}
Then define your instances:
implicit val greetingGetResult = getResultForEnum(Greeting)
implicit val greetingOptionGetResult = optionalGetResultForEnum(Greeting)
implicit val greetingSetParameter = setParameterForEnum(Greeting)
implicit val greetingOptionSetParameter = optionalSetParameterForEnum(Greeting)
Cats
SBT
To use enumeratum with Cats:
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum-cats" % enumeratumCatsVersion
)
To use with ScalaJS:
libraryDependencies ++= Seq(
"com.beachape" %%% "enumeratum-cats" % enumeratumCatsVersion
)
Usage
This enumeratum module is mostly useful for generic derivation - providing instances for Eq
, Show
and Hash
. So if you have structures (for example case classes) which
contain enum values, you get the instances for the enum itself "for free". But it can be useful for standalone usage as,
providing type-safe comparison and hashing.
Enum
import enumeratum._
sealed trait ShirtSize extends EnumEntry
case object ShirtSize extends Enum[ShirtSize] with CatsEnum[ShirtSize] {
case object Small extends ShirtSize
case object Medium extends ShirtSize
case object Large extends ShirtSize
val values = findValues
}
import cats.syntax.eq._
import cats.syntax.show._
val shirtSizeOne: ShirtSize = ...
val shirtSizeTwo: ShirtSize = ...
if(shirtSizeOne === shirtSizeTwo) { // note the third equals
printf("We got the same size, its hash is: %i", implicitly[Hash[TrafficLight]].hash(shirtSizeOne))
} else {
printf("Shirt sizes mismatch: %s =!= %s", shirtSizeOne.show, shirtSizeTwo.show)
}
ValueEnum
There are two implementations for ValueEnum
:
CatsValueEnum
provides the same functionality asCatsEnum
(exceptHash
)CatsOrderValueEnum
provides the same functionality asCatsValueEnum
plus an instance ofcats.Order
(due to Scala 2 trait limitations, it's anabstract class
, check outCatsCustomOrderValueEnum
if you need atrait
)
import enumeratum.values._
sealed abstract class CatsPriority(val value: Int, val name: String) extends IntEnumEntry
case object CatsPriority extends IntEnum[CatsPriority] with CatsOrderValueEnum[Int, CatsPriority] {
// A good mix of named, unnamed, named + unordered args
case object Low extends CatsPriority(value = 1, name = "low")
case object Medium extends CatsPriority(name = "medium", value = 2)
case object High extends CatsPriority(3, "high")
case object SuperHigh extends CatsPriority(4, name = "super_high")
val values = findValues
}
import cats.instances.int._
import cats.instances.list._
import cats.syntax.order._
import cats.syntax.foldable._
val items: List[CatsPriority] = List(High, Low, SuperHigh)
items.maximumOption // Some(SuperHigh)
Inheritance-free usage
If you need instances, but hesitate to mix in the traits demonstrated above, you can get them using the provided methods in enumeratum.Cats
and enumeratum.values.Cats
- the second also provides more flexibility than the (opinionated) mix-in trait as it allows to pass a custom type class instance for the value type (methods names are prefixed with value
).
Doobie
SBT
To use enumeratum with Doobie:
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum-doobie" % enumeratumDoobieVersion
)
To use with ScalaJS:
libraryDependencies ++= Seq(
"com.beachape" %%% "enumeratum-doobie" % enumeratumDoobieVersion
)
Usage
Enum
If you need to store enum values in text column of following table
CREATE TABLE clothes (
shirt varchar(100)
)
you should use following code
import enumeratum._
sealed trait ShirtSize extends EnumEntry
case object ShirtSize extends Enum[ShirtSize] with DoobieEnum[ShirtSize] {
case object Small extends ShirtSize
case object Medium extends ShirtSize
case object Large extends ShirtSize
val values = findValues
}
case class Shirt(size: ShirtSize)
import doobie._
import doobie.implicits._
import doobie.util.ExecutionContexts
import cats.effect._
implicit val cs = IO.contextShift(ExecutionContexts.synchronous)
val xa = Transactor.fromDriverManager[IO](
"org.postgresql.Driver",
"jdbc:postgresql:world",
"postgres",
"",
Blocker.liftExecutionContext(ExecutionContexts.synchronous)
)
sql"insert into clothes (shirt) values (${Shirt(ShirtSize.Small)})".update.run
.transact(xa)
.unsafeRunSync
sql"select shirt from clothes"
.query[Shirt]
.to[List]
.transact(xa)
.unsafeRunSync
.take(5)
.foreach(println)
- Note that a type ascription to the
EnumEntry
trait (eg.ShirtSize.Small: ShirtSize
) is required when binding hardcodedEnumEntry
s
ValueEnum
import enumeratum.values.{ IntDoobieEnum, IntEnum, IntEnumEntry }
sealed abstract class ShirtSize(val value: Int) extends IntEnumEntry
case object ShirtSize extends IntEnum[ShirtSize] with IntDoobieEnum[ShirtSize] {
case object Small extends ShirtSize(1)
case object Medium extends ShirtSize(2)
case object Large extends ShirtSize(3)
val values = findValues
}
case class Shirt(size: ShirtSize)
import doobie._
import doobie.implicits._
import doobie.util.ExecutionContexts
import cats.effect._
implicit val cs = IO.contextShift(ExecutionContexts.synchronous)
val xa = Transactor.fromDriverManager[IO](
"org.postgresql.Driver",
"jdbc:postgresql:world",
"postgres",
"",
Blocker.liftExecutionContext(ExecutionContexts.synchronous)
)
sql"insert into clothes (shirt) values (${Shirt(ShirtSize.Small)})".update.run
.transact(xa)
.unsafeRunSync
sql"select shirt from clothes"
.query[Shirt]
.to[List]
.transact(xa)
.unsafeRunSync
.take(5)
.foreach(println)
- Note that a type ascription to the
ValueEnumEntry
abstract class (eg.ShirtSize.Small: ShirtSize
) is required when binding hardcodedValueEnumEntry
s
Anorm
Anorm provides a module to support Enum as Column
and parameters.
Benchmarking
Benchmarking is in the unpublished benchmarking
project. It uses JMH and you can run them in the sbt console by issuing the following command from your command line:
sbt +benchmarking/'jmh:run -i 10 -wi 10 -f3 -t 1'
The above command will run JMH benchmarks against different versions of Scala. Leave off +
to run against the main/latest supported version of Scala.
On my late 2013 MBP using Java8 on OSX El Capitan:
[info] Benchmark Mode Cnt Score Error Units
[info] EnumBenchmarks.indexOf avgt 30 11.628 ± 0.190 ns/op
[info] EnumBenchmarks.withNameDoesNotExist avgt 30 1809.194 ± 33.113 ns/op
[info] EnumBenchmarks.withNameExists avgt 30 13.540 ± 0.374 ns/op
[info] EnumBenchmarks.withNameOptionDoesNotExist avgt 30 5.999 ± 0.037 ns/op
[info] EnumBenchmarks.withNameOptionExists avgt 30 9.662 ± 0.232 ns/op
[info] StdLibEnumBenchmarks.withNameDoesNotExist avgt 30 1921.690 ± 78.898 ns/op
[info] StdLibEnumBenchmarks.withNameExists avgt 30 56.517 ± 1.161 ns/op
[info] values.ValueEnumBenchmarks.withValueDoesNotExist avgt 30 1950.291 ± 29.292 ns/op
[info] values.ValueEnumBenchmarks.withValueExists avgt 30 4.009 ± 0.062 ns/op
[info] values.ValueEnumBenchmarks.withValueOptDoesNotExist avgt 30 5.285 ± 0.063 ns/op
[info] values.ValueEnumBenchmarks.withValueOptExists avgt 30 6.621 ± 0.084 ns/op
Discussion
Other than the methods that throw NoSuchElementException
s, performance is in the 10ns range (taking into account JMH overhead of roughly 2-3ns), which
is acceptable for almost all use-cases. PRs that promise to increase performance are expected to be demonstrably faster.
Also, Enumeratum's withName
is faster than the standard library's Enumeration
, by around 4x in the case where an entry exists with the given name.
My guess is this is because Enumeratum doesn't use any synchronized
calls or volatile
annotations. It is also faster in the case where there is no
corresponding name, but not by a significant amount, perhaps because the high cost of throwing an exception masks any benefits.
Publishing
Projects are published independently of each other.
JVM + ScalaJS projects should have an aggregate project to make it easy to publish them, e.g. for enumeratum-circe
:
$ sbt "project circe-aggregate" +clean +publish-signed
Should publish all needed artefacts. Note that sbt circe-aggregate/publish-signed
will not work (ScalaJS gets skipped).
Contributions
Issues and PRs are more than welcome.
- For bug fixes, enhancements, version bumps etc: please feel free to send a PR or issue
- For new integrations: these are generally bigger investments, and not all projects are a good fit to be maintained by me, so it would be a good idea to send an issue first to gauge interest and fit. If you feel it's a faster/better to have a concrete PR to discuss things with, by all means, feel free to go that route too.
More Resourcesto explore the angular.
mail [email protected] to add your project or resources here 🔥.
- 1A toolkit for servicing HTTP requests in Scala
https://github.com/unfiltered/unfiltered
A toolkit for servicing HTTP requests in Scala. Contribute to unfiltered/unfiltered development by creating an account on GitHub.
- 2A Scala DSL for talking with databases with minimum verbosity and maximum type safety
https://github.com/squeryl/squeryl
A Scala DSL for talking with databases with minimum verbosity and maximum type safety - squeryl/squeryl
- 3Apache Flink
https://github.com/apache/flink
Apache Flink. Contribute to apache/flink development by creating an account on GitHub.
- 4Vert.x for Scala
https://github.com/vert-x3/vertx-lang-scala
Vert.x for Scala. Contribute to vert-x3/vertx-lang-scala development by creating an account on GitHub.
- 5Chromaprint/AcoustID audio fingerprinting for the JVM
https://github.com/mgdigital/Chromaprint.scala
Chromaprint/AcoustID audio fingerprinting for the JVM - mgdigital/Chromaprint.scala
- 6A macro library that converts native imperative syntax to scalaz's monadic expressions
https://github.com/ThoughtWorksInc/each
A macro library that converts native imperative syntax to scalaz's monadic expressions - ThoughtWorksInc/each
- 7Incredibly simple DI Scala library.
https://github.com/yakivy/jam
Incredibly simple DI Scala library. Contribute to yakivy/jam development by creating an account on GitHub.
- 8Security library for Play framework 2 in Java and Scala: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
https://github.com/pac4j/play-pac4j
Security library for Play framework 2 in Java and Scala: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT... - pac4j/play-pac4j
- 9laserdisc-io/mysql-binlog-stream
https://github.com/laserdisc-io/mysql-binlog-stream
Contribute to laserdisc-io/mysql-binlog-stream development by creating an account on GitHub.
- 10GNU Gettext .po file loader for Scala
https://github.com/xitrum-framework/scaposer
GNU Gettext .po file loader for Scala. Contribute to xitrum-framework/scaposer development by creating an account on GitHub.
- 11Light-weight convenience wrapper around Lucene to simplify complex tasks and add Scala sugar.
https://github.com/outr/lucene4s
Light-weight convenience wrapper around Lucene to simplify complex tasks and add Scala sugar. - outr/lucene4s
- 12Workflow engine for exploration of simulation models using high throughput computing
https://github.com/openmole/openmole
Workflow engine for exploration of simulation models using high throughput computing - openmole/openmole
- 13PostgreSQL protocol support for Finagle
https://github.com/finagle/finagle-postgres
PostgreSQL protocol support for Finagle. Contribute to finagle/finagle-postgres development by creating an account on GitHub.
- 14Simple play module for authenticating against Google
https://github.com/guardian/play-googleauth
Simple play module for authenticating against Google - guardian/play-googleauth
- 15Extensible JOSE library for Scala
https://github.com/blackdoor/jose
Extensible JOSE library for Scala. Contribute to blackdoor/jose development by creating an account on GitHub.
- 16Large off-heap arrays and mmap files for Scala and Java
https://github.com/xerial/larray
Large off-heap arrays and mmap files for Scala and Java - xerial/larray
- 17A scala library for connecting to a redis server, or a cluster of redis nodes using consistent hashing on the client side.
https://github.com/debasishg/scala-redis
A scala library for connecting to a redis server, or a cluster of redis nodes using consistent hashing on the client side. - debasishg/scala-redis
- 18Idiomatic, typesafe, and reactive Scala client for Apache Pulsar
https://github.com/CleverCloud/pulsar4s
Idiomatic, typesafe, and reactive Scala client for Apache Pulsar - CleverCloud/pulsar4s
- 19Purely functional JSON parser and library in scala.
https://github.com/argonaut-io/argonaut
Purely functional JSON parser and library in scala. - argonaut-io/argonaut
- 20Modern Load Testing as Code
https://github.com/gatling/gatling
Modern Load Testing as Code. Contribute to gatling/gatling development by creating an account on GitHub.
- 21A Scala ORM library
https://github.com/kostaskougios/mapperdao
A Scala ORM library. Contribute to kostaskougios/mapperdao development by creating an account on GitHub.
- 22Docker containers for testing in scala
https://github.com/testcontainers/testcontainers-scala
Docker containers for testing in scala. Contribute to testcontainers/testcontainers-scala development by creating an account on GitHub.
- 23A scala diff/patch library for Json
https://github.com/gnieh/diffson
A scala diff/patch library for Json. Contribute to gnieh/diffson development by creating an account on GitHub.
- 24Testing tool in Scala for HTTP JSON API
https://github.com/agourlay/cornichon
Testing tool in Scala for HTTP JSON API. Contribute to agourlay/cornichon development by creating an account on GitHub.
- 25If you don't agree with the data
https://github.com/splink/veto
If you don't agree with the data. Contribute to splink/veto development by creating an account on GitHub.
- 26Software Specifications for Scala
https://github.com/etorreborre/specs2
Software Specifications for Scala. Contribute to etorreborre/specs2 development by creating an account on GitHub.
- 27The Couchbase Monorepo for JVM Clients: Java, Scala, io-core…
https://github.com/couchbase/couchbase-jvm-clients
The Couchbase Monorepo for JVM Clients: Java, Scala, io-core… - couchbase/couchbase-jvm-clients
- 28Salat is a simple serialization library for case classes.
https://github.com/salat/salat
Salat is a simple serialization library for case classes. - salat/salat
- 29Practical effect composition library based on abstract wrapping type and the free monad
https://github.com/ISCPIF/freedsl
Practical effect composition library based on abstract wrapping type and the free monad - ISCPIF/freedsl
- 30SevenZip library for Scala, easy to use.
https://github.com/gonearewe/SevenZ4S
SevenZip library for Scala, easy to use. . Contribute to gonearewe/SevenZ4S development by creating an account on GitHub.
- 31The super light testing library for Scala and Scala.js
https://github.com/monix/minitest
The super light testing library for Scala and Scala.js - monix/minitest
- 32A module that provides OAuth, OAuth2 and OpenID authentication for Play Framework applications
https://github.com/jaliss/securesocial
A module that provides OAuth, OAuth2 and OpenID authentication for Play Framework applications - jaliss/securesocial
- 33Compile-time Language Integrated Queries for Scala
https://github.com/zio/zio-quill
Compile-time Language Integrated Queries for Scala - zio/zio-quill
- 34Scala Scripting
https://github.com/com-lihaoyi/Ammonite
Scala Scripting. Contribute to com-lihaoyi/Ammonite development by creating an account on GitHub.
- 35Slick (Scala Language Integrated Connection Kit) is a modern database query and access library for Scala
https://github.com/slick/slick
Slick (Scala Language Integrated Connection Kit) is a modern database query and access library for Scala - slick/slick
- 36Property-based testing for Scala
https://github.com/typelevel/scalacheck
Property-based testing for Scala. Contribute to typelevel/scalacheck development by creating an account on GitHub.
- 37Simpler DynamoDB access for Scala
https://github.com/scanamo/scanamo
Simpler DynamoDB access for Scala. Contribute to scanamo/scanamo development by creating an account on GitHub.
- 38Type-Safe framework for defining, modifying, and querying SQL databases
https://github.com/outr/scalarelational
Type-Safe framework for defining, modifying, and querying SQL databases - outr/scalarelational
- 39ScalaFX simplifies creation of JavaFX-based user interfaces in Scala
https://github.com/scalafx/scalafx
ScalaFX simplifies creation of JavaFX-based user interfaces in Scala - scalafx/scalafx
- 40Performant database access in Scala
https://github.com/lucidsoftware/relate
Performant database access in Scala. Contribute to lucidsoftware/relate development by creating an account on GitHub.
- 41Scala library for boilerplate-free validation
https://github.com/krzemin/octopus
Scala library for boilerplate-free validation. Contribute to krzemin/octopus development by creating an account on GitHub.
- 42Connect a Scala REPL to running JVM processes without any prior setup
https://github.com/xitrum-framework/scalive
Connect a Scala REPL to running JVM processes without any prior setup - xitrum-framework/scalive
- 43A ZIO-based redis client
https://github.com/zio/zio-redis
A ZIO-based redis client. Contribute to zio/zio-redis development by creating an account on GitHub.
- 44Tiny Scala high-performance, async web framework, inspired by Sinatra
https://github.com/scalatra/scalatra
Tiny Scala high-performance, async web framework, inspired by Sinatra - scalatra/scalatra
- 45Reactive data-binding for Scala
https://github.com/ThoughtWorksInc/Binding.scala
Reactive data-binding for Scala. Contribute to ThoughtWorksInc/Binding.scala development by creating an account on GitHub.
- 46The Anorm database library
https://github.com/playframework/anorm
The Anorm database library. Contribute to playframework/anorm development by creating an account on GitHub.
- 47A module for the Play Framework to build highly modular applications
https://github.com/splink/pagelets
A module for the Play Framework to build highly modular applications - splink/pagelets
- 48I/O and Microservice library for Scala
https://github.com/tumblr/colossus
I/O and Microservice library for Scala. Contribute to tumblr/colossus development by creating an account on GitHub.
- 49Scala library to sign HTTP requests to AWS services.
https://github.com/ticofab/aws-request-signer
Scala library to sign HTTP requests to AWS services. - ticofab/aws-request-signer
- 50Next generation user interface and application development in Scala and Scala.js for web, mobile, and desktop.
https://github.com/outr/youi
Next generation user interface and application development in Scala and Scala.js for web, mobile, and desktop. - outr/youi
- 51Statistical Machine Intelligence & Learning Engine
https://github.com/haifengl/smile
Statistical Machine Intelligence & Learning Engine - haifengl/smile
- 52Microbenchmarking and performance regression testing framework for the JVM platform.
https://github.com/scalameter/scalameter
Microbenchmarking and performance regression testing framework for the JVM platform. - scalameter/scalameter
- 53A testing tool for Scala and Java developers
https://github.com/scalatest/scalatest
A testing tool for Scala and Java developers. Contribute to scalatest/scalatest development by creating an account on GitHub.
- 54:monorail: "Scala on Rails" - A full-stack web app framework for rapid development in Scala
https://github.com/skinny-framework/skinny-framework
:monorail: "Scala on Rails" - A full-stack web app framework for rapid development in Scala - skinny-framework/skinny-framework
- 55Molecule translates custom Scala code to database queries for multiple databases.
https://github.com/scalamolecule/molecule
Molecule translates custom Scala code to database queries for multiple databases. - scalamolecule/molecule
- 56Cryptographic primitives for Scala
https://github.com/input-output-hk/scrypto
Cryptographic primitives for Scala. Contribute to input-output-hk/scrypto development by creating an account on GitHub.
- 57A lightweight framework for writing REST services in Scala.
https://github.com/mesosphere/chaos
A lightweight framework for writing REST services in Scala. - mesosphere/chaos
- 58Async and clustered Scala web framework and HTTP(S) server
https://github.com/xitrum-framework/xitrum
Async and clustered Scala web framework and HTTP(S) server - xitrum-framework/xitrum
- 59A distributed tracing extension for Akka. Provides integration with Play framework, Spray and Akka HTTP.
https://github.com/levkhomich/akka-tracing
A distributed tracing extension for Akka. Provides integration with Play framework, Spray and Akka HTTP. - levkhomich/akka-tracing
- 60A simple FRP library and a web UI framework built on it
https://github.com/nafg/reactive
A simple FRP library and a web UI framework built on it - nafg/reactive
- 61Facebook's React on Scala.JS
https://github.com/japgolly/scalajs-react
Facebook's React on Scala.JS. Contribute to japgolly/scalajs-react development by creating an account on GitHub.
- 62Figaro Programming Language and Core Libraries
https://github.com/charles-river-analytics/figaro
Figaro Programming Language and Core Libraries. Contribute to charles-river-analytics/figaro development by creating an account on GitHub.
- 63Optimus is a mathematical programming library for Scala.
https://github.com/vagmcs/Optimus
Optimus is a mathematical programming library for Scala. - vagmcs/Optimus
- 64Fast JSON parser/generator for Scala
https://github.com/gzoller/ScalaJack
Fast JSON parser/generator for Scala. Contribute to gzoller/ScalaJack development by creating an account on GitHub.
- 65Apache Spark - A unified analytics engine for large-scale data processing
https://github.com/apache/spark
Apache Spark - A unified analytics engine for large-scale data processing - apache/spark
- 66scala SQL api
https://github.com/wangzaixiang/scala-sql
scala SQL api. Contribute to wangzaixiang/scala-sql development by creating an account on GitHub.
- 67Scala support library for integrating the JSON API spec with Spray, Play! or Circe
https://github.com/scala-jsonapi/scala-jsonapi
Scala support library for integrating the JSON API spec with Spray, Play! or Circe - scala-jsonapi/scala-jsonapi
- 68Scala code generator for Avro schemas.
https://github.com/malcolmgreaves/avro-codegen
Scala code generator for Avro schemas. Contribute to malcolmgreaves/avro-codegen development by creating an account on GitHub.
- 69Protocol buffer compiler for Scala.
https://github.com/scalapb/ScalaPB
Protocol buffer compiler for Scala. Contribute to scalapb/ScalaPB development by creating an account on GitHub.
- 70Functional JDBC layer for Scala.
https://github.com/tpolecat/doobie
Functional JDBC layer for Scala. Contribute to tpolecat/doobie development by creating an account on GitHub.
- 71CPU and GPU-accelerated Machine Learning Library
https://github.com/BIDData/BIDMach
CPU and GPU-accelerated Machine Learning Library. Contribute to BIDData/BIDMach development by creating an account on GitHub.
- 72Graph for Scala is intended to provide basic graph functionality seamlessly fitting into the Scala Collection Library. Like the well known members of scala.collection, Graph for Scala is an in-memory graph library aiming at editing and traversing graphs, finding cycles etc. in a user-friendly way.
https://github.com/scala-graph/scala-graph
Graph for Scala is intended to provide basic graph functionality seamlessly fitting into the Scala Collection Library. Like the well known members of scala.collection, Graph for Scala is an in-memo...
- 73Axle Domain Specific Language for Scientific Cloud Computing and Visualization
https://github.com/axlelang/axle
Axle Domain Specific Language for Scientific Cloud Computing and Visualization - axlelang/axle
- 74Lightweight and fast serialization library for Scala 2/3 based on Protocol Buffers with macros
https://github.com/zero-deps/proto
Lightweight and fast serialization library for Scala 2/3 based on Protocol Buffers with macros - zero-deps/proto
- 75Scala Uniquely Bound Classes Under Traits
https://github.com/dickwall/subcut
Scala Uniquely Bound Classes Under Traits. Contribute to dickwall/subcut development by creating an account on GitHub.
- 76Highly available distributed strong eventual consistent and sequentially consistent storage with feeds, sorting and search
https://github.com/zero-deps/kvs
Highly available distributed strong eventual consistent and sequentially consistent storage with feeds, sorting and search - zero-deps/kvs
- 77Single Page Applications running on the server side.
https://github.com/fomkin/korolev
Single Page Applications running on the server side. - fomkin/korolev
- 78A foundational framework for distributed programming.
https://github.com/reactors-io/reactors
A foundational framework for distributed programming. - reactors-io/reactors
- 79A dimensional analysis library based on dependent types
https://github.com/to-ithaca/libra
A dimensional analysis library based on dependent types - to-ithaca/libra
- 80CSV handling library for Scala
https://github.com/nrinaudo/kantan.csv
CSV handling library for Scala. Contribute to nrinaudo/kantan.csv development by creating an account on GitHub.
- 81MessagePack serializer implementation for Scala / msgpack.org[Scala]
https://github.com/msgpack/msgpack-scala
MessagePack serializer implementation for Scala / msgpack.org[Scala] - msgpack/msgpack-scala
- 82uPickle: a simple, fast, dependency-free JSON & Binary (MessagePack) serialization library for Scala
https://github.com/com-lihaoyi/upickle
uPickle: a simple, fast, dependency-free JSON & Binary (MessagePack) serialization library for Scala - com-lihaoyi/upickle
- 83a simple Scala CLI parsing library
https://github.com/scallop/scallop
a simple Scala CLI parsing library. Contribute to scallop/scallop development by creating an account on GitHub.
- 84Add-on module for Jackson (https://github.com/FasterXML/jackson) to support Scala-specific datatypes
https://github.com/FasterXML/jackson-module-scala
Add-on module for Jackson (https://github.com/FasterXML/jackson) to support Scala-specific datatypes - FasterXML/jackson-module-scala
- 85Type-safe data migration tool for Slick, Git and beyond.
https://github.com/lastland/scala-forklift
Type-safe data migration tool for Slick, Git and beyond. - lastland/scala-forklift
- 86A tidy SQL-based DB access library for Scala developers. This library naturally wraps JDBC APIs and provides you easy-to-use APIs.
https://github.com/scalikejdbc/scalikejdbc
A tidy SQL-based DB access library for Scala developers. This library naturally wraps JDBC APIs and provides you easy-to-use APIs. - scalikejdbc/scalikejdbc
- 87Scala compiler plugin that acts like GNU xgettext command to extract i18n strings in Scala source code files to Gettext .po file
https://github.com/xitrum-framework/scala-xgettext
Scala compiler plugin that acts like GNU xgettext command to extract i18n strings in Scala source code files to Gettext .po file - xitrum-framework/scala-xgettext
- 88REScala - distributed and reactive programming embedded in OO and FP programs.
https://github.com/rescala-lang/REScala
REScala - distributed and reactive programming embedded in OO and FP programs. - rescala-lang/REScala
- 89Scala classpath scanner
https://github.com/xitrum-framework/sclasner
Scala classpath scanner. Contribute to xitrum-framework/sclasner development by creating an account on GitHub.
- 90Iteratees for Cats
https://github.com/travisbrown/iteratee
Iteratees for Cats. Contribute to travisbrown/iteratee development by creating an account on GitHub.
- 91Fast, secure JSON library with tight ZIO integration.
https://github.com/zio/zio-json
Fast, secure JSON library with tight ZIO integration. - zio/zio-json
- 92Schema registry for CSV, TSV, JSON, AVRO and Parquet schema. Supports schema inference and GraphQL API.
https://github.com/indix/schemer
Schema registry for CSV, TSV, JSON, AVRO and Parquet schema. Supports schema inference and GraphQL API. - indix/schemer
- 93Play2.x Authentication and Authorization module
https://github.com/t2v/play2-auth
Play2.x Authentication and Authorization module. Contribute to t2v/play2-auth development by creating an account on GitHub.
- 94Jawn is for parsing jay-sawn (JSON)
https://github.com/typelevel/jawn
Jawn is for parsing jay-sawn (JSON). Contribute to typelevel/jawn development by creating an account on GitHub.
- 95An ONNX (Open Neural Network eXchange) API and backend for typeful, functional deep learning and classical machine learning in Scala 3
https://github.com/EmergentOrder/onnx-scala
An ONNX (Open Neural Network eXchange) API and backend for typeful, functional deep learning and classical machine learning in Scala 3 - EmergentOrder/onnx-scala
- 96Labeled records for Scala based on structural refinement types and macros.
https://github.com/scala-records/scala-records
Labeled records for Scala based on structural refinement types and macros. - scala-records/scala-records
- 97Breeze is a numerical processing library for Scala.
https://github.com/scalanlp/breeze
Breeze is a numerical processing library for Scala. - scalanlp/breeze
- 98Scala Library for Reading Flat File Data (CSV/TSV/XLS/XLSX)
https://github.com/frugalmechanic/fm-flatfile
Scala Library for Reading Flat File Data (CSV/TSV/XLS/XLSX) - frugalmechanic/fm-flatfile
- 99Platform to build distributed, scalable, enterprise-wide business applications
https://github.com/annetteplatform/annette
Platform to build distributed, scalable, enterprise-wide business applications - annetteplatform/annette
- 100Cassovary is a simple big graph processing library for the JVM
https://github.com/twitter/cassovary
Cassovary is a simple big graph processing library for the JVM - twitter/cassovary
- 101A concurrent reactive programming framework.
https://github.com/storm-enroute/reactors
A concurrent reactive programming framework. Contribute to storm-enroute/reactors development by creating an account on GitHub.
- 102Library to register and lookup actors by names in an Akka cluster
https://github.com/xitrum-framework/glokka
Library to register and lookup actors by names in an Akka cluster - xitrum-framework/glokka
- 103:cake: doddle-model: machine learning in Scala.
https://github.com/picnicml/doddle-model
:cake: doddle-model: machine learning in Scala. Contribute to picnicml/doddle-model development by creating an account on GitHub.
- 104A Scala API for Apache Beam and Google Cloud Dataflow.
https://github.com/spotify/scio
A Scala API for Apache Beam and Google Cloud Dataflow. - spotify/scio
- 105A mini Scala utility library
https://github.com/scala-hamsters/hamsters
A mini Scala utility library. Contribute to scala-hamsters/hamsters development by creating an account on GitHub.
- 106Powerful new number types and numeric abstractions for Scala.
https://github.com/typelevel/spire
Powerful new number types and numeric abstractions for Scala. - typelevel/spire
- 107A Persistence Framework for Scala and NoSQL
https://github.com/longevityframework/longevity
A Persistence Framework for Scala and NoSQL. Contribute to longevityframework/longevity development by creating an account on GitHub.
- 108Async lightweight Scala web framework
https://github.com/dvarelap/peregrine
Async lightweight Scala web framework. Contribute to dvarelap/peregrine development by creating an account on GitHub.
- 109CSV Reader/Writer for Scala
https://github.com/tototoshi/scala-csv
CSV Reader/Writer for Scala. Contribute to tototoshi/scala-csv development by creating an account on GitHub.
- 110A Thrift parser/generator
https://github.com/twitter/scrooge
A Thrift parser/generator. Contribute to twitter/scrooge development by creating an account on GitHub.
- 111N-dimensional / multi-dimensional arrays (tensors) in Scala 3. Think NumPy ndarray / PyTorch Tensor but type-safe over shapes, array/axis labels & numeric data types
https://github.com/SciScala/NDScala
N-dimensional / multi-dimensional arrays (tensors) in Scala 3. Think NumPy ndarray / PyTorch Tensor but type-safe over shapes, array/axis labels & numeric data types - SciScala/NDScala
- 112A JSR-310 port of nscala_time
https://github.com/chronoscala/chronoscala
A JSR-310 port of nscala_time. Contribute to chronoscala/chronoscala development by creating an account on GitHub.
- 113Lightweight Scala Dependency Injection Library
https://github.com/scaldi/scaldi
Lightweight Scala Dependency Injection Library. Contribute to scaldi/scaldi development by creating an account on GitHub.
- 114A fault tolerant, protocol-agnostic RPC system
https://github.com/twitter/finagle
A fault tolerant, protocol-agnostic RPC system. Contribute to twitter/finagle development by creating an account on GitHub.
- 115Scala library for accessing various file, batch systems, job schedulers and grid middlewares.
https://github.com/openmole/gridscale
Scala library for accessing various file, batch systems, job schedulers and grid middlewares. - openmole/gridscale
- 116JVM - Java, Kotlin, Scala image processing library
https://github.com/sksamuel/scrimage
JVM - Java, Kotlin, Scala image processing library - sksamuel/scrimage
- 117A group of neural-network libraries for functional and mainstream languages
https://github.com/mrdimosthenis/Synapses
A group of neural-network libraries for functional and mainstream languages - mrdimosthenis/Synapses
- 118Alpakka Kafka connector - Alpakka is a Reactive Enterprise Integration library for Java and Scala, based on Reactive Streams and Akka.
https://github.com/akka/alpakka-kafka
Alpakka Kafka connector - Alpakka is a Reactive Enterprise Integration library for Java and Scala, based on Reactive Streams and Akka. - akka/alpakka-kafka
- 119Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
https://github.com/7mind/izumi
Productivity-oriented collection of lightweight fancy stuff for Scala toolchain - 7mind/izumi
- 120Real Time Analytics and Data Pipelines based on Spark Streaming
https://github.com/Stratio/sparta
Real Time Analytics and Data Pipelines based on Spark Streaming - Stratio/sparta
- 121C4E, a JVM friendly library written in Scala for both local and distributed (Spark) Clustering.
https://github.com/Clustering4Ever/Clustering4Ever
C4E, a JVM friendly library written in Scala for both local and distributed (Spark) Clustering. - Clustering4Ever/Clustering4Ever
- 122Scala extensions for Google Guice
https://github.com/codingwell/scala-guice
Scala extensions for Google Guice. Contribute to codingwell/scala-guice development by creating an account on GitHub.
- 123Purely functional genetic algorithms for multi-objective optimisation
https://github.com/openmole/mgo
Purely functional genetic algorithms for multi-objective optimisation - openmole/mgo
- 124A composable command-line parser for Scala.
https://github.com/bkirwi/decline
A composable command-line parser for Scala. Contribute to bkirwi/decline development by creating an account on GitHub.
- 125ABANDONED Pure Scala serialization library with annotations
https://github.com/fomkin/pushka
ABANDONED Pure Scala serialization library with annotations - fomkin/pushka
- 126Modify deeply nested case class fields
https://github.com/softwaremill/quicklens
Modify deeply nested case class fields. Contribute to softwaremill/quicklens development by creating an account on GitHub.
- 127Non-blocking, ultra-fast Scala Redis client built on top of Akka IO, used in production at Livestream
https://github.com/Livestream/scredis
Non-blocking, ultra-fast Scala Redis client built on top of Akka IO, used in production at Livestream - Livestream/scredis
- 128RxScala – Reactive Extensions for Scala – a library for composing asynchronous and event-based programs using observable sequences
https://github.com/ReactiveX/RxScala
RxScala – Reactive Extensions for Scala – a library for composing asynchronous and event-based programs using observable sequences - ReactiveX/RxScala
- 129Asynchronous, Reactive Programming for Scala and Scala.js.
https://github.com/monix/monix
Asynchronous, Reactive Programming for Scala and Scala.js. - monix/monix
- 130Easy way to create Free Monad using Scala macros with first-class Intellij support.
https://github.com/Thangiee/Freasy-Monad
Easy way to create Free Monad using Scala macros with first-class Intellij support. - Thangiee/Freasy-Monad
- 131Eff monad for cats - https://atnos-org.github.io/eff
https://github.com/atnos-org/eff
Eff monad for cats - https://atnos-org.github.io/eff - atnos-org/eff
- 132The missing MatPlotLib for Scala + Spark
https://github.com/vegas-viz/Vegas
The missing MatPlotLib for Scala + Spark. Contribute to vegas-viz/Vegas development by creating an account on GitHub.
- 133Scala extensions for the Kryo serialization library
https://github.com/twitter/chill
Scala extensions for the Kryo serialization library - twitter/chill
- 134Minimal, type-safe RPC Scala library.
https://github.com/yakivy/poppet
Minimal, type-safe RPC Scala library. Contribute to yakivy/poppet development by creating an account on GitHub.
- 135Reactive Microservices for the JVM
https://github.com/lagom/lagom
Reactive Microservices for the JVM. Contribute to lagom/lagom development by creating an account on GitHub.
- 136A scala extension for Project Reactor's Flux and Mono
https://github.com/spring-attic/reactor-scala-extensions
A scala extension for Project Reactor's Flux and Mono - spring-attic/reactor-scala-extensions
- 137Scala testing library with actionable errors and extensible APIs
https://github.com/scalameta/munit
Scala testing library with actionable errors and extensible APIs - scalameta/munit
- 138Scala wrapper for SnakeYAML
https://github.com/jcazevedo/moultingyaml
Scala wrapper for SnakeYAML. Contribute to jcazevedo/moultingyaml development by creating an account on GitHub.
- 139SynapseGrid is a framework for constructing dynamic low latency data flow systems.
https://github.com/Primetalk/SynapseGrid
SynapseGrid is a framework for constructing dynamic low latency data flow systems. - Primetalk/SynapseGrid
- 140Distributed NoSQL Database
https://github.com/stephenmcd/curiodb
Distributed NoSQL Database. Contribute to stephenmcd/curiodb development by creating an account on GitHub.
- 141Abstract Algebra for Scala
https://github.com/twitter/algebird
Abstract Algebra for Scala. Contribute to twitter/algebird development by creating an account on GitHub.
- 142Spark package to "plug" holes in data using SQL based rules ⚡️ 🔌
https://github.com/indix/sparkplug
Spark package to "plug" holes in data using SQL based rules ⚡️ 🔌 - GitHub - indix/sparkplug: Spark package to "plug" holes in data using SQL based rules ⚡️ 🔌
- 143A simple testing framework for Scala
https://github.com/com-lihaoyi/utest
A simple testing framework for Scala. Contribute to com-lihaoyi/utest development by creating an account on GitHub.
- 144Scalable Image Analysis and Shape Modelling
https://github.com/unibas-gravis/scalismo
Scalable Image Analysis and Shape Modelling. Contribute to unibas-gravis/scalismo development by creating an account on GitHub.
- 145Web-based notebook that enables data-driven, interactive data analytics and collaborative documents with SQL, Scala and more.
https://github.com/apache/zeppelin
Web-based notebook that enables data-driven, interactive data analytics and collaborative documents with SQL, Scala and more. - apache/zeppelin
- 146Mutation testing for Scala
https://github.com/stryker-mutator/stryker4s
Mutation testing for Scala. Contribute to stryker-mutator/stryker4s development by creating an account on GitHub.
- 147Streaming MapReduce with Scalding and Storm
https://github.com/twitter/summingbird
Streaming MapReduce with Scalding and Storm. Contribute to twitter/summingbird development by creating an account on GitHub.
- 148A library that toggles Scala code at compile-time, like #if in C/C++
https://github.com/ThoughtWorksInc/enableIf.scala
A library that toggles Scala code at compile-time, like #if in C/C++ - ThoughtWorksInc/enableIf.scala
- 149Casbah is now officially end-of-life (EOL).
https://github.com/mongodb/casbah
Casbah is now officially end-of-life (EOL). Contribute to mongodb/casbah development by creating an account on GitHub.
- 150Build highly concurrent, distributed, and resilient message-driven applications on the JVM
https://github.com/akka/akka
Build highly concurrent, distributed, and resilient message-driven applications on the JVM - akka/akka
- 151A framework to create embedded Domain-Specific Languages in Scala
https://github.com/ThoughtWorksInc/Dsl.scala
A framework to create embedded Domain-Specific Languages in Scala - ThoughtWorksInc/Dsl.scala
- 152Scala library for boilerplate-free, type-safe data transformations
https://github.com/scalalandio/chimney
Scala library for boilerplate-free, type-safe data transformations - scalalandio/chimney
- 153Interactive and Reactive Data Science using Scala and Spark.
https://github.com/spark-notebook/spark-notebook
Interactive and Reactive Data Science using Scala and Spark. - spark-notebook/spark-notebook
- 154TensorFlow API for the Scala Programming Language
https://github.com/eaplatanios/tensorflow_scala
TensorFlow API for the Scala Programming Language. Contribute to eaplatanios/tensorflow_scala development by creating an account on GitHub.
- 155numsca is numpy for scala
https://github.com/botkop/numsca
numsca is numpy for scala. Contribute to botkop/numsca development by creating an account on GitHub.
- 156A cohesive & pragmatic framework of FP centric Scala libraries
https://github.com/frees-io/freestyle
A cohesive & pragmatic framework of FP centric Scala libraries - frees-io/freestyle
- 157Build software better, together
https://github.com/Sciss/ScalaCollider
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.
- 158A lightweight, clean and simple JSON implementation in Scala
https://github.com/spray/spray-json
A lightweight, clean and simple JSON implementation in Scala - spray/spray-json
- 159A new Scala wrapper for Joda Time based on scala-time
https://github.com/nscala-time/nscala-time
A new Scala wrapper for Joda Time based on scala-time - nscala-time/nscala-time
- 160Convenient and performant logging library for Scala wrapping SLF4J.
https://github.com/lightbend-labs/scala-logging
Convenient and performant logging library for Scala wrapping SLF4J. - lightbend-labs/scala-logging
- 161Blindsight is a Scala logging API with DSL based structured logging, fluent logging, semantic logging, flow logging, and context aware logging.
https://github.com/tersesystems/blindsight
Blindsight is a Scala logging API with DSL based structured logging, fluent logging, semantic logging, flow logging, and context aware logging. - tersesystems/blindsight
- 162Command Line Interface Scala Toolkit
https://github.com/backuity/clist
Command Line Interface Scala Toolkit. Contribute to backuity/clist development by creating an account on GitHub.
- 163command line options parsing for Scala
https://github.com/scopt/scopt
command line options parsing for Scala. Contribute to scopt/scopt development by creating an account on GitHub.
- 164Schema safe, type-safe, reactive Scala driver for Cassandra/Datastax Enterprise
https://github.com/outworkers/phantom
Schema safe, type-safe, reactive Scala driver for Cassandra/Datastax Enterprise - outworkers/phantom
- 165A Scala API for Cascading
https://github.com/twitter/scalding
A Scala API for Cascading. Contribute to twitter/scalding development by creating an account on GitHub.
- 166The fastest logging library in the world. Built from scratch in Scala and programmatically configurable.
https://github.com/outr/scribe
The fastest logging library in the world. Built from scratch in Scala and programmatically configurable. - outr/scribe
- 167State of the Art Natural Language Processing
https://github.com/JohnSnowLabs/spark-nlp
State of the Art Natural Language Processing. Contribute to JohnSnowLabs/spark-nlp development by creating an account on GitHub.
- 168Essential Building Blocks for Scala
https://github.com/wvlet/airframe
Essential Building Blocks for Scala. Contribute to wvlet/airframe development by creating an account on GitHub.
- 169ZIO — A type-safe, composable library for async and concurrent programming in Scala
https://github.com/zio/zio
ZIO — A type-safe, composable library for async and concurrent programming in Scala - zio/zio
- 170Lightweight, modular, and extensible library for functional programming.
https://github.com/typelevel/cats
Lightweight, modular, and extensible library for functional programming. - typelevel/cats
- 171Scala validation library
https://github.com/jap-company/fields
Scala validation library. Contribute to jap-company/fields development by creating an account on GitHub.
- 172Cask: a Scala HTTP micro-framework
https://github.com/com-lihaoyi/cask
Cask: a Scala HTTP micro-framework. Contribute to com-lihaoyi/cask development by creating an account on GitHub.
- 173Slick extensions for PostgreSQL
https://github.com/tminglei/slick-pg
Slick extensions for PostgreSQL. Contribute to tminglei/slick-pg development by creating an account on GitHub.
- 174First class syntax support for type classes in Scala
https://github.com/typelevel/simulacrum
First class syntax support for type classes in Scala - typelevel/simulacrum
- 175Persist-Json, a Fast Json Parser Written in Scala
https://github.com/nestorpersist/json
Persist-Json, a Fast Json Parser Written in Scala. Contribute to nestorpersist/json development by creating an account on GitHub.
- 176Refinement types for Scala
https://github.com/fthomas/refined
Refinement types for Scala. Contribute to fthomas/refined development by creating an account on GitHub.
- 177Generic programming for Scala
https://github.com/milessabin/shapeless
Generic programming for Scala. Contribute to milessabin/shapeless development by creating an account on GitHub.
- 178Lift Framework
https://github.com/lift/framework
Lift Framework. Contribute to lift/framework development by creating an account on GitHub.
- 179Fast, testable, Scala services built on TwitterServer and Finagle
https://github.com/twitter/finatra
Fast, testable, Scala services built on TwitterServer and Finagle - twitter/finatra
- 180Build software better, together
https://github.com/wireapp/wire-signals
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.
- 181The Opinionated RabbitMQ Library for Scala and Akka
https://github.com/SpinGo/op-rabbit
The Opinionated RabbitMQ Library for Scala and Akka - SpinGo/op-rabbit
- 182JSON typeclasses that know the difference between null and absent fields
https://github.com/nrktkt/ninny-json
JSON typeclasses that know the difference between null and absent fields - nrktkt/ninny-json
- 183Scala macros for compile-time generation of safe and ultra-fast JSON codecs + circe booster
https://github.com/plokhotnyuk/jsoniter-scala
Scala macros for compile-time generation of safe and ultra-fast JSON codecs + circe booster - plokhotnyuk/jsoniter-scala
- 184LoMRF is an open-source implementation of Markov Logic Networks
https://github.com/anskarl/LoMRF
LoMRF is an open-source implementation of Markov Logic Networks - anskarl/LoMRF
- 185property based testing library for Scala
https://github.com/scalaprops/scalaprops
property based testing library for Scala. Contribute to scalaprops/scalaprops development by creating an account on GitHub.
- 186Yet another JSON library for Scala
https://github.com/circe/circe
Yet another JSON library for Scala. Contribute to circe/circe development by creating an account on GitHub.
- 187Native Scala mocking framework
https://github.com/paulbutcher/ScalaMock
Native Scala mocking framework. Contribute to paulbutcher/ScalaMock development by creating an account on GitHub.
- 188OAuth 2.0 server-side implementation written in Scala
https://github.com/nulab/scala-oauth2-provider
OAuth 2.0 server-side implementation written in Scala - nulab/scala-oauth2-provider
- 189A small, convenient, dependency-free library for command-line argument parsing in Scala
https://github.com/com-lihaoyi/mainargs
A small, convenient, dependency-free library for command-line argument parsing in Scala - com-lihaoyi/mainargs
- 190Scala + Druid: Scruid. A library that allows you to compose queries in Scala, and parse the result back into typesafe classes.
https://github.com/ing-bank/scruid
Scala + Druid: Scruid. A library that allows you to compose queries in Scala, and parse the result back into typesafe classes. - ing-bank/scruid
- 191akka-persistence-gcp-datastore is a journal and snapshot store plugin for akka-persistence using google cloud firestore in datastore mode.
https://github.com/innFactory/akka-persistence-gcp-datastore
akka-persistence-gcp-datastore is a journal and snapshot store plugin for akka-persistence using google cloud firestore in datastore mode. - GitHub - innFactory/akka-persistence-gcp-datastore: akk...
- 192Mirror of Apache Kafka
https://github.com/apache/kafka
Mirror of Apache Kafka. Contribute to apache/kafka development by creating an account on GitHub.
- 193:leaves: Non-blocking, Reactive MongoDB Driver for Scala
https://github.com/ReactiveMongo/ReactiveMongo
:leaves: Non-blocking, Reactive MongoDB Driver for Scala - ReactiveMongo/ReactiveMongo
- 194Scala GraphQL implementation
https://github.com/sangria-graphql/sangria
Scala GraphQL implementation. Contribute to sangria-graphql/sangria development by creating an account on GitHub.
- 195Functional, stream-based CSV processor for Scala
https://github.com/fingo/spata
Functional, stream-based CSV processor for Scala. Contribute to fingo/spata development by creating an account on GitHub.
- 196ActiveRecord-like ORM library for Scala
https://github.com/aselab/scala-activerecord
ActiveRecord-like ORM library for Scala. Contribute to aselab/scala-activerecord development by creating an account on GitHub.
- 197A Future-free Fs2 native pure FP Redis client
https://github.com/laserdisc-io/laserdisc
A Future-free Fs2 native pure FP Redis client. Contribute to laserdisc-io/laserdisc development by creating an account on GitHub.
- 198Scala framework for building beautiful and maintainable web applications.
https://github.com/UdashFramework/udash-core
Scala framework for building beautiful and maintainable web applications. - UdashFramework/udash-core
- 199Main Portal page for the Jackson project
https://github.com/FasterXML/jackson
Main Portal page for the Jackson project. Contribute to FasterXML/jackson development by creating an account on GitHub.
- 200Library to read, analyze, transform and generate Scala programs
https://github.com/scalameta/scalameta
Library to read, analyze, transform and generate Scala programs - scalameta/scalameta
- 201Compositional, streaming I/O library for Scala
https://github.com/typelevel/fs2
Compositional, streaming I/O library for Scala. Contribute to typelevel/fs2 development by creating an account on GitHub.
- 202The Community Maintained High Velocity Web Framework For Java and Scala.
https://github.com/playframework/playframework
The Community Maintained High Velocity Web Framework For Java and Scala. - playframework/playframework
- 203Scala lightweight, type-safe, asynchronous driver for neo4j
https://github.com/neotypes/neotypes
Scala lightweight, type-safe, asynchronous driver for neo4j - GitHub - neotypes/neotypes: Scala lightweight, type-safe, asynchronous driver for neo4j
- 204Type-safe general-cryptography library - https://jmcardon.github.io/tsec/
https://github.com/jmcardon/tsec
Type-safe general-cryptography library - https://jmcardon.github.io/tsec/ - jmcardon/tsec
- 205JSON library
https://github.com/json4s/json4s
JSON library. Contribute to json4s/json4s development by creating an account on GitHub.
- 206Web & mobile client-side akka-http sessions, with optional JWT support
https://github.com/softwaremill/akka-http-session
Web & mobile client-side akka-http sessions, with optional JWT support - softwaremill/akka-http-session
- 207Lightweight and Nonintrusive Scala Dependency Injection Library
https://github.com/softwaremill/macwire
Lightweight and Nonintrusive Scala Dependency Injection Library - softwaremill/macwire
- 208Rings: efficient JVM library for polynomial rings
https://github.com/PoslavskySV/rings
Rings: efficient JVM library for polynomial rings. Contribute to PoslavskySV/rings development by creating an account on GitHub.
- 209Typesafe, purely functional Computational Intelligence
https://github.com/ciren/cilib
Typesafe, purely functional Computational Intelligence - ciren/cilib
- 210An experimental library for Functional Reactive Programming in Scala
https://github.com/lihaoyi/scala.rx
An experimental library for Functional Reactive Programming in Scala - lihaoyi/scala.rx
- 211New ReactiveCouchbase driver using reactive-streams
https://github.com/ReactiveCouchbase/reactivecouchbase-rs-core
New ReactiveCouchbase driver using reactive-streams - ReactiveCouchbase/reactivecouchbase-rs-core
- 212Simple, safe and intuitive Scala I/O
https://github.com/pathikrit/better-files
Simple, safe and intuitive Scala I/O. Contribute to pathikrit/better-files development by creating an account on GitHub.
- 213Reactive type-safe Scala driver for SQL databases
https://github.com/outworkers/morpheus
Reactive type-safe Scala driver for SQL databases. Contribute to outworkers/morpheus development by creating an account on GitHub.
- 214Lamma schedule generator for Scala is a professional schedule generation library for periodic schedules like fixed income coupon payment, equity deravitive fixing date generation etc.
https://github.com/maxcellent/lamma
Lamma schedule generator for Scala is a professional schedule generation library for periodic schedules like fixed income coupon payment, equity deravitive fixing date generation etc. - GitHub - m...
- 215Tiny High Performance HTTP Server for Scala
https://github.com/analogweb/analogweb-scala
Tiny High Performance HTTP Server for Scala . Contribute to analogweb/analogweb-scala development by creating an account on GitHub.
- 216A test framework that runs everything in parallel.
https://github.com/disneystreaming/weaver-test
A test framework that runs everything in parallel. - GitHub - disneystreaming/weaver-test: A test framework that runs everything in parallel.
- 217Clickhouse Scala Client with Reactive Streams support
https://github.com/crobox/clickhouse-scala-client
Clickhouse Scala Client with Reactive Streams support - crobox/clickhouse-scala-client
- 218Memcached client for Scala
https://github.com/monix/shade
Memcached client for Scala. Contribute to monix/shade development by creating an account on GitHub.
- 219A schema-aware Scala library for data transformation
https://github.com/galliaproject/gallia-core
A schema-aware Scala library for data transformation - galliaproject/gallia-core
- 220Efficient CBOR and JSON (de)serialization in Scala
https://github.com/sirthias/borer
Efficient CBOR and JSON (de)serialization in Scala - sirthias/borer
- 221A purely functional Scala client for CouchDB
https://github.com/beloglazov/couchdb-scala
A purely functional Scala client for CouchDB. Contribute to beloglazov/couchdb-scala development by creating an account on GitHub.
- 222The Play JSON library
https://github.com/playframework/play-json
The Play JSON library. Contribute to playframework/play-json development by creating an account on GitHub.
- 223Image comparison by hash codes
https://github.com/poslegm/scala-phash
Image comparison by hash codes. Contribute to poslegm/scala-phash development by creating an account on GitHub.
- 224Avro schema generation and serialization / deserialization for Scala
https://github.com/sksamuel/avro4s
Avro schema generation and serialization / deserialization for Scala - sksamuel/avro4s
- 225Scala combinator library for working with binary data
https://github.com/scodec/scodec
Scala combinator library for working with binary data - scodec/scodec
- 226Minimal, idiomatic, customizable validation Scala library.
https://github.com/yakivy/dupin
Minimal, idiomatic, customizable validation Scala library. - yakivy/dupin
- 227An implementation of an OAuth2 server designed for mocking/testing
https://github.com/zalando-stups/OAuth2-mock-play
An implementation of an OAuth2 server designed for mocking/testing - zalando-stups/OAuth2-mock-play
- 228A type-safe, reflection-free, powerful enumeration implementation for Scala with exhaustive pattern match warnings and helpful integrations.
https://github.com/lloydmeta/enumeratum
A type-safe, reflection-free, powerful enumeration implementation for Scala with exhaustive pattern match warnings and helpful integrations. - lloydmeta/enumeratum
- 229Optics library for Scala
https://github.com/optics-dev/Monocle
Optics library for Scala. Contribute to optics-dev/Monocle development by creating an account on GitHub.
- 230Scala etcd client implementing V3 APIs
https://github.com/mingchuno/etcd4s
Scala etcd client implementing V3 APIs. Contribute to mingchuno/etcd4s development by creating an account on GitHub.
- 231An asynchronous programming facility for Scala
https://github.com/scala/scala-async
An asynchronous programming facility for Scala. Contribute to scala/scala-async development by creating an account on GitHub.
- 232Accord: A sane validation library for Scala
https://github.com/wix/accord
Accord: A sane validation library for Scala. Contribute to wix-incubator/accord development by creating an account on GitHub.
- 233A data access library for Scala + Postgres.
https://github.com/tpolecat/skunk
A data access library for Scala + Postgres. Contribute to typelevel/skunk development by creating an account on GitHub.
- 234tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android
https://github.com/tinylog-org/tinylog
tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android - tinylog-org/tinylog
- 235A purely functional library to build distributed and event-driven systems
https://github.com/parapet-io/parapet
A purely functional library to build distributed and event-driven systems - parapet-io/parapet
- 236Non-blocking, Reactive Redis driver for Scala (with Sentinel support)
https://github.com/etaty/rediscala
Non-blocking, Reactive Redis driver for Scala (with Sentinel support) - etaty/rediscala
- 237Wonderful reusable code from Twitter
https://github.com/twitter/util
Wonderful reusable code from Twitter. Contribute to twitter/util development by creating an account on GitHub.
- 238The Scala API for Quantities, Units of Measure and Dimensional Analysis
https://github.com/typelevel/squants
The Scala API for Quantities, Units of Measure and Dimensional Analysis - typelevel/squants
- 239Squid – type-safe metaprogramming and compilation framework for Scala
https://github.com/epfldata/squid
Squid – type-safe metaprogramming and compilation framework for Scala - epfldata/squid
- 240Principled Functional Programming in Scala
https://github.com/scalaz/scalaz
Principled Functional Programming in Scala. Contribute to scalaz/scalaz development by creating an account on GitHub.
- 241sbt plugin that generates Scala case classes for easy, statically typed and implicit access of JSON data e.g. from API responses
https://github.com/battermann/sbt-json
sbt plugin that generates Scala case classes for easy, statically typed and implicit access of JSON data e.g. from API responses - battermann/sbt-json
- 242Accelerate local LLM inference and finetuning (LLaMA, Mistral, ChatGLM, Qwen, Baichuan, Mixtral, Gemma, Phi, MiniCPM, etc.) on Intel CPU and GPU (e.g., local PC with iGPU, discrete GPU such as Arc, Flex and Max); seamlessly integrate with llama.cpp, Ollama, HuggingFace, LangChain, LlamaIndex, GraphRAG, DeepSpeed, vLLM, FastChat, Axolotl, etc.
https://github.com/intel-analytics/BigDL
Accelerate local LLM inference and finetuning (LLaMA, Mistral, ChatGLM, Qwen, Baichuan, Mixtral, Gemma, Phi, MiniCPM, etc.) on Intel CPU and GPU (e.g., local PC with iGPU, discrete GPU such as Arc,...
- 243Mockito for Scala language
https://github.com/mockito/mockito-scala
Mockito for Scala language. Contribute to mockito/mockito-scala development by creating an account on GitHub.
- 244High-performance SLF4J wrapper for Scala.
https://github.com/Log4s/log4s
High-performance SLF4J wrapper for Scala. Contribute to Log4s/log4s development by creating an account on GitHub.
- 245🔍 Elasticsearch Scala Client - Reactive, Non Blocking, Type Safe, HTTP Client
https://github.com/sksamuel/elastic4s
🔍 Elasticsearch Scala Client - Reactive, Non Blocking, Type Safe, HTTP Client - Philippus/elastic4s
- 246aossie / Agora · GitLab
https://gitlab.com/aossie/Agora/
An Electronic Voting Library implemented in Scala
- 247aossie / Scavenger · GitLab
https://gitlab.com/aossie/Scavenger
A theorem prover based on the conflict resolution calculus
- 248SBT plugin for tweaking various IDE settings
https://github.com/JetBrains/sbt-ide-settings
SBT plugin for tweaking various IDE settings. Contribute to JetBrains/sbt-ide-settings development by creating an account on GitHub.
- 249An HTTP Server and Client library for Scala.
https://github.com/criteo/lolhttp
An HTTP Server and Client library for Scala. Contribute to criteo/lolhttp development by creating an account on GitHub.
- 250Scalafmt · Code formatter for Scala
https://scalameta.org/scalafmt/
Code formatter for Scala
- 251sbt plugin that can check Maven and Ivy repositories for dependency updates
https://github.com/rtimush/sbt-updates
sbt plugin that can check Maven and Ivy repositories for dependency updates - rtimush/sbt-updates
- 252Scala command-line wrapper around ffmpeg, ffprobe, ImageMagick, and other tools relating to media.
https://github.com/outr/media4s
Scala command-line wrapper around ffmpeg, ffprobe, ImageMagick, and other tools relating to media. - outr/media4s
- 253friendly little parsers
https://github.com/tpolecat/atto
friendly little parsers. Contribute to tpolecat/atto development by creating an account on GitHub.
- 254simple combinator-based parsing for Scala. formerly part of the Scala standard library, now a separate community-maintained module
https://github.com/scala/scala-parser-combinators
simple combinator-based parsing for Scala. formerly part of the Scala standard library, now a separate community-maintained module - scala/scala-parser-combinators
Related Articlesto learn about angular.
- 1Introduction to Scala: Beginner’s Guide
- 2Understanding Scala’s Type System: Types and Generics
- 3Functional Programming with Scala
- 4Advanced Functional Programming in Scala: Monads, Functors, and More
- 5Building RESTful APIs with Scala and Akka HTTP: A Beginner’s Guide
- 6Play Framework for Scala Web Development: A Step-by-Step Guide
- 7Concurrency in Scala: Mastering Futures and Promises
- 8Optimizing Scala Performance: Tips for High-Performance Scala Applications
- 9Developing a Scala-based Chat Application: From Concept to Deployment
- 10Creating a Scala-based Data Processing Pipeline: Handling Big Data Efficiently
FAQ'sto learn more about Angular JS.
mail [email protected] to add more queries here 🔍.
- 1
can scala do functional programming
- 2
is scala worth learning in 2023
- 3
is scala popular
- 4
is scala a popular language
- 5
why was scala created
- 6
is scala better than python
- 7
can scala use java libraries
- 8
what is the paradigm of the scala programming language
- 9
why use scala programming language
- 10
should i learn scala
- 11
is scala a good language
- 12
is scala a programming language
- 13
where is la scala opera house located
- 14
when was scala created
- 15
how does scala work
- 16
where is scala installed on windows
- 17
why scala is called functional programming language
- 18
does scala use jvm
- 19
where is scala programming language used
- 20
what is scala software
- 21
why learn scala
- 22
why scala over java
- 23
why scala over python
- 24
- 25
where scala is used
- 26
how to learn scala programming
- 27
is scala a popular programming language
- 28
where is la scala located
- 30
who developed scala
- 31
what is scala code
- 32
why scala is not popular
- 33
- 34
- 35
which of the following programming paradigm does scala support
- 36
- 37
can i use scala code in java
- 38
how is scala different from python
- 39
who created scala
- 40
when scala spark
- 41
is scala dead 2023
- 42
who invented scala
- 43
where is la scala located in italy
- 44
- 45
why scala is functional programming language
- 46
is scala open source
- 47
what is scala mostly used for
- 48
is scala written in java
- 49
is scala a dying language
- 50
what is scala programming language used for
- 51
is scala a good programming language
- 52
why scala is better than java
- 53
what is scala programming
- 54
when to use scala
- 55
can i learn scala without java
- 56
does scala compile to java
- 57
why scala is used
- 58
what is functional programming in scala
- 59
should i learn scala reddit
- 60
should i learn java or scala
- 61
how to pronounce scala programming language
- 63
does scala run on jvm
- 64
what is scala programming used for
- 65
who uses scala programming language
- 66
is scala functional programming
More Sitesto check out once you're finished browsing here.
https://www.0x3d.site/
0x3d is designed for aggregating information.
https://nodejs.0x3d.site/
NodeJS Online Directory
https://cross-platform.0x3d.site/
Cross Platform Online Directory
https://open-source.0x3d.site/
Open Source Online Directory
https://analytics.0x3d.site/
Analytics Online Directory
https://javascript.0x3d.site/
JavaScript Online Directory
https://golang.0x3d.site/
GoLang Online Directory
https://python.0x3d.site/
Python Online Directory
https://swift.0x3d.site/
Swift Online Directory
https://rust.0x3d.site/
Rust Online Directory
https://scala.0x3d.site/
Scala Online Directory
https://ruby.0x3d.site/
Ruby Online Directory
https://clojure.0x3d.site/
Clojure Online Directory
https://elixir.0x3d.site/
Elixir Online Directory
https://elm.0x3d.site/
Elm Online Directory
https://lua.0x3d.site/
Lua Online Directory
https://c-programming.0x3d.site/
C Programming Online Directory
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
https://r-programming.0x3d.site/
R Programming Online Directory
https://perl.0x3d.site/
Perl Online Directory
https://java.0x3d.site/
Java Online Directory
https://kotlin.0x3d.site/
Kotlin Online Directory
https://php.0x3d.site/
PHP Online Directory
https://react.0x3d.site/
React JS Online Directory
https://angular.0x3d.site/
Angular JS Online Directory