An open API service indexing awesome lists of open source software.

https://github.com/ovitrac/sfppylite

SFPPy running in a browser with Jupyterlite
https://github.com/ovitrac/sfppylite

chemicals compliance efsa fda food-contact food-packaging jupyterlite migration modeling-and-simulation plastics python recycled recycling regulation

Last synced: about 2 months ago
JSON representation

SFPPy running in a browser with Jupyterlite

Awesome Lists containing this project

README

        

# **๐Ÿ SFPPy-Lite ๐ŸŒ**

| ![Generative Simulation](extra/assets/logo.png) | This project is part of the
[Generative Simulation](https://github.com/ovitrac/generativeSimulation) demonstrators | Say it.
Simulate it with AI. |
| ---------------------------------------------- | ------------------------------------------------------------ | --------------------------------- |


---

> ๐Ÿโฉ๐ŸŽ **SFPPy**: A Python Framework for Food Contact Compliance & Risk Assessment

### ๐Ÿš€ SFPPyLite is Now Ready for Production!

**No installation. Runs entirely in your browser. Try it now:**

> ๐ŸŸข **Status update**: moved from ๐Ÿšง *Demo* to **Ready for Production**
> โœ… Full support for simulation, plotting, curve fitting, PDF/XLSX/CSV export
> ๐ŸŒ EU Regulation Annex I included
> ๐Ÿ“ฆ Works directly in-browserโ€”no installation required
> ๐Ÿ”„ Always up to date with the latest sources


๐Ÿงช Try it online!
๐Ÿ”Ž๐Ÿ“’๐Ÿ“˜๐Ÿ“•๐Ÿ“— Find a Notebook first

---

### ๐Ÿš€ What is SFPPy-Lite?

๐ŸŒ **SFPPy-Lite** is a **lightweight, browser-based preview** of the full SFPPy framework.
It is built on [**JupyterLite**](https://jupyterlite.readthedocs.io/), and runs Python entirely in the browser using [**Pyodide**](https://pyodide.org/) (WebAssembly-based).

You can explore and use **SFPPyโ€™s core functionalities** **instantly** โ€” with **no installation required** and **nothing to configure**.
Current performance is impressively close to that of a native desktop application.

![SFPPylite](https://github.com/ovitrac/SFPPylite/raw/refs/heads/main/extra/videos/SFPPylite.gif)

---

### ๐Ÿโฉ๐ŸŽ Access the Full SFPPy Framework


SFPPy ๐Ÿโฉ๐ŸŽ

---

### ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€๏ฎฉูจู€Status: moved from ๐Ÿšง *Demo* to ๐ŸŸข *Ready for Production*

> [!WARNING]
> ๐Ÿ’ก **Start Here**: Launch the notebook `demo.ipynb` to begin (or watch the [video walkthrough](https://ovitrac.github.io/SFPPy/SFPPylite_demo.html)).
>
> โœ… 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**.
>
> ๐Ÿ—ƒ๏ธ Files (notebooks, scripts, datasets, etc.) are **persistently stored** in your browser across sessions. Your data remains safe unless using **private/incognito mode**. You can **drop files** into the interface or **download/export** any file as needed.
>
>

---

### ๐Ÿค–๐Ÿ’ป๐ŸŒ Comparison of `SFPPy` Across Platforms: Desktop, Lite, and Google Colab

๐Ÿงญ **Find the platform that fits best your requirements: ease, confidentiality, archiving, assistance**.

*All usage options are free of charge.*

| Feature / Capability | ๐Ÿ’ซ๐Ÿ’ป **SFPPy (Desktop)** | ๐ŸŒ **SFPPyLite (Browser)** | โ˜๏ธ **SFPPy in Google Colab** |
| ----------------------------------------------------: | ------------------------------------------------- | -------------------------------------------------- | ---------------------------------------- |
| **AI-powered assistance (*e.g.* for interpretation)** | โŒ Not available or use **Jupyter Lab** extensions | โŒ Not available or use external extensions | โœ… Available (via Gemini) |
| **Installation required** | Yes (Python + dependencies) | โŒ No installation (runs in-browser) | โŒ No installation (via bootstrap script) |
| **Notebook execution speed** | Full native performance | โฑ๏ธ ~2ร— slower (WebAssembly limits) | โœ… Fast (depends on Google backend) |
| **Simulation resolution / memory usage** | High (limited by system resources) | Reduced for complex models (browser memory limits) | High (usually) |
| **Graphical plotting (SVG, PNG, Retina)** | โœ… Full support | โœ… Full support | โœ… Full support |
| **Curve fitting and modeling tools** | โœ… Available | โœ… Available | โœ… Available |
| **Export formats (PDF, XLSX, CSV)** | โœ… Full support | โœ… Full support | โœ… Full support |
| **Annex I (Regulation (EU) 10/2011)** | โœ… Integrated and queryable | โœ… Integrated and queryable | โœ… Available (with correct files) |
| **PubChem substance retrieval** | โœ… Fully functional | โš ๏ธ Partial (read-only, limited write support) | โœ… Full access |
| **ToxTree integration** | โœ… Supported | โŒ Not supported (WebAssembly incompatible) | โœ… Supported |
| **Self-archiving and reporting (PDF + .ipynb)** | โœ… Automatic or manual | โŒ Not supported | โœ… Manual (download/export) |
| **Session persistence / multi-tab support** | Depends on setup | โœ… Fully supported (via IndexedDB) | โŒ Not persistent between sessions |
| **Offline usage** | โœ… Once installed | โœ… After initial load (cached in browser) | โŒ Requires internet |
| **Custom file upload/download** | โœ… OS-level | โœ… Browser-based (drag & drop or panel) | โœ… Upload/download via Colab UI |
| **๐Ÿ› ๏ธ Updating Mechanism** | ๐Ÿ” Manual updates via Git or package manager | ๐Ÿ”„ Always updated to latest sources (on load) | ๐Ÿ”„ Bootstrapped from latest version |

---

### ๐Ÿ’ซ Requirements

๐ŸŒ**SFPPy-Lite** has been tested successfully on:

- โœ… Firefox 90+
- โœ… Chrome / Chromium 89+
- โœ… Safari Tech Preview (partial support)
- โŒ Mobile browsers: not fully supported yet

---

### ๐Ÿงฐ Powered by

- [JupyterLite](https://jupyterlite.readthedocs.io/)
- [Pyodide](https://pyodide.org/)
- [SFPPy](https://github.com/ovitrac/SFPPy) โ€“ Full Python framework

---

### ๐Ÿ“ฌ Feedback?

๐Ÿ’ฌ Found a bug or have suggestions? [Open an issue](https://github.com/ovitrac/SFPPy/issues) or reach out via email โ€” feedback is welcome!

---

### ๐Ÿโฉ๐ŸŽ `SFPPy`: Built for AI. Ready for Simulation.

๐Ÿค– +โš–๏ธ *Can robots like **GPT** really evaluate food contact compliance using **SFPPy**?* *Check out the intriguing answers from two GPT-powered experts [here](https://github.com/ovitrac/SFPPy/wiki/๐Ÿค–-Ask-GPT-to-demonstrate-compliance-with-SFPPy)!*.

| [page1](https://github.com/ovitrac/generativeSimulation)โ˜๐ŸปClick on the image to learn more. | ๐Ÿ”ฎ**Explore the future.** Coding is a languageโ€”and with generative AI, we can bridge real-world problems to simulation-ready computer code. Python is the medium of choice, as it remains the most fluent language for AI systems.

โ•ฐโ”ˆโžค***Prompts accelerate simulation prototyping** and the design of complex case scenarios. Thanks to the abstract nature of this interface, there are no constraints on the level of complexity: it operates independently of the underlying mathematical or numerical methods.*
|
| :----------------------------------------------------------- | :----------------------------------------------------------- |
| Credits: [Olivier Vitrac](mailto:[email protected]) | ๐Ÿค”**With respect to regulatory compliance**, AI assists you by generating informed scenarios and interpretationsโ€”but **you remain the decision-maker**.
|