Skip to main content

flograph

A visual node-based Python programming environment: flow-based dataflow on an infinite Blueprint-style canvas, where every node is real, editable Python.

status

Install

flograph is a standard pip-installable package (hatchling build backend):

pip install .            # or: uv pip install .   /   pip install -e .

This puts a flograph command on your PATH and makes python -m flograph work. To build a distributable wheel/sdist instead:

python -m build          # or: uv build   ->   dist/flograph-*.whl

The project was renamed from flopy to flograph because flopy is already taken on PyPI (USGS MODFLOW).

One-file script (no install)

If you can't pip install on a given machine (locked-down work laptop, no package-index access, etc.) but PySide6, pandas, jedi, and psutil are already available there, build a single self-contained .py file instead:

python scripts/build_onefile.py          # writes dist/flograph_onefile_<version>.py

Copy (or email yourself) that one file and run it directly — no install step, no flograph package needed on the target machine:

python flograph_onefile_<version>.py     # or: python flograph_onefile_<version>.py project.flograph

It embeds flograph's own source as a base64 zip and unpacks it to a temp dir at startup; it does not bundle the third-party dependencies themselves.

Run it

flograph                 # console entry point (after install)
python -m flograph                          # equivalent module entry point
python main.py project.flograph             # open a project
python -m flograph.engine.headless project.flograph   # run without GUI

The idea

  • Nodes are Python scripts. Every node — including the shipped library — is a small module: a NODE dict declaring typed ports, an optional PARAMS list that auto-generates its properties form, and a run(ctx, **inputs) function. Double-click any node to read or fork its code in the built-in editor (syntax highlighting, jedi completion, error markers on the failing line).
  • Dataflow semantics. Data flows through typed ports; execution is a topological walk of the dirty subgraph; every node's outputs are cached, so re-runs only recompute what changed. Status LEDs: gray idle, yellow queued, pulsing blue running, green done, red error.
  • Inspect everything. Click any node or wire to see the data on it — paged table view for DataFrames (millions of rows are fine), matplotlib figures with a toolbar, pretty-printed objects. Per-node stdout/logs in the console dock.

Canvas

Action Binding
Add node Tab (search palette), right-click, or drag from the library
Connect drag from a port; drop on empty canvas to pick a compatible node
Reroute dot double-click a wire
Comment frame Ctrl+G around the selection (frames move their contents)
Run all / selected / cancel F5 / F6 / Esc
Pan / zoom middle-drag or Space+drag / wheel
Frame view F
Duplicate / delete Ctrl+D / Del
Undo anything Ctrl+Z — every graph mutation is on the undo stack

Projects are plain JSON (.flograph); caches are never saved, so a reopened project is fully reproducible with one F5.

Node library

The shipped library covers the essentials:

  • IO — read/write CSV, Excel, Parquet, JSON (incl. JSONL), SQLite (query in, table out), inline Table.
  • Transform — Select Columns, Filter Rows, Sort, Join, Group By, Expression, Concatenate, Missing Values, Duplicate Row Filter, Rename Columns, Pivot, Unpivot, Row Sampling, Convert Types, String Manipulation, Statistics.
  • Viz — Show Table, Show Plot (live on-canvas cards), Show Plotly (fully interactive plotly.js chart embedded on the canvas — hover, zoom and pan in place; needs pip install plotly, e.g. via Tools > Manage Packages).
  • Scripting / Util — Python Script, Constant, Reroute, Note, Action Button.

Packages

Tools > Manage Packages installs, upgrades and uninstalls pip packages in flograph's own environment (the venv running the app). Nodes execute in-process, so anything installed there is immediately importable from a node's run() — no restart needed for new installs; upgrades of modules the app has already imported take effect on the next launch. The dialog uses pip when the interpreter has it and falls back to uv pip (uv-made venvs ship without pip); flograph's own core dependencies are protected from uninstall.

Writing a node

"""My Node

Docstring first paragraph shows in the properties panel.
"""
NODE = {
    "label": "My Node",
    "category": "Transform",
    "inputs":  [("table", "dataframe")],
    "outputs": [("result", "dataframe")],
}
PARAMS = [
    {"name": "factor", "type": "float", "default": 1.0},
]

def run(ctx, table):
    ctx.log(f"scaling by {ctx.params['factor']}")
    ctx.check_cancelled()          # cooperative cancellation
    return {"result": table * ctx.params["factor"]}

Port types: any, dataframe, series, number, string, bool, object, figure. columns-typed params render with a ▾ picker listing the columns of the DataFrames cached on the node's inputs (run upstream once to populate it); add "multi": False for single-column params so picking replaces instead of toggling a comma list. Rules: treat inputs as read-only (outputs are cached by reference); heavy imports go inside run(); matplotlib figures must use the OO API (matplotlib.figure.Figure()), never pyplot.

Drop new .py files under src/flograph/nodes/<category>/ and they appear in the library on next launch.

Development

uv pip install -p .venv/bin/python -e ".[dev]"
QT_QPA_PLATFORM=offscreen .venv/bin/python -m pytest tests/

Architecture (src layout):

  • flograph/core — Qt-free model: graph, typed ports, script contract, registry, JSON serialization. Fully unit-testable; a poison test keeps Qt and pandas out of its import graph.
  • flograph/engine — background execution: plan builder, single-thread pool worker, output cache, cancellation, per-node stdout capture, tracebacks mapped to node script lines.
  • flograph/nodes — the standard library; each node is a script file loaded as text through the same contract as user code.
  • flograph/ui — canvas (QGraphicsView from scratch), code editor, inspector, properties, console. One rule everywhere: QUndoCommands are the only writers to the graph; items react to graph events.

Changelog

See CHANGELOG.md for what's new in each version.

License

MIT — free for commercial and private use, modification, and redistribution; just keep the copyright and license notice.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flograph-0.1.7.tar.gz (301.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flograph-0.1.7-py3-none-any.whl (279.6 kB view details)

Uploaded Python 3

File details

Details for the file flograph-0.1.7.tar.gz.

File metadata

  • Download URL: flograph-0.1.7.tar.gz
  • Upload date:
  • Size: 301.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Bazzite","version":"44","id":"Kinoite","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for flograph-0.1.7.tar.gz
Algorithm Hash digest
SHA256 98fc09c1d6523bdacac70f308b7a75fba0361b99fc5fdf16d9235b97b2cdc420
MD5 480e266b9884c88519055cd7ec36223c
BLAKE2b-256 00c946fb69728995301e06929d3fba32e0cc2d588b2476c077bf4afb30e1293e

See more details on using hashes here.

File details

Details for the file flograph-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: flograph-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 279.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Bazzite","version":"44","id":"Kinoite","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for flograph-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6a80efd973b9a078b18b2b6ed09bcaeacf5ccb996feefce8a3b0b270a092b2ab
MD5 ef8b7722e7614d660f27ad91fe1ecf27
BLAKE2b-256 7ca0cedad7548fa3e350878b576b775920a0f568193f5099180ad62e5a48596d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.14.2

2 files

0.1.14.1

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

This release

0.1.7 This release

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page