Polars · PySpark · pandas · Whole-directory lineage

You vibe code. We catch what breaks.

AI writes Python fast. It also brings back deprecated APIs, mixes up pandas and Polars syntax, and leaves Spark jobs that quietly burn compute. PyFluent finds those problems across your whole repo and fixes the ones that are safe to fix.

  • Fixes AI-generated pandas, Polars, PySpark, Snowpark, and embedded SQL
  • Maps cross-file dependencies and upgrades Polars to 2.0 across your whole repo
  • Plugs into Cursor and Claude over MCP so code is checked before you commit
Same result every run No per-token AI costs Never runs your code or touches your data
claims_agg.py → claims_agg_upgraded.pyPolars 0.20 → 1.0
- df.groupby("plan").agg(pl.count())
+ df.group_by('plan').agg(pl.len())
- pl.col("amount").cumsum()
+ pl.col('amount').cum_sum()
- out.melt(id_vars="plan")
+ out.unpivot(index='plan')
- out.join(wide, on="plan", how="outer")
+ out.join(wide, on='plan', how='full')
Excerpt from one run. 7 renames rewritten across the file.
py-assess ./jobsRun stages + cross-file lineage
RUN ORDER (files in the same stage can run in parallel)
  Stage 1: jobs/ingest.py              writes staging.orders_clean
  Stage 2: jobs/enrich.py              reads staging.* → writes mart.order_enriched
  Stage 3: jobs/audit.py | report.py   parallel readers of mart.order_enriched
  Stage 4: jobs/export_polars.py       reads s3://lake/reports/daily/*.parquet
  library (not a job): config.py, helpers.py
  WARN shuffle-in-loop [jobs/enrich.py:22]: .groupBy() inside a loop
  INFO shared-read: raw.orders is read by 4 jobs; share or cache
Follows table names from config.py through helpers.py into the job that runs them.
spark_sql_job.py → spark_sql_job_snowflake.pyHive → Snowflake
- SELECT nvl(plan_id, 'NA') AS plan, count(*) AS n
+ SELECT COALESCE(plan_id, 'NA') AS plan, COUNT(*) AS n
- FROM staging.claims LATERAL VIEW explode(codes) c AS code
+ FROM staging.claims, LATERAL FLATTEN(INPUT => codes) AS c(...)
Review note: FLATTEN returns VARIANT; cast value::VARCHAR where the type matters.
I edited jobs/enrich.py. Did I break any downstream jobs?
assess_python · ./jobs
mart.order_enriched is read by jobs/audit.py and jobs/report.py in Stage 3. Also found shuffle-in-loop at line 22. Fix before commit?
Illustrative session. Checks cross-file impact across the directory without pasting files into a prompt.

Industry first · Whole-directory static intelligence

Linters see one file. LLMs lose the plot across many. PyFluent maps the whole directory in seconds.

In real data repos, the table name lives in config.py, the spark.table() call sits inside helpers.py, and a Polars script downstream reads the Parquet folder a Spark job wrote. Single-file tools see none of that. PyFluent connects the entire folder continuously as you work.

Whole folders in seconds

Analyzes large directories of Python and notebook files locally in seconds, so you can re-run it continuously as you edit.

Cross-file folding

Folds constants, f-strings, CFG["k"] dict lookups, imported constants and helper arguments across files—and credits the read or write to the job that actually runs it.

1 graph, 3 engines

PySpark tables, embedded spark.sql() queries, pandas files and Polars scan_parquet("dir/*.parquet") globs all join a single writer-to-reader dependency graph.

How PyFluent follows a table across 3 files Credits the job, not the helper
1 · config.pyimported module
TABLES = {"orders": "raw.orders"}
2 · helpers.pylibrary helper (not a job)
def load(spark, name): return spark.table(name)
3 · jobs/ingest.pyentry-point job
orders = load(spark, config.TABLES["orders"])
Resolved: jobs/ingest.py reads dataset raw.orders (via helpers.py:5). helpers.py is marked library code, not a pipeline stage. If a name is computed at runtime, PyFluent flags it unresolved instead of guessing.

Automatic execution stages & cross-file hazards

From the directory's reads and writes, PyFluent computes topological run order, parallel stages, and repository-wide hazards no single-file tool can see:

