Releases: ovitrac/SFPPy
π SFPPy - Python Framework for Food Contact Compliance & Risk Assessment πβ©π
SFPPy v1.3 Releases πβ©π
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. A large collection of scenarios π is included in theSFPPy
package.π No Python Knowledge? No Problem! π§βπ¬π©βπ¬
SFPPy
is designed for scientists, engineers, and food packaging experts who may not have programming experience. You donβt need to know Python to simulate mass transfer or analyze resultsβjust follow πΉ simple commands and πΉ pre-built functions to handle complex calculations internally.
π¦ Download & Installation
SFPPy
is available in two versions ποΈ:
The light version does not include the private installation of Toxtree
. The class patankar.loadpubchem.migrantToxtree
, which is used for advanced risk assessment, relies on Toxtree
. However, without it, the class patankar.loadpubchem.migrant
remains fully operational and is sufficient for routine simulations.
If needed, Toxtree
can be installed manually in patankar/private/toxtree/
as described in patankar/private/toxtree/README.md
.
-
Full version (78 MB, includes Toxtree) - compatible with πͺ Windows, π§ Linux, π macOS:
π₯ Download SFPPy -
Light version (15 MB, includes full documentation) - compatible with πͺ Windows, π§ Linux, π macOS:
π₯ Download SFPPymin
β*
Toxtree
requires a Java runtime environment (JRE
) if Java β is not already installed on your system.*
π Example Files
SFPPy
comes with 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 you need to run them from another location, use the provided CLI:
sfppy example1.py # Replace example1.py with your script
π οΈ Running SFPPy from Anywhere π
To test the releases effortlessly, follow this quick setup:
# Navigate to the extracted SFPPy folder
cd /path/to/SFPPy # π This is where the files were unzipped
# Install SFPPy in editable mode (dependencies included)
pip install -e .
# Run example1 from anywhere
sfppy example1.py # Replace example1.py with your script
For 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)
β‘ Build complex migration scenarios π efficiently with minimal Python code:
π Click to expand example
from patankar.layer import gPET, PP
from patankar.food import ambient, hotfilled, realfood, fat, liquid, stacked
# ποΈ Define a multilayer material (ABA: PET-PP-PET)
A = gPET(l=(20, "um"), migrant='bisphenol A', C0=0)
B = PP(l=(500, "um"), migrant='bisphenol A', 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 multi-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()
π SFPPy is fully configured, so no deep Python knowledge is required! π
π‘ Why Use SFPPy?
- β Regulation-Ready: 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 β & ToxTree β£οΈ Integration: Fetch molecular properties directly from PubChem & ToxTree
- β Automatic Chaining β©: Effortlessly simulate multi-step processes
- β
Export Results π€: to EXCELπ, CSVπ, Pandasπ, Matlab
βοΈ , πβ¦
π 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 MB
with documentation) - for Windows, Linux, macOS:
π₯ Download SFPPy v1.22
π Example Files
Included in the root folder:
example1.py
example2.py
example3.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/