![]() |
This Streamlit app extends the Generative Simulation initiative | Say it. Simulate it with AI. |
---|
🍏⏩🍎 SFPPy: A Python Framework for Food Contact Compliance & Risk Assessment
Fast, interactive graphical interfaces for SFPPy — built with Streamlit, deployed server-side or locally:
- 🧪 Substance query and toxicological summary via
migrantToxtree
- 🧬 Display of EU, US, and CN regulatory data for ~1300 known substances
- 🧾 Live PubChem queries (structure, synonyms, InChIKey, SMILES, etc.)
- 💡 Designed to complement SFPPyLite with full toxicological support (e.g. ToxTree)
(click the badge to launch the app.)
Feature | SFPPy-St (Streamlit) | SFPPyLite (JupyterLite) |
---|---|---|
PubChem Support | Server-side Python with full loadpubchem support for not documented substances |
In-browser Python (Pyodide/WASM), loadpubchem cannot cache new substances |
ToxTree Support | ✅ Full support for Cramer classification, alerts, TTC if installed locally. |
|
Interactivity | GUI forms, dropdowns, live search | Jupyter notebook UI |
Performance | Native Python speed | ~2x slower (WebAssembly overhead) |
Persistence | ✅ if user-local, ❌ with Streamlit | In-browser (IndexedDB) with 📥📤 |
Deployable | Yes (locally or on a web server) | Yes (static website) |
Mobile ready | ✅ (Streamlit is responsive) | ✅ (Lite runs in-browser) |
Launching time | <5 s if user-local, < 2 min with Streamlit | <10 s |
- 🔍 Search substances using name, CAS, or synonyms
- 📊 Visualize Cramer class, TTC values, and alerts
- 🧾 Access regulatory frameworks from EU, FDA, and China
- 🖼 View PubChem structure images with size control and auto-rotation
- 📈 Ready for deployment with
streamlit run app.py
- Install Streamlit (if not already):
conda install -c conda-forge streamlit
- Run the app:
streamlit run search_substance.py
- SFPPy: Full-featured desktop framework with simulation, fitting, compliance rules
- SFPPyLite: Lightweight browser version of SFPPy for notebooks, without JVM dependencies
- SFPPy-St: This repo — GUI-friendly version of SFPPy for toxicological exploration
- ⚡ Rapid GUI prototyping
- 📦 No frontend code needed
- 🌍 Ideal for demonstration, education, or deployment
- 📜 Fully compatible with SFPPy codebase
💬 Found a bug or want to suggest a tool? Open an issue or email the author.
Core tools and databases are located in patankar/
. Do not rename this folder.
SFPPySt/
├── search_substance.py # Main app file (Streamlit)
├── patankar/ # Optional: grouped apps
├── private/ # private modules and databases shipped with SFPPy
├── cache.PubChem/ # Pubchem cache
├── cache.ToxTree/ # ToxTree cache
└── loadpubchem.py # substance manager connected to PubChem
└── geometry.py # packaging geometry module
└── food.py # food module
└── layer.py # polymer/material module
└── migration.py # mass transfer solver
└── property.py # transfport/thermodynamic module
└── useroverride.py # user override
├── requirements.txt # (for pip)
├── environment.yml # (for conda)
├── README.md # this file
└── LICENSE.md # MIT License