Stage 1
jobs/ingest.pyreads raw.* → writes staging.*
Stage 2
jobs/enrich.pyjoins staging.* → mart.order_enriched
Stage 3
jobs/audit.pyjobs/report.pyparallel stage
Stage 4
jobs/export_polars.pyPolars reads Spark's Parquet dir
Library
config.pyhelpers.pyimported; excluded from run order
cycle repo hazard · Two or more jobs depend on each other through datasets; no valid run order exists.
multi-writer collision · Multiple jobs write the same dataset without explicit ordering.
shared-read & uncalled-function · Tables scanned by 3+ jobs, and helper functions nothing in the directory calls.

Why PyFluent

Predictable by design.

PyFluent reads your code with static analysis and applies exact rewrites. There are no prompts to write and no usage meter running, and the same code always gets the same fix.

Inexpensive

No token bill

PyFluent doesn't call an LLM, so there is no per-token cost to pass on. Monthly plans for individual developers and teams include tier usage limits (with extra usage available on any tier), plus Enterprise for large repos and MCP integrations. See plans →

Fast

Runs on your machine

It parses source locally in seconds, including directly on a Windows laptop. No round trip to a model API and no waiting on a long response, so you can run it over a whole folder as often as you like.

Predictable

Same input, same output

Rewrites are deterministic, and every finding is labeled proven, likely or unknown. You can diff it, review it and audit it.

Pairs well with AI. Let your assistant draft the code and PyFluent check it. See how below.

Vibe coding & MCP

Vibe code freely. Catch the problems before GitHub.

If you write code with Cursor or Claude, add the MCP server and your assistant checks its output against the whole directory and fixes bad patterns as it writes—adding no model calls of its own.

01

Assistant writes

Cursor or Claude drafts the code.

your AI, your choice
02

PyFluent checks

Checks unsaved code and cross-file dependencies in seconds.

assess & optimize
03

PyFluent fixes

The safe rewrites are applied. You review the diff.

fix_python
04

You commit clean

Problems are caught before the commit, not in code review.

nothing saved until you say

Map the directory

Cross-file dataset lineage, run order, cycles and waves.

assess_python

Review what it wrote

Find slow or risky patterns in code just produced.

optimize_python

Fix it safely

Apply the 8 deterministic rewrites, plus findings you accept.

fix_python

Switch engines

pandas, PySpark, Polars and Snowpark, with a review list.

convert_python

Plan the upgrade

PySpark 2.4 → 4.x and Python 3.7 → 3.15 breaking changes.

scan_upgrade

Prove the move

Static check of dataset reads and writes and column lineage.

verify_migration
.cursor/mcp.jsonstdio or --http
{
  "mcpServers": {
    "pyfluent": {
      "command": "pyfluent-mcp",
      "args": []
    }
  }
}

A Cursor rule ships with it, so the assistant knows when to call the tools. See the vibe-coding workflow →

Want a hard gate for the whole team? A pre-commit hook and a GitHub Action with SARIF are coming next.

Jobs it takes off your plate

The work nobody wants to do by hand.

Each card jumps to real output for that job.

Real output

Before and after, on code you would recognize.

The first three tabs are output from the current build. The fourth is a worked Spark example: the engine finds the problems, and a developer accepts each change.

claims_agg.py · Polars 0.20BEFORE · breaks on 1.0+
import polars as pl

df = pl.read_csv("claims.csv", dtypes={"id": pl.Utf8})
out = (
    df.groupby("plan")
    .agg(
        pl.count(),
        pl.col("amount").cumsum().alias("running")
    )
    .with_column(pl.col("plan").str.lengths().alias("n"))
)
wide = out.melt(id_vars="plan")
both = out.join(wide, on="plan", how="outer")
claims_agg_upgraded.py · Polars 1.0 / 2.0AFTER · PyFluent upgrade
import polars as pl

df = pl.read_csv('claims.csv', schema_overrides={'id': pl.Utf8})
out = (
    df.group_by('plan')
    .agg(
        pl.len(),
        pl.col('amount').cum_sum().alias('running')
    )
    .with_columns(pl.col('plan').str.len_chars().alias('n'))
)
wide = out.unpivot(index='plan')
both = out.join(wide, on='plan', how='full')
Static verify: syntax valid · the claims.csv read is preserved · 7 renames rewritten.
member_bands.py · pandasBEFORE
import pandas as pd

