I took the design from Wiki.
cd ~
cd Desktop
mkdir SPN
cd SPN
git clone https://github.com/RobertSimion/SPN_encryption_and_decryption/
python3 main.py
This code encrypt and decrypt a cleartext which consists in 4 bytes of data using 10 Rounds of sBox block,permutation and XOR operations, generating independent key for each Round.
The main part of algth. stands in main.py and the behavior of methos were built in SPN.py header(python3 file).
I've used list_to_string.py script for identifying the maps between sBox and invers sBox as well as generating the inverse permutation.