Files
nix-config/home/base/tui/editors/ipython/README.md
T
Ryan Yin 9f29b48bf6 fix(ipython): keep in-session history in memory only
Assisted-by: DeepSeek Harness (deepseek-flash)
2026-11-05 12:38:55 +08:00

16 lines
867 B
Markdown

# IPython
[`default.nix`](./default.nix) manages `~/.ipython/profile_default` with two pieces:
- `ipython_config.py` keeps SQLite history in memory (`HistoryManager.hist_file = ":memory:"`), so
arrow keys and `%history` recall the current session while nothing is written to disk, because
interactive sessions may contain secrets.
- `startup/10-data-helpers.py` loads JSON, YAML, TOML, and CSV helpers at every IPython start. It
also pre-imports a small set of common standard-library names such as `Path`, `Counter`, and
`datetime`.
[`data-helpers.py`](./data-helpers.py) deliberately keeps heavier libraries such as NumPy and pandas
out of startup; import them explicitly when needed. The `~/.ipython` profile is not persisted by
`hosts/idols-ai/preservation.nix`, so Home Manager recreates the config and helpers from the Nix
store on every activation.