Skip to content

Repository files navigation

SFPPy - Python Framework for Food Contact Compliance and Risk Assessment 🍏⏩🍎

Generative SimulationThis project is part of the
Generative Simulation demonstrators
Say it.
Simulate it with AI.
SFPPy GPT

SFPPy: Science Behind SafetySFPPy LatteBPA DanceSFPPy: AI can help demonstrate safety

SFPPy Wiki: ColabSFPPy Wiki: GUI ManualSFPPy Wiki: Main Index🌐 SFPPyLite – Browser DemoSFPPy DocumentationSFPPy DeepWiki

SFPPy – Scientific Framework for Food PackagingChatGPT SFPPy
🔥A custom AI assistant 🤖 extensively trained on SFPPy 🏋🏻. It helps you explore and use the framework: from the principles of migration modeling ⚙️ to first simulations 📈, regulatory compliance ✅, interpretation 📊, and reporting📝.
SFPPy – version 1.7🧠🛡️ SFPPy 1.7 brings design-for-compliance to packaging with tiers M0–M3 , explicit performance indicators, open data, AI-assisted reasoning. It automates risk assessment for the 100s of chromatogram peaks in recycled-material extracts. v1.6 adds a faster real-units migration engine (constant‑Jacobian BDF) and a unified N‑layer × multi‑step survey solver. v1.7 extends SFPPy to cosmetic & home‑care products (CosPaTox exposure model): product categories, an explicit dose→DNEL/TTC chain, and tiered pass/fail verdicts.
Empower these new capabilities by exploring: View on DeepWiki📄 SFPPy – Safe by Design
SFPPy – studio🆕🌐🔥 SFPPy Studio 0.3 is a web-based graphical user interface for the SFPPy framework. It provides an intuitive interface for food contact migration simulation and compliance checking, with support for offline operation and comprehensive safety assessment.
SFPPy – studio
SFPPy – studio
🆕👩🏻‍🔬🥼 The survey module provides production-grade infrastructure for estimating migration exposure across populations. It is designed for regulatory science applications (reproducible, traceable, auditable, scalable).

🛠️ Overview

SFPPy is a Python-based framework with ready-to-useNotebooks for compliance testing of food contact materials and recycled plastic safety assessment under:

This project implements first-principles chemical migration modeling and introduces a symbolic language and pipelines that AI models can easily parse and manipulate. All substances listed in PubChem can be directly imported and composed into migration scenarios — manually or with AI assistance.

Note

⋆.˚☁️⋆ You can use SFPPy entirely through Google Colab, with no installation and minimal code. GUI-based tools, complete templates, and progressively complex examples are all available through the Colab badges above ( 🎬 full video).

A sister project — SFPPyLite 🌐 — lets you run SFPPy notebooks directly in your browser, with no installation or server required.

SFPPy_GUI

📥 SFPPy can be installed locally in any Python (>3.8) environment and work with any notebook manager (see section Quick Start).

Why Notebooks?

Click to expand

