you can use the smsmobileapi Python module to connect your WhatsApp account and send messages directly.
The setup is quick — just authenticate your WhatsApp account through their dashboard, and you’re good to go, I use it for serveral project for my customers
Here’s the link https://smsmobileapi.com/python/