A fast, composable functional lens library for manipulating nested data structures in Elixir.
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.
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.
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.
Fastest tool to access data in Elixir
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
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.
Paths can be combined and reused for get, set, update, and delete operations without concatenation overhead, enabling efficient, reusable data access patterns.
Designed to be intuitive like Enum and Map, with clear error messages and a cheatsheet for common tasks, reducing boilerplate code.
Built on a simple path-closure primitive, allowing any implementation complying with Pathex.t() spec to be integrated, fostering customization.
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.
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.
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.