📚Notebooks offer a literate and dynamic way to evaluate food safety. They unify problem description, parameterization, simulation, evaluation, and reporting into a single, shareable document. This workflow is ideal for traceability and regulatory validation.
🗣️AI assistants also understand notebooks surprisingly well and can help you interactively. Below is how Gemini (Google's LLM) described the comply.ipynb notebook directly from this link:

📖 Notebook Description | case of notebooks/comply.ipynb

This notebook demonstrates how to evaluate substance migration from a polymeric sleeve into a packaged food simulant using SFPPy. The notebook automates key tasks, including retrieving chemical properties, defining package geometries, applying polymer parameters, and running mass transfer models. It also captures all results and underlying assumptions, providing a clear and traceable record of the simulation process for validation and regulatory assessment.

📌 Short Manual

To demonstrate compliance for a list of substances, a given packaging, and food application using this notebook, follow these steps:

  1. Define the migrants. Create a list of migrant objects, one for each substance you want to evaluate. You can use the migrant class to retrieve chemical properties and regulatory data from internal databases.
  2. Define the packaging. Use the Packaging3D class to define the geometry of the packaging. You can specify the dimensions and material properties of the packaging.
  3. Define the food simulant. Use the food class to define the food simulant. You can specify the type of food, the contact time, and the contact temperature.
  4. Run the simulations. Use the %, <<, and >> operators to run the simulations. The % operator injects a substance into the simulation, the << operator inherits properties from the packaging and food simulant, and the >> operator propagates the simulation.
  5. Evaluate the results. The results of the simulations are stored in the CF variable. You can use this variable to evaluate the concentration of each substance in the food simulant at the end of the contact time.

📌 Reasoning

These steps are necessary to demonstrate compliance because they ensure that all relevant factors are considered when evaluating the risk of substance migration. By following these steps, you can generate a clear and traceable record of the simulation process that can be used for validation and regulatory assessment

📁 Main Modules (Located in patankar/)

  • migration.py 🏗️ - Core solver using a Patankar finite-volume method for mass transfer modeling.
  • geometry.py 📐 - Defines 3D packaging geometries and calculates volume/surface area.
  • food.py 🍎 - Models food layers and their interactions with packaging.
  • layer.py 📜 - Defines materials and layers for multilayer packaging.
  • property.py 📊 - Computes physical and chemical properties (e.g., diffusion, partitioning).
  • loadpubchem.py 🔬 - Retrieves molecular properties from PubChem (cached locally) and toxicological data from ToxTree.

Why Patankar?

📜 Click to expand

📌 The patankar folder is named in honor of Suhas V. Patankar, who developed and popularized the finite volume method, which this project adapts for mass transfer problems with an arbitrary number of Rankine discontinuities.

📌 The modules include a knowledge management system via extensible classes, allowing easy expansion to cover additional cases and implement new prediction methods.


🚀 Quick Start

Option 1: Docker (Recommended for Industry)

The easiest way to run SFPPy with Studio and Survey — no Python installation required.

# Clone and start all services
git clone https://github.com/ovitrac/SFPPy.git
cd SFPPy
docker-compose -f docker/docker-compose.yml up

Access the applications:

ServiceURLDefault Port
Studio (Full GUI)http://localhost:80028002
Survey Editorhttp://localhost:80008000
Survey Simulatorhttp://localhost:80018001

📌 Ports can be reconfigured in docker/docker-compose.yml or via command line. See docker/README.md for detailed Docker documentation.

Option 2: pip Install (Researchers)

# Clone the repository
git clone https://github.com/ovitrac/SFPPy.git
cd SFPPy
# Install core only
pip install -e .# Or with Studio GUI
pip install -e ".[studio]"# Or with Survey batch processing
pip install -e ".[survey]"# Or full installation (Studio + Survey + dev tools)
pip install -e ".[full]"

Option 3: Modular Requirements

For fine-grained control over dependencies:

# Core only (patankar solver)
pip install -r requirements/core.txt
# Add Studio
pip install -r requirements/studio.txt
# Add Survey
pip install -r requirements/survey.txt

📌 See requirements/README.md for all installation profiles.

Option 4: Conda + pip

# Create environment with scientific stack
conda create -n sfppy python=3.10 numpy scipy matplotlib pandas -y
conda activate sfppy
# Clone and install
git clone https://github.com/ovitrac/SFPPy.git
cd SFPPy
pip install -e ".[studio]"

Launch Applications

# Studio GUI (port 8002)
python studio/launcher.py
# Survey apps (ports 8000, 8001)
python survey/launcher.py
# Custom port
python studio/launcher.py --port 9002

Tip

🧭 New to SFPPy? Start with the Wiki Pages for examples, documentation, and guidance.

All examples (example1 to example4) are provided as both Python scripts and Jupyter notebooks. For compliance workflows, notebooks are recommended as they allow you to document your assumptions, inputs, results, and interpretations in one place.

☁️ You can run everything online for free using Google Colab. See installation instructions and the full Colab manual in the wiki.

💻 Prefer local work? Use Jupyter on your machine.

💫 Need a lightweight web version? Try SFPPyLite🌐 in your browser — no setup required — for editing and from basic to advanced calculations. ⚠️Note: Toxicological assessment via ToxTree is not available and the connectivity to PubChem is more limited.


💡 Usage Snippets

SFPPy is fully object-oriented and supports multiple syntax styles, ranging from a functional approach to a more abstract, operator-driven paradigm—all in a Pythonic manner. The snippets below demonstrate both approaches.

Snippet 1️⃣ | Simple Migration Simulation

📜 Click to expand
frompatankar.foodimportethanol# food databasefrompatankar.layerimportlayer# material database# Define the food contact medium and layerssimulant=ethanol() # here a food simulantA=layer(layername="layer 1 (contact)", D=1e-15, l=50e-6, C0=0, k=1) # SI unitsB=layer(layername="layer 2", D=(1e-9, "cm**2/s"), l=(100, "um"),k=2)
multilayer=A+B# layer A is contact (food is on the left)# Run solver, plot the migration kinetics CF(t) and concentration profiles in P Cx(x,t)solution=simulant.migration(multilayer)
hCF=solution.plotCF() # concentration kinetic in the simulant (F) for default timeshCx=solution.plotCx() # concentration profile in the multilayer packaging# Print in PDF and PNG, export to ExcelhCF.print("myresult")
solution.comparison.save_as_csv("myresult.csv") # CSV formatsolution.comparison.save_as_excel("myresult.xlsx") # Excel format

📌 $D$ is the diffusivity, $l$ is the thickness layer, and $C_0$ is the initial concentration.

CFCx


Snippet 2️⃣ | Retrieving Molecular Properties and Toxicological Data

🔍 Click to expand
frompatankar.loadpubchemimportmigrant# connect to pubchem for missing substancesfrompatankar.foodimportoliveoil,water# food simulants frompatankar.layerimportgPET# "glassy" PET (i.e., T<Tg)m=migrant("bisphenol A") # bisphenol A = BPA# Print basic propertiesprint(m.M, m.logP, m.polarityindex) # Molecular weight, logP value, polarity Index P'print(m.smiles) # CC(C)(C1=CC=C(C=C1)O)C2=CC=C(C=C2)O# Add BPA to material (P) and food simulants (F1,F2) to calculate binary propertiesF1=oliveoil(migrant=m) # F1 = food simulant oliver oil with BPAF2=water(migrant=m) # F2 = water with BPAP=gPET(migrant=m) # P = PET with BPAKFP1=P.k/F1.k# F-to-P1 partition coefficient, k= Henry-like coefficientsKFP2=P.k/F2.k# F-to-P2 partition coefficient, k= Henry-like coefficients# Print partition coefficients, with k values calculated from Flory-Huggins theoryprint(KFP1,KFP2) # [0.93498524] [0.00093499]

📌 The examples show how to inject m into $F$=food (various classes ) and $P$=polymer layer (various classes) to get customized and conservative simulations for specific substances and polymers. All properties, diffusivities $D$, Henry-like coefficients $k$ are calculated automatically based from their names.

Add toxicological data from Toxtree

frompatankar.loadpubchemimportmigrantToxtree# combine PubChem and ToxTreesubstance=migrantToxtree("formaldehyde")

output

<migrantToxtree object>
Compound: formaldehyde
Name: formaldehyde
cid: 712
CAS: 50-00-0
M (min): 30.026
M_array: [30.026]
formula: CH2O
smiles: C=O
InChiKey: WSFSSNUMVMOOMR-UHFFFAOYSA-N
logP: [1.2]
P' (calc): [3.91591487]
---🇪🇺 EC 10/2011: ---------------
SML: 15.0 [mg/kg]
part a group: of 3 substances
EC|FCM|REF: 200-001-8|98|1726054880
---🇺🇸 US FCN list: ---------------
FCM No: 1380
Notifier: Troy Corporation
Manufacturer: Troy Corporation
N. Date: 05/15/2014
---🇨🇳 CN GB9685-2016: ---------------
FCA No: 0895
authorized in: ['coatings', 'adhesi [...] , 'paper and board']
---𖣂︎ ToxTree: ---------------
𖣂Toxicology: Low (Class I)
𖣂TTC: 1.5 [µg/kg bw/day]
𖣂CF TTC: 0.09 [mg/kg food intake]
⚠️ Alert 1: Alert For Schiff Bas [...] Formation Identified
Out: <migrantToxtree: UN2209 - M=30.026 g/mol>

📌 A local installation of Toxtree (java) is included with SFPPy.

📌 The Annex I of the European FCM and Articles Regulation is integrated as a full database in SFPPy


Snippet 3️⃣ | Defining a Custom Packaging Shape

📦 Click to expand
frompatankar.geometryimportPackaging3D# import basic shapespkg=Packaging3D('bottle', # bottle is a composite shapebody_radius=(5, 'cm'), body_height=(0.2, 'm'),
neck_radius=(19, "mm"), neck_height=(40, "mm"))
vol, area=pkg.get_volume_and_area() # extract volume and surface areaprint("Volume (m³):", vol)
print("Surface Area (m²):", area)

📌 The examples show how to use either pkg or its properties to achieve mass transfer simulation for a specific geometry.

📌 To efficiently simulate the migration of substances from packaging materials, SFPPy unfolds complex 3D packaging geometries into an equivalent 1D representation. This transformation assumes that substance desorption is predominantly governed by diffusion within the walls of the packaging.

📌 The geometry.py module provides tools to compute surface-area-to-volume ratios, extract wall thicknesses, and generate equivalent 1D models for mass transfer simulations.


Snippet 4️⃣ | Using as Mass Transfer Operator in Chained Simulations

📦 Click to expand

📌 SFPPy leverages multiple inheritance to define food contact conditions by combining storage conditions, food types, and physical properties.

📌 Additionally, three operators play a key role in SFPPy’s intuitive syntax:

  • for combining layers and merging results
  • for naturally representing mass transfer
  • % for introducing a new substance in the pipeline assessed

With these operators, mass transfer can be abstracted into a simple, visual representation:

  1. 🍏⏩🍎
    (Direct transfer from green to red, symbolizing migration.)

  2. 🍏⏩🟠⏩🍎
    (Includes an intermediate step, depicting progressive migration.)

  3. 🍏⏩🟡⏩🟠⏩🍎
    (More detailed, illustrating multiple contamination stages over time.)

  4. ⌬%🍏⏩🍎
    (Emphasizes new substance.)

🌟 SFPPy makes this abstraction possible with simple, expressive code.

frompatankar.layerimportgPET, PPfrompatankar.foodimportambient, hotfilled, realfood, fat, liquid, stackedfrompatankar.loadpubchemimportmigrant# Define migrant and packaging layers (ABA: PET-PP-PET)m=migrant("limonene")
m2=migrant("toluene") # alternative substanceA=gPET(l=(20, "um"), migrant=m, C0=0)
B=PP(l=(500, "um"), migrant=m, C0=200) ABA=A+B+A# the most left layer is contact (food on the left)# Define storage and processing conditions:# 1:storage in stacks >> 2:hot-filled container >> 3:long-term storage of packaged foodclasscontact1(stacked, ambient): name="1:setoff"; contacttime= (4, "months")
classcontact2(hotfilled, realfood, liquid, fat): name="2:hotfilling"classcontact3(ambient, realfood, liquid, fat): name="3:storage"; contacttime= (6, "months")
# Instantiate and simulate with ⏩medium1, medium2, medium3=contact1(), contact2(), contact3()
m2%medium1>>ABA>>medium1>>medium2>>medium3# Automatic chaining with m2 replacing m# Merge all kinetics into a single one and plot the migration kineticssol123=medium1.lastsimulation+medium2.lastsimulation+medium3.lastsimulationsol123.plotCF()

CF

🧩 How It Works

Each contact class inherits attributes from multiple base classes, allowing flexible combinations of:

  1. 📌 Storage Conditions:

    • ambient: Defines standard storage at room temperature
    • hotfilled: Represents high-temperature filling processes
    • stacked: Models setoff migration when packaging layers are stacked
  2. 🥘 Food Types & Interactions:

    • realfood: Represents actual food matrices
    • liquid: Specifies that the food is a liquid
    • fat: Indicates a fatty food, influencing partitioning behavior

📌 By combining classes, SFPPy allows streamlined, physics-based simulations with minimal code and facilitates the global understanding of the framework by AI.


Snippet 5️⃣ | Parameter linking 🔗 via layerLink

📦 Click to expand
# Any numeric property can be attached to a simulation with layerLinkfrompatankar.layerimportlayerLink# Attach a variable function barrier thickness to ABAfb_thickness=layerLink("l",indices=0) # index 0 = layer 1 (A) in contact with F# Reuse ABA from Snippet 3 [...]ABA.llink=fb_thicknesses# Change dynamically the simulation by changing fb_thicknesses[0]fb_thicknesses[0] =12e-6# 12 µmmedium1.lastsimulation.rerun()
# [...]

📌 Dynamic parameter binding using layerLink connections allows:

✅ Dynamic updates of $D$, $k$, $l$, $C_0$ abd $T$ for specific layers only ( index [i] refers to the layer i+1).
✅ Seamless integration of simulation and optimization tasks.
✅ Robust handling of parameter uncertainties in complex simulation scenarios.


Snippet 6️⃣ | Ask Scientific Questions using RAG 🧠📚

📦 Click to expand
# Ask scientific or regulatory questions to a local LLM using your own knowledge basefromllama_index.coreimportSimpleDirectoryReader, VectorStoreIndexfromllama_index.embeddings.huggingfaceimportHuggingFaceEmbeddingfromllama_index.llms.ollamaimportOllama# Load your documentation folder (e.g. Markdown files from docs/KB)documents=SimpleDirectoryReader(input_dir="./docs/KB", recursive=True).load_data()
# Embed and index documents (no API key needed)embed_model=HuggingFaceEmbedding(model_name="BAAI/bge-small-en-v1.5")
index=VectorStoreIndex.from_documents(documents, embed_model=embed_model)
# Query with a local open-source LLM (e.g. mistral, phi3, llama3)llm=Ollama(model="mistral")
query_engine=index.as_query_engine(llm=llm)
# Ask your questionresponse=query_engine.query("What is the definition of a functional barrier in EU Regulation 10/2011?")
print(response.response)

💡 This example illustrates how to implement a Retrieval-Augmented Generation (RAG) strategy with:

✅ Plain Markdown files or exported documentation ✅ A local LLM such as Mistral via Ollama ✅ Embeddings from HuggingFace models (no API keys)

🔐 Your KB remains local and auditable. A prebuilt ZIP file of a sample KB is included in docs/KB.zip.


📖 Case Studies

The project includes five detailed examples (examples/example1.pyexamples/example5.py), showcasing real-world scenarios with various materials, substances, food types, geometries, and usage conditions.

Example 1: | Mass Transfer fromMonolayer Materials

  • 🥪 Simulates the migration of Irganox 1076 and Irgafos 168 from a 100 µm LDPEfilm into a fatty sandwich 🥖over 10 days at 7°C.
  • 📈 Evaluates migration kinetics and their implications for food safety.

Example 2| Mass Transfer in ♻️ Recycled PP Bottles

  • 🍼 Investigates toluene migration from a 300 µm thick recycled PP bottle into a fatty liquid food.
  • 🛡️ Assesses the effect of a PET functional barrier (FB) of varying thickness on reducing migration.

Example 3 | Advanced Migration Simulation ⛓️ with Variants

  • 📦 Simulates migration in a trilayer (ABA) multilayer system, with PET (A) and recycled PP (B).
  • 🔥 Evaluates migration behavior across storage with set-off, hot-filling, and long-term storage conditions.
  • ⚙️ Explores variants where the migrant and layer thickness are modified to assess performance.
  • 🍏⏩🍎 Example 3 showcases the mass transfer operator ⏩.

Example 4 | Parameter Fitting and Optimization ⚙️

  • Fit diffusivities ($D$) and partitioning coefficients ($\frac{k}{k_0}$) from migration kinetic data 📈.
  • ✅ Utilize dynamic parameter linking 🔗🧲 with layerLink.
  • ✅ Integrate simulation results directly with experiments for sensitivity analysis and optimization

Example 5 | Regulatory QA using Local RAG 🧠📘

  • 🔍 Ask domain-specific questions for your organization (e.g., What is the migration of substance XXX? or Do we use this substance?) using a local LLM over your own knowledge base.
  • 🧰 Uses Ollama to serve a compact and efficient open-source LLM (Mistral), with HuggingFace embeddings for semantic grounding.
  • 💾 The KB resides in docs/KB/ (an example is provided as docs/KB.zip) and is indexed using ChromaDB for reuse, versioning, and auditability.
  • 🧠 Demonstrates how a Retrieval-Augmented Generation (RAG) pipeline can enhance regulatory and scientific reasoning using your curated Markdown corpus.

Why it matters:

  • A local model (under 8 GB VRAM) can answer nontrivial, regulation-specific questions when grounded in a structured KB.
  • No internet, no tokens, no vendor lock-in – SFPPy becomes entirely self-hosted, private, and auditable.
  • Your KB can include confidential reports, regulatory texts, or internal documentation, queried naturally and locally.

Caution

These examples do not discuss sources of uncertainty. Please refer to our publications and this link for details on the limitations of the presented approaches and assumptions.


🖥️ SFPPy Studio (v0.3.0)

SFPPy Studio is a web-based graphical user interface for the SFPPy framework, providing an intuitive way to configure and run migration simulations without writing code. Version 0.3.0 introduces offline operation, ToxTree safety assessment, and a complete 9-tab interface.

Features

FeatureDescription
9-Tab Interface🧪 Substances, 🧱 Assembly, 🍽️ Food, ▶️ Simulate, 📊 Results, 📁 Jobs, ⚙️ Config, 📈 Fitting, ❓ Help
Substance SearchSearch PubChem for migrants by name, CAS, or CID
Safety AssessmentToxTree Cramer class, genotoxicity alerts, DNA binding potential
Layer AssemblyVisual multilayer packaging builder (1-5+ layers)
Food & ConditionsConfigure food types, geometries, and multi-step contact scenarios
SimulationRun Patankar solver with async job management
Parameter FittingFit D and k from experimental or synthetic data
Session FilesSave/load .sfppy.json configurations
Offline OperationWork without internet using cached substances and images
ExportCSV, XLSX, JSON, PDF, PNG, SVG output formats

Installation

# Required dependencies
pip install fastapi uvicorn pyyaml numpy scipy jinja2 pydantic
# Optional for exports
pip install matplotlib openpyxl

Launch

# From the python/ directory
python studio/launcher.py
# With options
python studio/launcher.py --port 8080 --reload
# Access at: http://127.0.0.1:8002

Documentation

📖 See studio/README.md for the complete user manual with all 9 tabs documented.


📊 SFPPy Survey Module

SFPPy Survey is a production-grade module for survey-scale exposure estimation with deterministic uncertainty propagation. Designed for regulatory science applications requiring reproducibility, traceability, and auditability.

Features

FeatureDescription
DeterministicFinite-difference quadrature on triangular priors (no Monte Carlo)
ParallelMaster curve computation distributed across workers
CachedContent-addressed persistent cache prevents redundant computation
ResumableInterrupted computations can be resumed from checkpoint
MultilayerSupports functional barriers with reference layer selection
AuditableEvery output traceable to inputs via fingerprinting

Installation

# Survey module is part of SFPPy core# Ensure SFPPy is installed
pip install -e .# Dependencies: numpy, pyyaml, patankar (included in SFPPy)

Usage

fromsurveyimportSurvey# Load scenario from YAMLsurvey=Survey.from_scenario("scenario.yml")
# Preview and computeprint(survey.preview())
survey.compute(parallel=True)
# Get resultsprint(survey.summary())
q95=survey.quantile(0.95)

Documentation

📖 See survey/README.md for the complete module documentation.

🌟 Why SFPPy?

✔️ Free & Open Source — No licensing, no lock-in. Use it, adapt it, share it.

✔️ AI-Ready Design — Symbolic, structured data and a clean Python API make SFPPy naturally suited for integration with AI assistants and LLMs. As part of the Generative Simulation Initiative 🌱, it supports agentic SAG (Simulation-Augmented Generation), combining scientific simulation with LLM reasoning to address complex risk assessment and risk management challenges.

✔️ Chemically-orientedSFPPy is designed to use chemical information and molecular models without requiring you to estimate diffusion and partitioning properties. The connection with PubChem server extends theoretically the possibilities to any single substance.

✔️ Chemical databases — Parsed US (🇺🇸), EU (🇪🇺), and GB (🇨🇳) databases are included in SFPPy and open source.

✔️ Flexible Unit Handling — Supports any unit via ("unit", value) or (["val1", "val2"], "unit") formats.

✔️ Chained Operators — Use >> to model automatic mass transfer and property propagation across layers and conditions. A same calculation pipe can be instantiated with different substances using the operator %: substance % food << geometry >> packaging >> step1 >> step2 >> step3...

✔️ Minimal Code, Maximum Expressiveness — Concise syntax using + to combine materials, simulate stacks, or switch storage scenarios. Combine also results with +: allsteps = step1.lastsimulation+step2.lastsimulation+step3.lastsimulation

✔️ Powerful Abstractions — Integrates with PubChem, ToxTree, built-in polymer libraries, and 3D packaging geometries.

✔️ Built-in Visualization & Export — Export results to Excel (.xlsx), CSV, PDF, PNG, and even MATLAB (if you must 😉).

✔️ Compliance Notebooks Included — Templates and real-case notebooks guide you through regulatory testing and reporting.

✔️ GUI-Ready Components — Build your own graphical tools using included widgets and high-level interfaces.


📜 License

MIT License


🤝 Contributors

INRAE | Generative Simulation Initiative 🌱🌿🌳🍃🍂- Olivier Vitrac
This project is part of the SFPPy initiative, aiming to bring the SafeFoodPackaging Portal version 3 (SFPP3) to the general public.

$2025-09-15$


For further details, consult the online documentation and the release page for new capabilities.


🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️
🍽️🍽️🍎🍎🍎🍎🍽️🍽️🍎🍎🍎🍎🍎🍽️🍽️🍏🍏🍏🍏🍽️🍽️🍽️🍎🍎🍎🍎🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️
🍽️🍎🍽️🍽️🍽️🍽️🍽️🍽️🍎🍽️🍽️🍽️🍽️🍽️🍽️🍏🍽️🍽️🍽️🍏🍽️🍽️🍎🍽️🍽️🍽️🍎🍽️🍽️🐍🍽️🍽️🍽️🐍🍽️
🍽️🍽️🍎🍎🍎🍽️🍽️🍽️🍎🍎🍎🍎🍽️🍽️🍽️🍏🍏🍏🍏🍽️🍽️🍽️🍎🍎🍎🍎🍽️🍽️🍽️🍽️🐍🍽️🐍🍽️🍽️
🍽️🍽️🍽️🍽️🍽️🍎🍽️🍽️🍎🍽️🍽️🍽️🍽️🍽️🍽️🍏🍽️🍽️🍽️🍽️🍽️🍽️🍎🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🐍🍽️🍽️🍽️
🍽️🍎🍎🍎🍎🍽️🍽️🍽️🍎🍽️🍽️🍽️🍽️🍽️🍽️🍏🍽️🍽️🍽️🍽️🍽️🍽️🍎🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🐍🍽️🍽️🍽️
🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️🍽️ $v1.7$

Important

SFPPyLite GitHub Repository is a lightweight, browser-based sister project of SFPPy. It runs entirely in your browser (via JupyterLite) — no installation, no Python backend — and is ideal for editing files, exploring materials, or performing basic compliance calculations on the go.

Launch SFPPyLite


🍏⏩🍎 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!.

page1☝🏻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🤔With respect to regulatory compliance, AI assists you by generating informed scenarios and interpretations—but you remain the decision-maker.

Releases

Packages

Used by

Contributors

Languages