mapres is a Python library for resolving placeholder strings using structured, layered data maps. Define your template context as typed Python dataclasses, compose maps in priority-ordered layers, and let mapres handle substitution — with support for multiple syntax styles, recursive resolution, pipeline transforms, and built-in color and time utilities.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/iFamishedX/mapres/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install mapres from PyPI and get your environment set up in seconds.
Quickstart
Resolve your first placeholder string in under five minutes.
Core Concepts
Understand DataMaps, the Resolver, Layers, and Syntax patterns.
API Reference
Full reference for every class, method, and decorator in mapres.
Key Features
Multiple Syntax Styles
Choose from
{braces}, ${dollars}, <angles>, or %percents% — or define your own regex pattern.Layered Resolution
Stack maps with priority ordering so overrides and fallbacks work naturally across any context.
@datamap Decorator
Turn any Python dataclass into a typed template context with a single decorator.
Built-in Maps
Ship with ColorMap (ANSI + Minecraft) and TimeMap (dynamic date/time with timezone support).
Pipeline Transforms
Chain custom text transformation functions before or after map substitution.
LRU Caching
Enable built-in LRU caching for high-throughput repeated resolution with zero extra dependencies.