Yes, your scenario is possible. You can send messages using the Azure portal and also use templates to send notifications. According to the Microsoft documentation, you can create a notification hub in the Azure portal and then configure the hub with platform notification system (PNS) settings. You can find the tutorial on how to create an Azure notification hub using the Azure portal in the following link: https://learn.microsoft.com/en-us/azure/notification-hubs/create-notification-hub-portal
Regarding the use of templates, you can use the Notification Hubs client to send notifications from a Python back-end. You can find the tutorial on how to use Notification Hubs with Python in the following link: https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-python-push-notification-tutorial
You can initialize your Notification Hubs client and then add the send code depending on your target mobile platform. The sample code also adds higher-level methods to enable sending notifications based on the platform, for example, send_windows_notification for Windows, send_apple_notification for Apple, etc.
Hope that helps.