| Crates.io | openpathresolver |
| lib.rs | openpathresolver |
| version | 0.1.1 |
| created_at | 2026-01-09 05:25:05.075796+00 |
| updated_at | 2026-01-11 06:02:48.182283+00 |
| description | A simple path resolution framework |
| homepage | |
| repository | https://github.com/scott-wilson/openpathresolver |
| max_upload_size | |
| id | 2031622 |
| size | 152,491 |
This project is designed to answer two questions. How to build a project or workspace folder structure and how to query for where to write to/where to find paths.
The workspace resolver is designed to not directly build a workspace. Instead it will provide information to an IO function that is responsible for creating the workspace. It is always assumed that the resolver cannot understand what the "root user" or "read and write permissions" means for a given organization. Instead, it'll provide context to a developer so they can decide where to create a file or directory, what are the permissions, owner, etc.
The path resolver is designed to take some fields and a key, then return the path.
There are sibling functions that can extract the information from the path based on
what information is provided. For example, get_key will get the key from a path and
fields, while get_fields will get the fields from the path and key. The find_paths
is slightly different in that it will find all of the paths for a key, while the fields
will control the filtering. For example, if there's a path
path/to/{entity}/{version}, and the fields {"entity": "foo"} are supplied, then
this will find all of the "foo" version paths such as
["path/to/foo/001", "path/to/foo/002"].
cd /to/your/project
cargo add openpathresolver
cd /path/to/openpathresolver/bindings/python
python -m pip install ".[build]"
python -m maturin develop