Skip to content

Instantly share code, notes, and snippets.

@hiranya911
Last active October 25, 2020 21:05
Show Gist options
  • Save hiranya911/9db8e47625f085127b213cf0ce549c1c to your computer and use it in GitHub Desktop.
Save hiranya911/9db8e47625f085127b213cf0ce549c1c to your computer and use it in GitHub Desktop.
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