SFPPy: A Python Framework for Food Contact Compliance & Risk Assessment
๐โฉ๐ SFPPy-Lite runs entirely in your browser โ no server, no install, fully operational!
Warning
๐ก Start Here: Launch the notebook demo.ipynb
to begin (or watch the video walkthrough).
โ All components are now operational, including notebooks under ๐Notebooks/, as well as graphical interfaces, simulation, plotting, curve fitting, and export to PDF/XLSX.
โฑ๏ธ SFPPyLite runs at approximately half the speed ๐ of the desktop version. However, all notebooks execute in under one minute. This performance is sufficient for practical use, with the caveat that native in-browser execution (via Pyodide/WebAssembly) imposes some limitations.
๐ชง๐ The full ๐ช๐บ Annex I of Regulation (EU) 10/2011 is included and searchable.
๐ฉ PubChem substance retrieval is partially functional: the module private.pubchemspy
has been adapted for JupyterLite, but write operations may fail due to incompatibilities between Pyodide and IndexedDB, the browserโs internal filesystem.
โ ToxTree is not supported, as it cannot currently be compiled to WebAssembly.
Note
๐๏ธ Files (notebooks, scripts, data, etc.) are persistently stored across sessions in your browser. Your data is safe, unless you're working in incognito/private mode. You can also drop your own files into the left panel or download existing ones.
โ๏ธPress CTRL+J to access development tools in your browser and select Application to see the the JupyterLite Storage. ๐๏ธ It can be reinitialized there if needed.
๐SFPPylite files included in the distribution (Python files, Json databases, notebooks) are not saved in the IndexDB database. They are stored in the static app bundle (๐content/ folder ) and mounted as ๐/ in JupyterLite, backed by Emscripten's MEMFS or IDBFS (via pyodide
).
The prebuilt version is not protected โ it is treated as just another file once the app is loaded.
The original content is lost in the current session, and on refresh, the user version persists (persistent storage is enabled by default).
Even built-in notebooks can be permanently replaced, unless the user clears their browser storage.
Even if the app was updated with a new version of the file, the old user version takes precedence.
โโ ๏ธ Remove the files you modified from the SFPPylite bundle (i.e., the overrides you did) if you want the benefit of regular updates.