df = pd.read_csv("claims.csv")
df = df[df["amount"] > 0]
df["band"] = df["amount"] * 2
top = df.groupby("plan")["amount"].sum().reset_index()
member_bands_polars.py · PolarsAFTER
import polars as pl

df = pl.read_csv('claims.csv')
df = df.filter(pl.col('amount') > 0)
df = df.with_columns((pl.col('amount') * 2).alias('band'))
top = df.group_by('plan').agg(pl.col('amount').sum()).sort('plan')
Static verify: column lineage matches (amount, band, plan) · the explicit .sort('plan') preserves pandas group ordering.
spark_sql_job.py · HiveBEFORE
df = spark.sql(
    'SELECT nvl(plan_id, \'NA\') AS plan, count(*) AS n '
    'FROM staging.claims '
    'LATERAL VIEW explode(codes) c AS code '
    'GROUP BY nvl(plan_id, \'NA\')'
)
spark_sql_job_snowflake.py · SnowflakeAFTER · SQLForge
df = spark.sql("""
SELECT
  COALESCE(plan_id, 'NA') AS plan,
  COUNT(*) AS n
FROM staging.claims,
  LATERAL FLATTEN(INPUT => codes) AS c(SEQ, KEY, PATH, INDEX, VALUE, THIS)
GROUP BY
  COALESCE(plan_id, 'NA')
""")
Review note emitted: “LATERAL VIEW explode became LATERAL FLATTEN, which returns VARIANT values. Cast the value (for example value::VARCHAR) where the element type matters.”

1. The loop keeps only the last plan needs a developer

score_nightly.pyAS WRITTEN
for plan in ("hmo", "ppo", "epo"):
    part = saved.filter(
        F.col("plan_id") == plan)
    totals = part.groupBy("member_id").agg(
        F.sum("risk_score").alias("plan_score"))
    totals.write.mode("overwrite") \
        .saveAsTable("mart.plan_scores")
recommendedAFTER
totals = (
    scored
    .filter(F.col("plan_id").isin(
        "hmo", "ppo", "epo"))
    .groupBy("plan_id", "member_id")
    .agg(F.sum("risk_score").alias("plan_score"))
)
totals.write.mode("overwrite") \
    .saveAsTable("mart.plan_scores")

2. The job saves a table and loads it straight back auto-rewrite

score_nightly.pyAS WRITTEN
scored.write.mode("overwrite") \
    .saveAsTable("mart.member_bands")
saved = spark.table("mart.member_bands")
recommendedAFTER
scored.write.mode("overwrite") \
    .saveAsTable("mart.member_bands")
# later steps use scored
Why 1 needs a person: the loop overwrote mart.plan_scores on every pass, so only EPO survived. The fix adds a plan_id column to that table, which changes its contents. PyFluent shows the diff and waits for you to accept it. It names no speedup, because static analysis can't see your data volume.

Safe to run on real repos

What PyFluent claims, and what it leaves alone.

What it does

  • Reads whole directories with AST, control-flow and dependence analysis. Your code is never executed.
  • Follows table names across imports, config dicts and helper functions—and flags dynamic runtime names as unresolved instead of guessing.
  • Labels each finding proven, likely or unknown.
  • Writes to a suffixed copy. Your open files are not modified.
  • Gives the same output for the same input, every run.

What it won't claim

  • No speedup numbers. It can't see your data volume or cluster, so it never says “3× faster”.
  • Verify is a static contract, not a data check. It doesn't run both versions or compare rows.
  • It doesn't connect to your data, clusters, warehouses or accounts.
  • It doesn't send your code to a model. Rewrites are deterministic.

Use it with what you have

PyFluent fills the gaps between the tools you already run.

Vendor migrators, linters and AI assistants each do their job well. PyFluent covers the parts they skip, and works alongside them.

NeedVendor migrators
Snowflake SMA, Databricks Lakebridge
Linters
pyspark-antipattern, CatalystOps
AI assistants alonePyFluent
Whole-directory cross-file lineage & run orderPlatform inventory onlySingle file onlyLoses context across many filesFull directory in seconds: stages, cycles & helper folding
Engine-neutral movesInto their own platformDetection onlyDepends on the promptpandas, Polars, PySpark, Snowpark
Polars version upgradesNot coveredNot coveredMay mix old and new APIsDeterministic 0.19/0.20 → 2.0
Rewrites you can predictPartial mappingReports, no rewritesVaries run to run8 AST auto-rewrites, same every run
SQL inside Python stringsSkippedNot coveredCan break f-strings30 → 16 dialects, f-strings kept
Teaches the target APINoNoUnchecked proseWorked lessons for the call you click

