Last active
October 25, 2020 21:05
-
-
Save hiranya911/9db8e47625f085127b213cf0ce549c1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import firebase_admin | |
from firebase_admin import messaging | |
def enable_urllib3_logging(): | |
logging.basicConfig() | |
logging.getLogger().setLevel(logging.DEBUG) | |
if __name__ == '__main__': | |
enable_urllib3_logging() | |
firebase_admin.initialize_app() | |
msg = messaging.Message( | |
notification=messaging.Notification(title='Hello world!'), | |
topic='test', | |
) | |
msg_id = messaging.send(msg) | |
print(msg_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment