Metadata-Version: 2.1
Name: firebase-messaging
Version: 0.1.0
Summary: FCM/GCM push notification client
Home-page: https://github.com/sdb9696/firebase-messaging
License: MIT
Keywords: Firebase,Firebase Cloud Messaging,Google Cloud Messaging
Author: sdb9696
Author-email: steven.beth@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Environment :: Other Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides-Extra: docs
Requires-Dist: cryptography (>=41.0.4,<42.0.0)
Requires-Dist: http-ece (>=1.1.0,<2.0.0)
Requires-Dist: protobuf (>=4.24.4,<5.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: sphinx (==7.1.2) ; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints (>=1.24.0,<2.0.0) ; extra == "docs"
Requires-Dist: sphinx-rtd-theme (>=1.3.0,<2.0.0) ; extra == "docs"
Project-URL: Documentation, http://firebase-messaging.readthedocs.io/
Project-URL: Repository, https://github.com/sdb9696/firebase-messaging
Description-Content-Type: text/x-rst

==================
Firebase Messaging
==================

.. image:: https://badge.fury.io/py/firebase-messaging.svg
    :alt: PyPI Version
    :target: https://badge.fury.io/py/firebase-messaging

.. image:: https://github.com/sdb9696/firebase-messaging/actions/workflows/ci.yml/badge.svg?branch=main
    :alt: Build Status
    :target: https://github.com/sdb9696/firebase-messaging/actions/workflows/ci.yml?branch=main

.. image:: https://coveralls.io/repos/github/sdb9696/firebase-messaging/badge.svg?branch=main
    :alt: Coverage
    :target: https://coveralls.io/github/sdb9696/firebase-messaging?branch=main

.. image:: https://readthedocs.org/projects/firebase-messaging/badge/?version=latest
    :alt: Documentation Status
    :target: https://firebase-messaging.readthedocs.io/?badge=latest

.. image:: https://img.shields.io/pypi/pyversions/firebase-messaging.svg
    :alt: Py Versions
    :target: https://pypi.python.org/pypi/firebase-messaging#

A library to subscribe to GCM/FCM and receive notifications within a python application.

When should I use `firebase-messaging` ?
----------------------------------------

- I want to **receive** push notifications sent using Firebase Cloud Messaging in a python application.

When should I not use `firebase-messaging` ?
--------------------------------------------

- I want to **send** push notifications (use the firebase SDK instead)
- My application is running on a FCM supported platform (Android, iOS, Web).

Install
-------

PyPi::

    $ pip install firebase-messaging


Requirements
------------

- Firebase sender id to receive notification
- Firebase serverKey to send notification (optional)

Usage
-----

python::

    from firebase_messaging import FcmPushClient

    def on_notification(obj, notification, data_message):
        # Do something with the notification
        pass

    pc = FcmPushClient(None)
    fcm_token = pc.checkin(sender_id, app_id)

    # Notify the service you're connecting to of your FCM token

    pc.connect(YOUR_NOTIFICATION_CALLBACK)


Attribution
-----------

Code originally based on typescript/node implementation by
`Matthieu Lemoine <https://github.com/MatthieuLemoine/push-receiver>`_.
See `this blog post <https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0>`_ for more details.

Converted to python by 
`lolisamurai <https://github.com/Francesco149/push_receiver>`_

http decryption logic in decrypt.py by 
`Martin Thomson <https://github.com/web-push-libs/encrypted-content-encoding>`_