Where it runs

Available today, and what ships next.

Dashed cards are on the roadmap, not released.

MCP server

Available

8 tools for Cursor, Claude and any MCP client, plus a Cursor rule.

pyfluent-mcp

Workbench

Available

Local review UI: dependency graph, Side-by-side, Cells and Coach views, Verify tab and 997 lessons.

See the Workbench →

CLI

Available

Assess a whole directory from the terminal in seconds. Handles .py, .ipynb and Databricks notebooks.

py-assess ./jobs

pip install from PyPI

Coming

A public package and a pyfluent ui command.

pre-commit + GitHub Action

Coming

Block deprecated calls in a pull request, with SARIF annotations.

VS Code extension

Coming

Findings and quick fixes in the editor.

Show your manager

An easy yes for your team.

You already know where the afternoons go: Polars upgrades, engine moves, Spark jobs that rescan the same table, and tracing what breaks across a large folder of scripts. Here's the note to send.

No tokensMonthly subscription with tier limits, not a token meter. Individual developer and Team plans include monthly usage caps—and you can pay to unlock more usage on any tier. Enterprise adds large-estate scale, MCP integrations, and Autopilot, which runs assess, fix, convert or upgrade, and Verify across a repo unattended, then hands you one diff to approve.
Whole repoMaps entire directories in seconds. Traces datasets across configs, helpers and jobs, and computes execution stages and cycles.
0 runNothing is executed and nothing you opened is edited. Changes arrive as a diff you review.
  • Are we locked to one cloud?No. pandas, Polars, PySpark and Snowpark in the directions you need.
  • Does it work with our AI tools?Yes. The MCP server connects it to Cursor or Claude, and teams without an AI assistant can run it on its own.
note-to-manager.txt
Hi,

I'd like to get access to PyFluent.

What it does: it reads our entire directory of Python, pandas, Polars and PySpark code in seconds with static analysis, so results are repeatable and there are no usage costs. It maps cross-file dataset dependencies and run order, flags the lines that waste Spark compute or break on the next library release, and rewrites the safe ones as a diff I review. If we vibe code, its optional MCP server lets Cursor or Claude check and fix their own output before it reaches GitHub.

Why now: [add the upgrade or migration you're facing].

To request access: hello@pyfluent.ai
More: https://pyfluent.ai/

Questions developers ask

FAQ

Does PyFluent work with AI coding assistants?
Yes. The MCP server lets Cursor or Claude check and fix their own output against the whole directory. PyFluent itself uses static analysis and exact rewrites, so its results are the same every run and there are no tokens to buy. It also runs on its own from the CLI or the Workbench.
How does it trace dependencies across a whole directory?
It parses every file in the folder in seconds, resolves imports across modules, folds constants (including f-strings and config dictionaries), and substitutes arguments through helper calls. From the entry-point jobs, it builds the writer-to-reader dataset graph, layers it into execution stages, and flags cycles or multi-writer collisions.
Does PyFluent run my code?
No. It parses your source into an AST and analyzes control flow and data dependence. It never executes your code and never connects to your data, clusters, warehouses or accounts.
Why not just ask my AI assistant to map the repo or do the upgrade?
An LLM loses cross-file links across large directories, and its API rewrites can vary from run to run. PyFluent maps the whole folder deterministically in seconds and applies the exact renames for your target version. Use both: the assistant drafts, PyFluent checks.
What does Verify prove?
A static contract: the output parses, it reads and writes the same datasets, column lineage matches, and embedded SQL statement counts match. It does not run both versions or compare rows.
What happens when it can't convert or resolve something?
It goes to a review list with the file and line, and runtime dataset names are listed as unresolved. The tool doesn't guess.
Can I use it today?
The CLI, Workbench and MCP server work today. The PyPI package and a lighter free build are next. Email us for an early build.
Who makes PyFluent?
PyFluent is a product of MigryX, the team behind deterministic parsers that move SAS, COBOL and legacy ETL to Databricks, Snowflake and Python.

Keep vibing. We'll handle the cleanup.

Book a 30-minute demo and see PyFluent on code like yours.