shortfx¶
"Write less, do more." "The deterministic toolset your AI agents can trust."
shortfx is a Python library that encapsulates complex programming logic into 3,000+ reusable functions, organized like Excel formulas. It also serves as a deterministic toolset for AI agents via llms.txt and a built-in MCP server.
-
3,000+ Functions
The largest open-source Python formula library — dates, math, finance, statistics, strings, Excel & VBA compatibility.
-
AI-Native via MCP
Built-in Model Context Protocol server lets AI agents discover, inspect, and execute any function as a tool.
-
Zero Dependencies
Core library uses only the Python standard library — no NumPy, no Pandas.
-
llms.txtIncluded
A machine-readable function catalogue so LLMs can look up signatures and descriptions without calling a server.
Module Overview¶
| Module | Functions | Scope |
|---|---|---|
fxNumeric |
1,602 | Finance, statistics, geometry, transforms, series, number theory |
fxExcel |
489 | Excel-compatible formulas (VLOOKUP, PMT, CONCATENATE …) |
fxString |
331 | Text manipulation, regex, hashing, validation, encoding, similarity |
fxDate |
261 | Date operations, evaluations, conversions, system dates |
fxVBA |
133 | VBA/Access-compatible functions (Left, InStr, Format …) |
fxPython |
116 | Iterable utilities, type conversions, logic helpers |
Quick Example¶
from shortfx import fxDate, fxExcel, fxNumeric
# Date arithmetic
from datetime import datetime
new_date = fxDate.date_operations.add_time_to_date(datetime(2025, 1, 15), 30, "days")
# Excel-style VLOOKUP
table = [["Name", "Age"], ["Ana", 25], ["Juan", 30]]
age = fxExcel.VLOOKUP("Ana", table, 2) # 25
# Financial calculations
fv = fxNumeric.finance_functions.future_value(rate=0.05, nper=10, pmt=-100, pv=-1000)