Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Scala Native
  3. skunk

skunk

MITScalav1.0.0

A purely functional, type-safe data access library for Scala applications using PostgreSQL.

Visit WebsiteGitHubGitHub
1.7k stars174 forks0 contributors

What is skunk?

Skunk is a data access library for Scala applications that connects to PostgreSQL databases. It provides a purely functional, type-safe API for executing SQL queries and commands, ensuring compile-time validation and preventing common runtime errors. The library is designed to integrate seamlessly with functional programming ecosystems like Cats Effect and FS2.

Target Audience

Scala developers building applications with PostgreSQL who prioritize type safety, functional programming principles, and maintainable database code. It's especially suited for teams using Cats Effect, FS2, or similar functional libraries.

Value Proposition

Developers choose Skunk for its strong type safety, pure functional design, and deep PostgreSQL integration. It eliminates many runtime database errors through compile-time checks and offers a composable, resource-safe API that aligns with modern functional Scala practices.

Overview

A data access library for Scala + Postgres.

Use Cases

Best For

  • Building type-safe database layers in Scala applications
  • Integrating PostgreSQL with Cats Effect-based systems
  • Handling large query results efficiently with streaming
  • Ensuring compile-time validation of SQL statements
  • Writing maintainable, purely functional database code
  • Leveraging PostgreSQL-specific features in a Scala context

Not Ideal For

  • Projects using databases other than PostgreSQL (e.g., MySQL, SQLite)
  • Teams not already using or familiar with Cats Effect and functional programming patterns
  • Rapid prototyping where ORM-style abstractions and automatic migrations are preferred over raw SQL

Pros & Cons

Pros

Compile-Time SQL Validation

Skunk validates SQL statements and result types at compile time, preventing runtime errors like type mismatches or missing columns, as highlighted in its type-safe SQL feature.

Functional Programming Integration

Built on Cats Effect and FS2, it ensures referential transparency and resource safety, making it ideal for purely functional Scala codebases that prioritize correctness.

PostgreSQL-Specific Optimizations

Leverages PostgreSQL's binary protocol and advanced data types for efficient communication and native feature support, optimizing performance for Postgres-specific use cases.

Efficient Streaming Support

Uses FS2 streams to handle large result sets without loading all data into memory, enabling scalable data processing for applications with high-volume queries.

Cons

PostgreSQL-Only Lock-In

Skunk is designed exclusively for PostgreSQL, so projects requiring multi-database support or future migration to other systems face significant rework or need additional libraries.

Functional Programming Overhead

Its reliance on Cats Effect and monadic patterns adds complexity for developers unfamiliar with functional Scala, increasing the onboarding time and potential for confusion.

Limited Documentation Depth

The README directs users to an external microsite for details, which can fragment learning resources and make initial setup and troubleshooting more cumbersome.

Frequently Asked Questions

Quick Stats

Stars1,658
Forks174
Contributors0
Open Issues79
Last commit3 days ago
CreatedSince 2018

Tags

#database-driver#functional-programming#database#postgres#type-safety#data-access#typelevel#cats-effect#postgresql#scala#cats#sql

Built With

C
Cats-Effect
S
Scala

Links & Resources

Website

Included in

Scala Native273
Auto-fetched 1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub