Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Elixir
  3. pathex

pathex

BSD-2-ClauseElixir

A fast, composable functional lens library for manipulating nested data structures in Elixir.

GitHubGitHub
364 stars17 forks0 contributors

What is pathex?

Pathex is a library for performing fast actions with nested data structures in Elixir using the functional lens pattern. It allows developers to trivially set, get, and update values in structures in a functional manner, solving the problem of slow or limited data access in existing tools.

Target Audience

Elixir developers working with nested data structures who need efficient and composable data manipulation, such as those handling GenServer state, JSON, HTML, or AST transformations.

Value Proposition

Developers choose Pathex because it combines high performance (up to 160x faster than alternatives) with full composability, eliminating boilerplate code while providing an easy-to-use API similar to Elixir's standard library.

Overview

Fastest tool to access data in Elixir

Use Cases

Best For

  • Manipulating deeply nested maps and keyword lists in Elixir
  • Building reusable data access patterns for GenServer state
  • Transforming JSON structures efficiently
  • Working with HTML or Elixir AST in a functional way
  • Replacing boilerplate getter/setter functions in modules
  • Performance-critical data access where built-in `Access` is too slow

Not Ideal For

  • Projects running on Elixir 1.17 or 1.18 due to documented bugs that block reliable usage
  • Applications with flat or shallow data structures where Elixir's built-in Map and Keyword modules are sufficient
  • Teams that prioritize minimal dependencies and prefer standard library tools like Access for simple data access

Pros & Cons

Pros

Blazing Fast Performance

Uses pattern-matching compilation to achieve speeds up to 160x faster than Focus and 2-3x faster than built-in put_in/get_in, as verified in independent benchmarks.

Highly Composable Paths

Paths can be combined and reused for get, set, update, and delete operations without concatenation overhead, enabling efficient, reusable data access patterns.

User-Friendly API

Designed to be intuitive like Enum and Map, with clear error messages and a cheatsheet for common tasks, reducing boilerplate code.

Extensible Architecture

Built on a simple path-closure primitive, allowing any implementation complying with Pathex.t() spec to be integrated, fostering customization.

Cons

Version Compatibility Issues

Has known bugs with Elixir 1.17 and 1.18 that block reliable usage, requiring users to avoid these versions or wait for fixes, which can hinder adoption in legacy projects.

Niche Adoption and Ecosystem

As a specialized library, it has a smaller community and fewer third-party resources compared to standard Elixir data manipulation tools, limiting support and integrations.

Initial Learning Investment

Introduces the functional lens pattern, which may be unfamiliar to developers used to imperative or simpler functional approaches, despite the easy API, adding cognitive load.

Frequently Asked Questions

Quick Stats

Stars364
Forks17
Contributors0
Open Issues5
Last commit1 year ago
CreatedSince 2020

Tags

#elixir#library#lenses#macros#lens#pattern-matching#composable#beam#data-manipulation#performance

Built With

E
Elixir
B
BEAM

Included in

Elixir13.1k
Auto-fetched 1 day ago

Related Projects

typed_structtyped_struct

An Elixir library for defining structs with a type without writing boilerplate code.

Stars770
Forks38
Last commit8 months ago
opusopus

A framework for pluggable business logic components

Stars371
Forks21
Last commit2 years ago
pipespipes

Macros for more flexible composition with the Elixir Pipe operator

Stars323
Forks22
Last commit8 years ago
shorter_mapsshorter_maps

Elixir ~M sigil for map shorthand. `~M{id, name} ~> %{id: id, name: name}`

Stars234
Forks10
Last commit2 years 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