Nothing complicated, you just need the Stegano library:
# pip install stegano
from stegano import lsb
secret = lsb.hide('image.png', 'very secret text')
secret.save('secret_image.png')
print(lsb.reveal('secret_image.png'))
PY Python Projects & Free Books @pythonfreebootcamp · 40.6K subscribers 
# pip install stegano
from stegano import lsb
secret = lsb.hide('image.png', 'very secret text')
secret.save('secret_image.png')
print(lsb.reveal('secret_image.png'))