replicating in python what the electrum wallet does during (deterministic) wallet creation
Bip32 is the implementation of hierarchical deterministic wallets. This fully describes what you are discussing here. The full text of bip32 can be found https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
The mnemonic maps to specific bits for the encryption, the words themselves are not used. Read the bit about extending the keys it will also explain how the master public key is generated.  It also explains the three derivations that can be made from the public and private keys which are: 

Parent private key -> child private key

Parent private key -> child public key

Parent public key -> child public key

It is worth noting the child private key cannot be generated from the parent public key.