Metadata-Version: 2.4
Name: messidata
Version: 0.1.0
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Utilities
Classifier: Topic :: Software Development :: Libraries
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: build ; extra == 'dev'
Requires-Dist: maturin ; extra == 'dev'
Provides-Extra: dev
License-File: LICENSE
Summary: ⚽ The GOAT of data wrangling — a Messi tribute + Rust-powered CLI.
Keywords: data,cli,csv,json,wrangling,messi,football,etl
Author-email: Sriravi Provez <sriravi@provez.ai>
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/Sraviprovez/messidata
Project-URL: Issues, https://github.com/Sraviprovez/messidata/issues
Project-URL: Repository, https://github.com/Sraviprovez/messidata

# ⚽ messidata — The GOAT of data wrangling

> *The GOAT of data wrangling — a Messi tribute + Rust-powered CLI.*

![face](docs/face.gif)
![ankara](docs/ankara.gif)

## Install

```bash
pip install messidata
```

## Why?

Fast Rust internals (PyO3 + Rayon + memchr) for I/O and CPU hot paths,
zero required Python runtime deps (stdlib only), and two-audience naming:
every command is both a genuine data-wrangling tool and a wink to Lionel Messi.

## Commands

| Command | Unix analogue | Example |
|---|---|---|
| `dribble` | `cat` | `messidata dribble a.log b.log` |
| `assist` | — | `messidata assist -o all.log *.log` |
| `scout` | `grep` | `messidata scout "ERROR" app.log -n` |
| `press` | `grep -r` | `messidata press "TODO" src --include "*.py"` |
| `rank` | `sort` | `messidata rank players.csv -b goals -d` |
| `statsheet` | `wc` | `messidata statsheet big.log` |
| `matchreport` | — | `messidata matchreport players.csv --json` |
| `trophy` | — | `messidata trophy players.csv -c goals -n 3` |
| `hattrick` | — | `messidata hattrick players.csv -c goals` |
| `goals` | — | `messidata goals players.csv -c goals assists` |
| `nutmeg` | `cut` | `messidata nutmeg players.csv name goals` |
| `freekick` | `sed` | `messidata freekick "Messi" "LEO" players.csv -c name` |
| `solo` | `uniq` | `messidata solo dup.log -o clean.log` |
| `tikitaka` | `join` | `messidata tikitaka a.csv b.csv --on id` |
| `offside` | — | `messidata offside "goals > 30" players.csv` |
| `draft` | — | `messidata draft players.csv -n 5` |
| `kickoff` | `head` | `messidata kickoff big.log -n 20` |
| `stoppage` | `tail` | `messidata stoppage big.log -n 20` |
| `lineup` | — | `messidata lineup players.csv` |
| `halves` | — | `messidata halves big.log -n 4 --out-dir parts` |
| `cap` | — | `messidata cap players.csv -c age --lo 0 --hi 40` |
| `chip` | — | `messidata chip players.csv -c name -n 10` |
| `panenka` | — | `messidata panenka data.csv -c age --with mean` |
| `tackle` | — | `messidata tackle data.csv --drop-null age` |
| `firsttouch` | — | `messidata firsttouch "\\d+" big.log` |
| `volley` | — | `messidata volley players.csv -c goals --op + 5` |
| `rabona` | — | `messidata rabona players.csv --as total --expr "goals+assists"` |
| `no-look` | — | `messidata no-look players.csv --map "goals:scores"` |
| `counter` | — | `messidata counter players.csv -c country` |
| `formation` | — | `messidata formation long.csv --index i --columns c --values v` |
| `golazo` | — | `messidata golazo players.csv -c goals` |
| `var` | — | `messidata var players.csv --rule "goals:range:0:100"` |
| `campnou` | — | `messidata campnou players.csv -n 10` |
| `goldenboot` | — | `messidata goldenboot players.csv --by country --agg sum --on goals` |
| `messiten` | — | `messidata messiten players.csv -c goals` |
| `copa` | — | `messidata copa players.csv -c name` |
| `slide` | — | `messidata slide players.csv -c goals -n 1 --fill 0` |
| `subs` | — | `messidata subs players.csv -c country --map "Argentina=ARG"` |
| `goat` | — | `messidata goat players.csv` |
| `face` | — | `messidata face --animate` |
| `ankara` | — | `messidata ankara --loops 2` |
| `chant` | — | `messidata chant -n 3` |
| `engine` | — | `messidata engine` |

## Performance

500 MB log, 8 cores (2023-class laptop, `bench/bench.sh` + `hyperfine`):

| Command | Pure Python | Rust | Speedup |
|---|---|---|---|
| `scout "ERROR" big.log` | ~4.2 s | ≤ 0.35 s | ≥ 12× |
| `statsheet big.log` | ~1.9 s | ≤ 0.15 s | ≥ 12× |
| `solo big.log` | ~0.9 s | ≤ 0.10 s | ≥ 9× |
| `offside "level >= 4" big.csv` | ~3.0 s | ≤ 0.25 s | ≥ 12× |

## Rust engine

Hot paths (`scout`, `statsheet`, `solo`, `goals`, `offside`, `matchreport`)
run in Rust via PyO3 + Rayon + memchr with `abi3-py39` wheels.
If the native extension fails to load, the package falls back to
pure-Python implementations. Only `messidata engine` prints a warning;
imports never raise.

## Tribute

A fan project honouring Lionel Messi — the Ankara Messi, the dribbles,
the World Cup. Not affiliated with or endorsed by Lionel Messi.

## Licence

MIT — see [LICENSE](LICENSE). Contributions welcome — see [CONTRIBUTING.md](CONTRIBUTING.md).

