Mapi turns spreadsheet-shaped venue section-row maps into compact, validated, diffable, cacheable infrastructure values. It is a FastAPI/Python portfolio project focused on a real ticketing operations problem, using synthetic data.
Broker operations teams often maintain section-row maps manually. A section can contain numeric rows, repeated-letter rows, gaps, and aliases that refer to the same physical position. If those maps stay as ad hoc spreadsheet rows, every downstream system has to rediscover the same rules.
13=13W need one shared position.The core model is RowOut(name, position). Compact DSL strings are source
values. Expanded rows, stats, diffs, Redis records, and review triggers are
deterministic derivatives.
The DSL supports:
1:12AA:DDDD:AA8:19!13=13W21WCThe API is versioned under /api/v1/row-progression. It exposes parsing,
compression, stats, venue building, venue diffing, spreadsheet-shaped import,
and deterministic Pydantic AI analysis.
Parser behavior is tested with unit examples and property-based round-trip checks. Compression is canonical: it preserves row names and positions, not the exact original source string.
CSV or API records shaped like section,row,position are grouped by section,
validated, converted to typed rows, and compressed with the same canonical
compressor used by the rest of the system.
The compact DSL can be stored as a Redis string or hash field. Expanded rows can be cached as JSON. Derived flags such as row count, gaps, and aliases can become queryable index fields for review workflows.
The Pydantic AI agent returns parser-grounded guidance: why the row map matters, which Redis keys to use, and which review triggers are present. The default agent uses a local function model and does not require external credentials.
The test suite covers parser edge cases, spreadsheet import validation, API contracts, CLI behavior, and the deterministic agent endpoint.
All venues, sections, rows, Redis keys, and workflow events in this repository are synthetic examples. The project does not include broker, customer, marketplace, provider, or production inventory data.
Real deployment work would add authenticated ingestion, venue-map revision history, review queues, provider adapters, audit logging, and operational monitoring. Those are documented as extensions, not claimed as implemented.