Releases: ovitrac/SFPPy
π SFPPy - Python Framework for Food Contact Compliance & Risk Assessment πβ©π
SFPPy v1.50 Release πβ©π
Important
This page provides the latest stable version of SFPPy for local installation on your machine.
If you're looking for an online experience, there are two alternatives:
-
π’ Google Colab: No packaging needed β follow the
git cloneinstructions shown on the main project page or watch the video walkthrough. -
π SFPPyLite: Use SFPPy directly in your browser with no setup at all. Powered by WebAssembly and JupyterLite, it gives you access to most of SFPPyβs core capabilities in a single click.
π Both SFPPy and SFPPyLite are aligned and current in version 1.44.
About SFPPy
SFPPy is a Python-based framework for πβ―π compliance testing of food contact materials and π’β¬β»οΈ recycled plastic safety assessment. It supports regulations from:
- πΊπΈ US FDA regulations
- πͺπΊ European Union (EFSA, EU 10/2011, etc.)
- π¨π³ Chinese GB standards
- π Other international guidelines
Release Notes
π SFPPy is AI-ready. Yes, GPT robots can develop chemical migration scenarios using the Pythonic language, operator and class models using the SFPPy frameworks. The limitations are discussed here. Example5.py demonstrates how a scientific agent can be built with ollama, RAG, and a proper knowledge base (provided as docs/KP.zip).
π SFPPy is integrated in notebooks that keep records of the entire evaluation process. Starting from v1.37, a compliance template notebook for compliance is shipped with SFPPy.
π SFPPy is equipped with a graphical interface. SFPPy-GUI supports many of the capabilities of SFPPy and can easily be extended with forms or customized widgets. The manual is available here.
π SFPPy can be used in hybrid environments (online/offline), scripts/notebooks, Windows/Linux. All examples are provided as exampleX.py and notebooks/exampleX.ipynb, with X = 1β4.
π Starting from version 1.3, SFPPy starts all simulations from the sole knowledge of the chemical name of the substance, inferring the diffusivities (ποΈπ¨, ππ¨π»π¨ππ¨) and partitioning (π§²) from the best models applicable. The collection of models can be augmented as shown in patankar.properties.
π SFPPy uses PubChem as the primary source of chemical information, including chemical structure. An internet connection enables SFPPy to retrieve information automatically. The information is cached locally to avoid overloading PubChem servers.
π Starting from version 1.37, SFPPy is shipped with all substances of Annex I of the Regulation (EU) 10/2011 and provides toxicological alerts (if found) for all substances used as inputs. It uses ToxTree for that.
π SFPPy is agnostic to the system considered and runs indifferently on πͺ Windows, π§ Linux, π macOS. SFPPy depends exclusively on standard libraries: SciPy, NumPy, Matplotlib, Pandas, PIL.
π SFPPy is very fast and designed to test chained complex scenarios involving one or several substances.
π As of version 1.40, SFPPy and SFPPyLite offer similar functionality. Users are encouraged to work through Jupyter notebooks rather than standalone Python scripts, as notebooks offer a more interactive and reproducible workflow. Global behaviorβsuch as discretization resolution, plotting preferences, and moreβcan be customized via user overrides using:
from patankar.useroverride import useroverride
π *As of version 1.41, SFPPy and SFPPyLite are shipped with US FCN (πΊπΈ), EU Annex I (πͺπΊ), and GB Appendix A (π¨π³) databases, all managed independently with their database manager and updater. All individual substances and their toxicological assessment are shipped with SPFPPy.
π Version 1.44 brings several fixes and additions identified/requested by users.
π *As of version 1.50, SFPPy 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. Read our π technical paper here.
ποΈ Download SFPPy v1.50 β Stable Release
| Feature / Content | β
Full Version 129 MB |
βͺ Light Version 66 MB |
|---|---|---|
π§ͺ Includes Toxtree integration |
β Yes | β No |
| π Full documentation | β Yes | β Yes |
𧬠Advanced risk assessment (migrantToxtree) |
β Supported | β Not supported |
π¬ Routine migration modeling (migrant) |
β Supported | β Supported |
| π₯ Download ZIP | Download SFPPy | Download SFPPymin |
| π¦ View all versions | Releases | Releases |
π‘ Note: The light version does not include a private installation of Toxtree, used by patankar.loadpubchem.migrantToxtree for advanced risk assessment. However, patankar.loadpubchem.migrant remains fully functional for routine migration simulations.
Warning
β Toxtree requires a Java runtime environment (JRE) if Java β is not already installed. If needed, Toxtree can be manually installed in patankar/private/toxtree/ as described in patankar/private/toxtree/README.md.
π Example Files
SFPPy includes four example scripts (and more notebooks) to help you get started:
| Example file (located in the root folder π ) | Description (see π Wiki Pages) |
|---|---|
example1.py |
Monolayer materials |
example2.py |
Recycled bottles with functional barriers |
example3.py |
Chained simulations with variations |
example4.py |
Fitting experimental curves to extract diffusion and partition coefficients |
example5.py |
Retrieval-Augmented Generation (RAG) over Legal Knowledge Base |
Tip
β¨ All scripts in the root folder π can be executed directly without modifying the Python path.
If running from another location, use the CLI:
sfppy example1.py # Replace example1.py with your scriptImportant
Notebooks: Keep code, assumptions, results, and interpretations together β ideal for regulatory workflows. If you run notebooks/example1.ipynb, you can save automatically all results and code with:
export_notebook(filename="example1",outputfolder="reports");π οΈ Running SFPPy from Anywhere π
To test releases effortlessly:
# Navigate to the extracted SFPPy folder
cd /path/to/SFPPy # π Unzipped folder
# Install SFPPy in editable mode (dependencies included)
pip install -e .
# Run example1 from anywhere
sfppy example1.py # Replace example1.py with your scriptFor detailed installation instructions, refer to the installation guide π§βπ§.
Note
All notebooks located in πnotebooks/ are equipped with a bootstrap mechanism enabling them to start without any installation.
π Quick Start & Exploration
π Read the Online Documentation:
- π SFPPy Documentation
- π SFPPy Wiki Pages
- π Migration Modeling Guide
- π FitNESS E-learning Platform (Details)
π Try SFPPy now and streamline your food safety assessments!
π Additional Resources...
π SFPPy - Python Framework for Food Contact Compliance & Risk Assessment πβ©π
SFPPy v1.44 Release πβ©π
Important
This page provides the latest stable version of SFPPy for local installation on your machine.
If you're looking for an online experience, there are two alternatives:
-
π’ Google Colab: No packaging needed β simply follow the
git cloneinstructions shown on the main project page or watch the video walkthrough. -
π SFPPyLite: Use SFPPy directly in your browser with no setup at all. Powered by WebAssembly and JupyterLite, it gives you access to most of SFPPyβs core capabilities in a single click.
π Both SFPPy and SFPPyLite are aligned and current in version 1.44.
About SFPPy
SFPPy is a Python-based framework for πβ―π compliance testing of food contact materials and π’β¬β»οΈ recycled plastic safety assessment. It supports regulations from:
- πΊπΈ US FDA regulations
- πͺπΊ European Union (EFSA, EU 10/2011, etc.)
- π¨π³ Chinese GB standards
- π Other international guidelines
Release Notes
π SFPPy is AI ready. Yes, GPT robots can develop chemical migration scenarios using the Pythonic language, operator and class models using the SFPPy frameworks. The limitations are discussed here. Example5.py demonstrates how a scientific agent can be built with ollama, RAG and a proper knowledge base (provided as docs/KP.zip).
π SFPPy is integrated in notebooks that keep records of the entire evaluation process. Starting from v1.37, a compliance template notebook for compliance is shipped with SFPPy.
π SFPPy is equipped with a graphical interface. SFPPy-GUI supports many of the capabilities of SFPPy and can easily be extended with forms or customized widgets. The manual is available here.
π SFPPy can be used in hybrid environments (online/offline), scripts/notebooks, Windows/Linux. All examples are provided as exampleX.py and notebooks/exampleX.ipynb, with X = 1β4.
π Starting from version 1.3, SFPPy starts all simulations from the sole knowledge of the chemical name of the substance, inferring the diffusivities (ποΈπ¨, ππ¨π»π¨ππ¨) and partitioning (π§²) from the best models applicable. The collection of models can be augmented as shown in patankar.properties.
π SFPPy uses PubChem as the primary source of chemical information, including chemical structure. An internet connection enables SFPPy to retrieve information automatically. The information is cached locally to avoid overloading PubChem servers.
π Starting from version 1.37, SFPPy is shipped with all substances of Annex I of the Regulation (EU) 10/2011 and provides toxicological alerts (if found) for all substances used as inputs. It uses ToxTree for that.
π SFPPy is agnostic to the system considered and runs indifferently on πͺ Windows, π§ Linux, π macOS. SFPPy depends exclusively on standard libraries: SciPy, NumPy, Matplotlib, Pandas, PIL.
π SFPPy is very fast and designed to test chained complex scenarios involving one or several substances.
π As of version 1.40, SFPPy and SFPPyLite offer similar functionality. Users are encouraged to work through Jupyter notebooks rather than standalone Python scripts, as notebooks provide a more interactive and reproducible workflow. Global behaviorβsuch as discretization resolution, plotting preferences, and moreβcan be customized via user overrides using:
from patankar.useroverride import useroverride
π *As of version 1.41, SFPPy and SFPPyLite are shipped with US FCN (πΊπΈ), EU Annex I (πͺπΊ), and GB Appendix A (π¨π³) databases, all managed independently with their database manager and updater. All individual substances and their toxicological assessment are shipped with SPFPPy.
ποΈ Download SFPPy v1.42 β Stable Release
| Feature / Content | β
Full Version 128 MB |
βͺ Light Version 64 MB |
|---|---|---|
π§ͺ Includes Toxtree integration |
β Yes | β No |
| π Full documentation | β Yes | β Yes |
𧬠Advanced risk assessment (migrantToxtree) |
β Supported | β Not supported |
π¬ Routine migration modeling (migrant) |
β Supported | β Supported |
| π₯ Download ZIP | Download SFPPy | Download SFPPymin |
| π¦ View all versions | Releases | Releases |
π‘ Note: The light version does not include a private installation of Toxtree, used by patankar.loadpubchem.migrantToxtree for advanced risk assessment. However, patankar.loadpubchem.migrant remains fully functional for routine migration simulations.
Warning
β Toxtree requires a Java runtime environment (JRE) if Java β is not already installed. If needed, Toxtree can be manually installed in patankar/private/toxtree/ as described in patankar/private/toxtree/README.md.
π Example Files
SFPPy includes four example scripts (and more notebooks) to help you get started:
| Example file (located in the root folder π ) | Description (see π Wiki Pages) |
|---|---|
example1.py |
Monolayer materials |
example2.py |
Recycled bottles with functional barriers |
example3.py |
Chained simulations with variations |
example4.py |
Fitting experimental curves to extract diffusion and partition coefficients |
example5.py |
Retrieval-Augmented Generation (RAG) over Legal Knowledge Base |
Tip
β¨ All scripts in the root folder π can be executed directly without modifying the Python path.
If running from another location, use the CLI:
sfppy example1.py # Replace example1.py with your scriptImportant
Notebooks: Keep code, assumptions, results, and interpretations together β ideal for regulatory workflows. If you run notebooks/example1.ipynb, you can save automatically all results and code with:
export_notebook(filename="example1",outputfolder="reports");π οΈ Running SFPPy from Anywhere π
To test releases effortlessly:
# Navigate to the extracted SFPPy folder
cd /path/to/SFPPy # π Unzipped folder
# Install SFPPy in editable mode (dependencies included)
pip install -e .
# Run example1 from anywhere
sfppy example1.py # Replace example1.py with your scriptFor detailed installation instructions, refer to the installation guide π§βπ§.
Note
All notebooks located in πnotebooks/ are equipped with a bootstrap mechanism enabling them to start without any installation.
π Quick Start & Exploration
π Read the Online Documentation:
- π SFPPy Documentation
- π SFPPy Wiki Pages
- π Migration Modeling Guide
- π FitNESS E-learning Platform (Details)
π Try SFPPy now and streamline your food safety assessments!
π Additional Resources
π Publication on Chained Simulation
𧬠AIChE Journal: Migration Modeling with SFPPy
A peer-reviewed reference for the core modeling engine and chaining logic implemented in SFPPy.
π GitHub Pages
The official development hub for SFPPy, including installation, examples, and docum...
π SFPPy - Python Framework for Food Contact Compliance & Risk Assessment πβ©π
SFPPy v1.42 Release πβ©π
Important
This page provides the latest stable version of SFPPy for local installation on your machine.
If you're looking for an online experience, there are two alternatives:
-
π’ Google Colab: No packaging needed β simply follow the
git cloneinstructions shown on the main project page or watch the video walkthrough. -
π SFPPyLite: Use SFPPy directly in your browser with no setup at all. Powered by WebAssembly and JupyterLite, it gives you access to most of SFPPyβs core capabilities in a single click.
π Both SFPPy and SFPPyLite are aligned and current in version 1.41.
About SFPPy
SFPPy is a Python-based framework for πβ―π compliance testing of food contact materials and π’β¬β»οΈ recycled plastic safety assessment. It supports regulations from:
- πΊπΈ US FDA regulations
- πͺπΊ European Union (EFSA, EU 10/2011, etc.)
- π¨π³ Chinese GB standards
- π Other international guidelines
Release Notes
π SFPPy is AI ready. Yes, GPT robots can develop chemical migration scenarios using the Pythonic language, operator and class models using the SFPPy frameworks. The limitations are discussed here.
π SFPPy is integrated in notebooks that keep records of the entire evaluation process. Starting from v1.37, a compliance template notebook for compliance is shipped with SFPPy.
π SFPPy is equipped with a graphical interface. SFPPy-GUI supports many of the capabilities of SFPPy and can easily be extended with forms or customized widgets. The manual is available here.
π SFPPy can be used in hybrid environments (online/offline), scripts/notebooks, Windows/Linux. All examples are provided as exampleX.py and notebooks/exampleX.ipynb, with X = 1β4.
π Starting from version 1.3, SFPPy starts all simulations from the sole knowledge of the chemical name of the substance, inferring the diffusivities (ποΈπ¨, ππ¨π»π¨ππ¨) and partitioning (π§²) from the best models applicable. The collection of models can be augmented as shown in patankar.properties.
π SFPPy uses PubChem as the primary source of chemical information, including chemical structure. An internet connection enables SFPPy to retrieve information automatically. The information is cached locally to avoid overloading PubChem servers.
π Starting from version 1.37, SFPPy is shipped with all substances of Annex I of the Regulation (EU) 10/2011 and provides toxicological alerts (if found) for all substances used as inputs. It uses ToxTree for that.
π SFPPy is agnostic to the system considered and runs indifferently on πͺ Windows, π§ Linux, π macOS. SFPPy depends exclusively on standard libraries: SciPy, NumPy, Matplotlib, Pandas, PIL.
π SFPPy is very fast and designed to test chained complex scenarios involving one or several substances.
π As of version 1.40, SFPPy and SFPPyLite offer similar functionality. Users are encouraged to work through Jupyter notebooks rather than standalone Python scripts, as notebooks provide a more interactive and reproducible workflow. Global behaviorβsuch as discretization resolution, plotting preferences, and moreβcan be customized via user overrides using:
from patankar.useroverride import useroverride
π *As of version 1.41, SFPPy and SFPPyLite are shipped with US FCN (πΊπΈ), EU Annex I (πͺπΊ), and GB Appendix A (π¨π³) databases, all managed independently with their database manager and updater. All individual substances and their toxicological assessment are shipped with SPFPPy.
ποΈ Download SFPPy v1.42 β Stable Release
| Feature / Content | β
Full Version 128 MB |
βͺ Light Version 64 MB |
|---|---|---|
π§ͺ Includes Toxtree integration |
β Yes | β No |
| π Full documentation | β Yes | β Yes |
𧬠Advanced risk assessment (migrantToxtree) |
β Supported | β Not supported |
π¬ Routine migration modeling (migrant) |
β Supported | β Supported |
| π₯ Download ZIP | Download SFPPy | Download SFPPymin |
| π¦ View all versions | Releases | Releases |
π‘ Note: The light version does not include a private installation of Toxtree, used by patankar.loadpubchem.migrantToxtree for advanced risk assessment. However, patankar.loadpubchem.migrant remains fully functional for routine migration simulations.
Warning
β Toxtree requires a Java runtime environment (JRE) if Java β is not already installed. If needed, Toxtree can be manually installed in patankar/private/toxtree/ as described in patankar/private/toxtree/README.md.
π Example Files
SFPPy includes four example scripts (and more notebooks) to help you get started:
| Example file (located in the root folder π ) | Description (see π Wiki Pages) |
|---|---|
example1.py |
Monolayer materials |
example2.py |
Recycled bottles with functional barriers |
example3.py |
Chained simulations with variations |
example4.py |
Fitting experimental curves to extract diffusion and partition coefficients |
Tip
β¨ All scripts in the root folder π can be executed directly without modifying the Python path.
If running from another location, use the CLI:
sfppy example1.py # Replace example1.py with your scriptImportant
Notebooks: Keep code, assumptions, results, and interpretations together β ideal for regulatory workflows. If you run notebooks/example1.ipynb, you can save automatically all results and code with:
export_notebook(filename="example1",outputfolder="reports");π οΈ Running SFPPy from Anywhere π
To test releases effortlessly:
# Navigate to the extracted SFPPy folder
cd /path/to/SFPPy # π Unzipped folder
# Install SFPPy in editable mode (dependencies included)
pip install -e .
# Run example1 from anywhere
sfppy example1.py # Replace example1.py with your scriptFor detailed installation instructions, refer to the installation guide π§βπ§.
Note
All notebooks located in πnotebooks/ are equipped with a bootstrap mechanism enabling them to start without any installation.
π Quick Start & Exploration
π Read the Online Documentation:
- π SFPPy Documentation
- π SFPPy Wiki Pages
- π Migration Modeling Guide
- π FitNESS E-learning Platform (Details)
π Try SFPPy now and streamline your food safety assessments!
π Additional Resources
π Publication on Chained Simulation
𧬠AIChE Journal: Migration Modeling with SFPPy
A peer-reviewed reference for the core modeling engine and chaining logic implemented in SFPPy.
π GitHub Pages
The official development hub for SFPPy, including installation, examples, and documentation.
SFPPyLite is a sister project that runs entirely in-browser, without installation or servers. Most use casesβsetup, simulation, visualization, and exportβcan be handled interactively in JupyterLite.
See [wiki pag...
π SFPPy - Python Framework for Food Contact Compliance & Risk Assessment πβ©π
SFPPy v1.40 Release πβ©π
Important
This page provides the latest stable version of SFPPy for local installation on your machine.
If you're looking for an online experience, there are two alternatives:
-
π’ Google Colab: No packaging needed β simply follow the
git cloneinstructions shown on the main project page or watch the video walkthrough. -
π SFPPyLite: Use SFPPy directly in your browser with no setup at all. Powered by WebAssembly and JupyterLite, it gives you access to most of SFPPyβs core capabilities in a single click.
π Both SFPPy and SFPPyLite are aligned and current in version 1.40.
About SFPPy
SFPPy is a Python-based framework for πβ―π compliance testing of food contact materials and π’β¬β»οΈ recycled plastic safety assessment. It supports regulations from:
- πΊπΈ US FDA regulations
- πͺπΊ European Union (EFSA, EU 10/2011, etc.)
- π¨π³ Chinese GB standards
- π Other international guidelines
Release Notes
π SFPPy is AI ready. Yes, GPT robots can develop chemical migration scenarios using the Pythonic language, operator and class models using the SFPPy frameworks. The limitations are discussed here.
π SFPPy is integrated in notebooks that keep records of the entire evaluation process. Starting from v1.37, a compliance template notebook for compliance is shipped with SFPPy.
π SFPPy is equipped with a graphical interface. SFPPy-GUI supports many of the capabilities of SFPPy and can easily be extended with forms or customized widgets. The manual is available here.
π SFPPy can be used in hybrid environments (online/offline), scripts/notebooks, Windows/Linux. All examples are provided as exampleX.py and notebooks/exampleX.ipynb, with X = 1β4.
π Starting from version 1.3, SFPPy starts preferably all simulations from the sole knowledge of the chemical name of the substance, inferring the diffusivities (ποΈπ¨, ππ¨π»π¨ππ¨) and partitioning (π§²) from the best models applicable. The collection of models can be augmented as shown in patankar.properties.
π SFPPy uses PubChem as the main source of chemical information including chemical structure. An internet connection is required to enable SFPPy to retrieve information automatically. The information is cached locally to avoid overloading PubChem servers.
π Starting from version 1.37, SFPPy is shipped with all substances of the Annex I of the Regulation (EU) 10/2011 and provides toxicological alerts (if found) for all substances used as inputs. It uses ToxTree for that.
π SFPPy is agnostic to the system considered and runs indifferently on πͺ Windows, π§ Linux, π macOS. SFPPy depends exclusively on standard libraries: SciPy, NumPy, Matplotlib, Pandas, PIL.
π SFPPy is very fast and has been designed for testing chained complex scenarios involving one or several substances.
π As of version 1.40, SFPPy and SFPPyLite offer very similar functionality. Users are strongly encouraged to work through Jupyter notebooks rather than standalone Python scripts, as notebooks provide a more interactive and reproducible workflow. Global behaviorβsuch as discretization resolution, plotting preferences, and moreβcan be customized via user overrides using:
from patankar.useroverride import useroverride
ποΈ Download SFPPy v1.40 β Stable Release
| Feature / Content | β
Full Version 112 MB |
βͺ Light Version 48 MB |
|---|---|---|
π§ͺ Includes Toxtree integration |
β Yes | β No |
| π Full documentation | β Yes | β Yes |
𧬠Advanced risk assessment (migrantToxtree) |
β Supported | β Not supported |
π¬ Routine migration modeling (migrant) |
β Supported | β Supported |
| π₯ Download ZIP | Download SFPPy | Download SFPPymin |
| π¦ View all versions | Releases | Releases |
π‘ Note: The light version does not include a private installation of Toxtree, used by patankar.loadpubchem.migrantToxtree for advanced risk assessment. However, patankar.loadpubchem.migrant remains fully functional for routine migration simulations.
Warning
β Toxtree requires a Java runtime environment (JRE) if Java β is not already installed. If needed, Toxtree can be manually installed in patankar/private/toxtree/ as described in patankar/private/toxtree/README.md.
π Example Files
SFPPy includes four example scripts (and more notebooks) to help you get started:
| Example file (located in the root folder π ) | Description (see π Wiki Pages) |
|---|---|
example1.py |
Monolayer materials |
example2.py |
Recycled bottles with functional barriers |
example3.py |
Chained simulations with variations |
example4.py |
Fitting experimental curves to extract diffusion and partition coefficients |
Tip
β¨ All scripts in the root folder π can be executed directly without modifying the Python path.
If running from another location, use the CLI:
sfppy example1.py # Replace example1.py with your scriptImportant
Notebooks: Keep code, assumptions, results, and interpretations together β ideal for regulatory workflows. If you run notebooks/example1.ipynb, you can save automatically all results and code with:
export_notebook(filename="example1",outputfolder="reports");π οΈ Running SFPPy from Anywhere π
To test releases effortlessly:
# Navigate to the extracted SFPPy folder
cd /path/to/SFPPy # π Unzipped folder
# Install SFPPy in editable mode (dependencies included)
pip install -e .
# Run example1 from anywhere
sfppy example1.py # Replace example1.py with your scriptFor detailed installation instructions, refer to the installation guide π§βπ§.
Note
All notebooks located in πnotebooks/ are equipped with a bootstrap mechanism enabling them to start without any installation.
π Quick Start & Exploration
π Read the Online Documentation:
- π SFPPy Documentation
- π SFPPy Wiki Pages
- π Migration Modeling Guide
- π FitNESS E-learning Platform (Details)
π Try SFPPy now and streamline your food safety assessments!
π Additional Resources
π Publication on Chained Simulation
𧬠AIChE Journal: Migration Modeling with SFPPy
A peer-reviewed reference for the core modeling engine and chaining logic implemented in SFPPy.
π GitHub Pages
The official development hub for SFPPy, including installation, examples, and documentation.
SFPPyLite is a sister project that runs entirely in-browser, without installation or servers. Most use casesβincluding setup, simulation, visualization, and exportβcan be handled interactively in JupyterLite.
See wiki pages for more.
Tip
π§ Why is SFPPy AI-ready?
Read more on Generative Simulation. ...
π SFPPy - Python Framework for Food Contact Compliance & Risk Assessment πβ©π
SFPPy v1.37 Release πβ©π
Important
This page is for downloading the last stable version of SFPPy for a local installation. If you prefer an online installation on Google Colab, please refer to the project's main page and this video. The installation of SFPPy in Colab (and in some online Jupyter notebooks) does not need packaging but git clone instructions instead.
About SFPPy
SFPPy is a Python-based framework for πβ―π compliance testing of food contact materials and π’β¬β»οΈ recycled plastic safety assessment. It supports regulations from:
- πΊπΈ US FDA regulations
- πͺπΊ European Union (EFSA, EU 10/2011, etc.)
- π¨π³ Chinese GB standards
- π Other international guidelines
Release Notes
π SFPPy is AI-ready. Yes, GPT robots can develop chemical migration scenarios using the Pythonic language and operator and class models using the SFPPy frameworks. The limitations are discussed here.
π SFPPy is integrated in notebooks that keep records of the entire evaluation process. Starting from v1.37, a compliance template notebook for compliance is shipped with SFPPy.
π SFPPy is equipped with a graphical interface. SFPPy-GUI supports many of the capabilities of SFPPy and can easily be extended with forms or customized widgets. The manual is available here.
π SFPPy can be used in hybrid environments (online/offline), scripts/notebooks, and Windows/Linux. All examples are provided as exampleX.py and notebooks/exampleX.ipynb, with X = 1β4.
π Starting from version 1.3, SFPPy preferably starts all simulations from the sole knowledge of the substance's chemical name, inferring the diffusivities (ποΈπ¨, ππ¨π»π¨ππ¨) and partitioning (π§²) from the best applicable models. The collection of models can be augmented as shown in patankar.properties.
π SFPPy uses PubChem as the primary source of chemical information, including chemical structure. An internet connection enables SFPPy to retrieve information automatically. The information is cached locally to avoid overloading PubChem servers.
π Starting from version 1.37, SFPPy is shipped with all substances of Annex I of the Regulation (EU) 10/2011 and provides toxicological alerts (if found) for all substances used as inputs. It uses ToxTree for that.
π SFPPy is agnostic to the system considered and runs indifferently on πͺ Windows, π§ Linux, π macOS. SFPPy depends exclusively on standard libraries: SciPy, NumPy, Matplotlib, Pandas, PIL.
π SFPPy is very fast and designed to test chained complex scenarios involving one or several substances.
π¦ Download & Installation
SFPPy stable is available in two versions ποΈ
-
Full version 108 MB π° Includes: π§ͺ
ToxtreeβΊβ π Full documentation
π₯ Download SFPPy (check the last version here) -
Light version 44 MB π° Includes: βΊβ π Full documentation
π₯ Download SFPPymin (check the last version here)
The light version does not include the private installation of Toxtree, which is used in patankar.loadpubchem.migrantToxtree for advanced risk assessment. However, patankar.loadpubchem.migrant remains fully functional for routine simulations.
Warning
β Toxtree requires a Java runtime environment (JRE) if Java β is not already installed. If needed, Toxtree can be manually installed in patankar/private/toxtree/ as described in patankar/private/toxtree/README.md.
π Example Files
SFPPy includes four example scripts (and more notebooks) to help you get started:
| Example file (located in the root folder π ) | Description (see π Wiki Pages) |
|---|---|
example1.py |
Monolayer materials |
example2.py |
Recycled bottles with functional barriers |
example3.py |
Chained simulations with variations |
example4.py |
Fitting experimental curves to extract diffusion and partition coefficients |
Tip
β¨ All scripts in the root folder π can be executed directly without modifying the Python path.
If running from another location, use the CLI:
sfppy example1.py # Replace example1.py with your scriptImportant
Notebooks: Keep code, assumptions, results, and interpretations together β ideal for regulatory workflows. If you run notebooks/example1.ipynb, you can save all results and code automatically with:
export_notebook(filename="example1",outputfolder="reports");π οΈ Running SFPPy from Anywhere π
To test releases effortlessly:
# Navigate to the extracted SFPPy folder
cd /path/to/SFPPy # π Unzipped folder
# Install SFPPy in editable mode (dependencies included)
pip install -e .
# Run example1 from anywhere
sfppy example1.py # Replace example1.py with your scriptFor detailed instructions, refer to the installation guide π§βπ§.
Note
All notebooks located in πnotebooks/ are equipped with a bootstrap mechanism enabling them to start without any installation.
π Quick Start & Exploration
π Read the Online Documentation:
- π SFPPy Documentation
- π SFPPy Wiki Pages
- π Migration Modeling Guide
- π FitNESS E-learning Platform (Details)
π Try SFPPy now and streamline your food safety assessments!
π Additional Resources
π Publication on chained simulations:
AIChE Journal - SFPPy Migration Modeling
π GitHub Pages:
is the official development branch of
SFPPy.
is a sister project running Python and π§ some features of SFPPy directly in your browser without any server or installation. It can open/edit notebooks and Python β even if you do not have Jupyter, Spyder, or Visual Studio Code. Just drop the files in the file browser (left pane).
Why SFPPy is in Python?
[!TIP]
β Open & Accessible. π§° Powerful Scientific Libraries. π Better Interoperability. β‘ Automation & Reproducibility in simulation batches. π§ AI-Readiness. GPTs and AI tools already speak Python natively. The
SFPPyAPI and class design were crafted to allow semantic modeling of scenarios (e.g., using>>chaining, units, chemical knowledge).
*Contact* Olivier Vitrac *for questions |* Website *|* Documentation
π SFPPy - Python Framework for Food Contact Compliance & Risk Assessment πβ©π
SFPPy v1.3 Releases πβ©π
About SFPPy
SFPPy is a Python-based framework for πβ―π compliance testing of food contact materials and π’β¬β»οΈ recycled plastic safety assessment. It supports regulations from:
- πΊπΈ US FDA regulations
- πͺπΊ European Union (EFSA, EU 10/2011, etc.)
- π¨π³ Chinese GB standards
- π Other international guidelines
π
SFPPyintegrates well-established chemical migration models into Python, offering object-oriented and scalable capabilities. It includes a comprehensive collection of scenarios π for various applications.
π Starting from version 1.3, the computational engine βοΈ automatically selects the best model π€ to predict πͺ diffusivities and partitioning from molecular structures β¬.
Diffusivity in polymer ( $D$ )
ποΈπ¨, ππ¨π»π¨ππ¨Henry-like coefficients ( $k$ ):
Chemical affinity π§²π Dpiringer- Legacy overestimation model (many polymersπ, temperature effectsπ‘οΈ)π kFH- Flory-Huggins model for polymers and adhesives (many polymers π)π DFV- Hole Free-Volume model = Accurate for recycled plastics β»οΈ and decontamination processes π¦π kFH- Flory-Huggins model for food simulantsπ₯« with entropic correctionπ Dwelle- Refined model for PET and PS above and below$T_g$ π Combined rules considering texture effects π―
π No Python Knowledge? No Problem! π§βπ¬π©βπ¬ SFPPy is designed for scientists, engineers, and food packaging experts without programming experience. You can simulate mass transfer or analyze results using πΉ simple commands and πΉ pre-built functions that handle complex calculations internally.
π¦ Download & Installation
SFPPy is available in two versions ποΈ β Compatible with πͺ Windows, π§ Linux, π macOS.
The light version does not include the private installation of Toxtree, which is used in patankar.loadpubchem.migrantToxtree for advanced risk assessment. However, patankar.loadpubchem.migrant remains fully functional for routine simulations.
If needed, Toxtree can be manually installed in patankar/private/toxtree/ as described in patankar/private/toxtree/README.md.
-
Full version 80 MB π° Includes: π§ͺ
ToxtreeβΊβ π Full documentation
π₯ Download SFPPy -
Light version 17 MB π° Includes: βΊβ π Full documentation
π₯ Download SFPPymin
β
Toxtreerequires a Java runtime environment (JRE) if Java β is not already installed.
π Example Files
SFPPy includes four example scripts to help you get started:
| Example file (located in the root folder π ) | Description (see π Wiki Pages) |
|---|---|
example1.py |
Monolayer materials |
example2.py |
Recycled bottles with functional barriers |
example3.py |
Chained simulations with variations |
example4.py |
Fitting experimental curves to extract diffusion and partition coefficients |
β¨ All scripts in the root folder π can be executed directly without modifying the Python path.
If running from another location, use the CLI:
sfppy example1.py # Replace example1.py with your scriptπ οΈ Running SFPPy from Anywhere π
To test releases effortlessly:
# Navigate to the extracted SFPPy folder
cd /path/to/SFPPy # π Unzipped folder
# Install SFPPy in editable mode (dependencies included)
pip install -e .
# Run example1 from anywhere
sfppy example1.py # Replace example1.py with your scriptFor detailed installation instructions, refer to the installation guide π§βπ§.
π Quick Start & Exploration
π Read the Online Documentation:
- π SFPPy Documentation
- π SFPPy Wiki Pages
- π Migration Modeling Guide
- π FitNESS E-learning Platform (Details)
π Try SFPPy now and streamline your food safety assessments!
π Additional Resources
π Publication:
AIChE Journal - SFPPy Migration Modeling
π GitHub Pages:
https://ovitrac.github.io/SFPPy/
*Contact* Olivier Vitrac *for questions |* Website *|* Documentation
π SFPPy - Python Framework for Food Contact Compliance & Risk Assessment πβ©π
SFPPy v1.22 πβ©π
SFPPy is a Python-based framework for compliance testing of food contact materials and recycled plastic safety assessment, supporting regulations from:
- πΊπΈ US FDA regulations
- πͺπΊ European Union (EFSA, EU 10/2011, etc.)
- π¨π³ Chinese GB standards
- π Other international guidelines
SFPPy brings well-established chemical migration models to pure Python, offering object-oriented and scalable capabilities.
π Read the detailed internal documentation here.
π¦ Download & Installation
- Full version (
< 10 MBwith documentation) - for Windows, Linux, macOS:
π₯ Download SFPPy v1.22
π Example Files
Included in the root folder:
example1.pyexample2.pyexample3.py
π Quick Start & Exploration
π Read the Online Documentation:
β‘ Create complex migration scenarios with concise, efficient Python code:
π Click to expand example
from patankar.layer import gPET, PP
from patankar.food import ambient, hotfilled, realfood, fat, liquid, stacked
from patankar.loadpubchem import migrant
# π¬ Look up substances on PubChem
m = migrant("limonene")
# ποΈ Create a multilayer material (ABA: PET-PP-PET)
A = gPET(l=(20, "um"), migrant=m, C0=0)
B = PP(l=(500, "um"), migrant=m, C0=200)
ABA = A + B + A # The leftmost layer is in contact with food
# π½οΈ Define contact & storage conditions
class contact1(stacked, ambient): name = "1: Setoff"; contacttime = (4, "months")
class contact2(hotfilled, realfood, liquid, fat): name = "2: Hot Filling"
class contact3(ambient, realfood, liquid, fat): name = "3: Storage"; contacttime = (6, "months")
# π Simulate a multiple-step migration process
medium1, medium2, medium3 = contact1(), contact2(), contact3()
medium1 >> ABA >> medium1 >> medium2 >> medium3 # Automatic chaining
# π Merge & visualize migration kinetics
sol123 = medium1.lastsimulation + medium2.lastsimulation + medium3.lastsimulation
sol123.plotCF()π‘ Why Use SFPPy?
β
Regulation-Ready: Supports compliance testing for FDA, EFSA, and GB standards
β
Fast & Scalable: Optimized finite-volume solver for 1D mass transfer modeling
β
Modular & Object-Oriented: Easily define multilayer materials & food contact conditions
β
PubChem Integration: Fetch molecular properties directly from PubChem
β
Automatic Chaining: Simulate multi-step processes effortlessly
π Try SFPPy now and streamline your food safety assessments!
π Additional Resources
π Publication:
AIChE Journal - SFPPy Migration Modeling
π GitHub Pages:
https://ovitrac.github.io/SFPPy/