ππ¦ fimod
ποΈ Mold your data, shape your CI, play with your pipelines πͺΆ Python-powered molding without Python installed.
π‘ DRY your pipelines Β· Slim your container images Β· Tame your configs
fimod (Flexible Input, Mold Output Data) embeds Pydantic Monty (a Rust implementation of Python) in a single binary (~2.3 MB, UPX-compressed). You write the transform logic; fimod handles parsing, format detection, and I/O.
# π― One-liner
fimod s -i data.json -e '[u for u in data if u["active"]]'
# π Reusable script
fimod s -i input.csv -m cleanup.py -o output.json
# π Format conversion
fimod s -i config.yaml -e 'data' -o config.toml
# π₯ Fetch from URLs β no curl, no wget, no pipes!
fimod s -i https://api.github.com/repos/pytgaen/fimod -e 'data["name"]' --output-format txt
β¨ Features
-
Python you already know
No new DSL. Write
for,if, comprehensions, string methods β it's just Python. -
Single binary
No runtime, no
pip install, no dependencies. One ~2.3 MB binary (UPX-compressed) that works everywhere. -
All the formats
JSON Β· NDJSON Β· YAML Β· TOML Β· CSV Β· TXT Β· Lines β auto-detected from extension.
-
Batteries included
re_*regex Β·dp_*dotpath Β·it_*iteration Β·hs_*hashing Β·msg_*logging Β·gk_*validation Β·env_substβ no imports needed. -
π Awesome π₯ Your input can be an HTTPS request!
Awesome:
-i https://...just works β fimod fetches (viareqwestwith proxy and HTTPS support), parses, and transforms in one shot. Goodbyecurl | jq!
πΊοΈ Guides
Start here if you're new to fimod.
-
Quick Start
Install fimod and run your first transform in 2 minutes.
-
Concepts
The pipeline, Monty, molds, and the security model β how it all fits together.
-
Mold Scripting
Write transforms with built-in regex, dotpath, iteration, and hash helpers.
-
CLI Reference
All options and modes β slurp, check, no-input, in-place, args, debug, and more.
π Reference
Lookup tables and complete specifications.
-
Formats
JSON, NDJSON, YAML, TOML, CSV, TXT, Lines β behavior and options for each.
-
Built-ins
Complete signatures for
re_*,dp_*,it_*,hs_*,msg_*,gk_*,env_subst,set_exit,set_input_format,set_output_format,set_output_file,args,headers. -
Mold Defaults
# fimod:directives β embed format and option defaults directly in scripts. -
Exit Codes
--checktruthiness table andset_exitbehavior explained.
π³ Cookbook
Practical recipes β filtering, aggregation, regex, format conversion, validation, data generation, slurp, and more.
β οΈ Project Status
Early-stage software
fimod is young software, built with AI-assisted development ("vibe coding").
- Monty is an early-stage Rust implementation of Python by Pydantic. Its API is unstable and may introduce breaking changes.
- fimod depends directly on Monty and inherits that instability. Expect breaking changes as both projects mature.
- Versioning follows Semantic Versioning β breaking changes bump the major version.
- Built-in helpers (
re_*,dp_*,it_*,hs_*,msg_*,gk_*,env_subst) are implemented in Rust to complement Monty's limited stdlib. In particular, regex functions use fancy-regex syntax (Rust/PCRE2 flavour), not Python'sremodule β see Built-ins β Regex.
Regex: Fimod built-ins vs Monty's re module
Fimod was originally built on Monty v0.0.6, which had no regex support.
We introduced re_search, re_sub, re_findall, etc. as Fimod built-in functions to fill that gap β a good example of the challenges of moving fast alongside a young runtime.
Since Monty v0.0.8, import re works β Monty implements a subset of Python's re module.
Both approaches now work side by side:
- Fimod's
re_*built-ins β direct access to fancy-regex, including advanced features like variable-length lookbehind/lookahead import reβ familiar Python API, but only partially implemented in Monty (also backed by fancy-regex under the hood)
The re_* built-ins are here to stay for the foreseeable future (at least until late 2027). As Monty's re module matures, we'll reconsider.
Since import re is already well-known to Python developers, the documentation focuses on the re_* built-ins which are specific to Fimod.