Skip to content

ovitrac/SFPPyst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 SFPPySt: Interactive Tools for Food Contact Assessment using Streamlit

Generative Simulation This Streamlit app extends the Generative Simulation initiative Say it.
Simulate it with AI.

🍏⏩🍎 SFPPy: A Python Framework for Food Contact Compliance & Risk Assessment

🚀 SFPPy-St: Streamlit-powered SFPPy Tools

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)

SFPPy_st App (click the badge to launch the app.)


🎯 Key Differences from SFPPyLite

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.
⚠️ Support for cached substances only with the on line server (no JVM on Streamlit servers).
⚠️ Support for cached substances (Java dependency)
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

🛠 Features in SFPPy-St

  • 🔍 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

🧪 Launch SFPPy-St (Local)

  1. Install Streamlit (if not already):
conda install -c conda-forge streamlit
  1. Run the app:
streamlit run search_substance.py

🍏⏩🍎 Related Projects

SFPPy SFPPyLite

  • 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

💡 Why Streamlit?

  • ⚡ Rapid GUI prototyping
  • 📦 No frontend code needed
  • 🌍 Ideal for demonstration, education, or deployment
  • 📜 Fully compatible with SFPPy codebase

📬 Feedback

💬 Found a bug or want to suggest a tool? Open an issue or email the author.


📁 Project

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

🧰 Powered by

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages