Metadata-Version: 2.4
Name: google_wallet_webhook_auth
Version: 0.1.0
Summary: Google Wallet webhook signature verification utilities for Python.
Author: Jules LE BRIS
Author-email: Jules LE BRIS <jls.lebris@gmail.com>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Dist: cryptography>=46.0
Requires-Dist: requests
Requires-Dist: mypy>=1.19.0 ; extra == 'dev'
Requires-Dist: pre-commit>=4.5.0 ; extra == 'dev'
Requires-Dist: pytest>=9.0.2 ; extra == 'dev'
Requires-Dist: pytest-cov>=7.0.0 ; extra == 'dev'
Requires-Dist: ruff>=0.14.9 ; extra == 'dev'
Requires-Dist: twine>=6.2.0 ; extra == 'dev'
Requires-Dist: types-requests>=2.32.4.20250913 ; extra == 'dev'
Requires-Python: >=3.10
Project-URL: Homepage, https://github.com/ripoul/google-wallet-webhook-auth
Project-URL: Issues, https://github.com/ripoul/google-wallet-webhook-auth/issues
Provides-Extra: dev
Description-Content-Type: text/markdown

# google-wallet-webhook-auth

Google Wallet webhook signature verification utilities for Python.

## Features

- Verify Google Wallet webhook signatures according to official documentation
- Utilities for handling Google Pay cryptographic signature formats
- Typed and tested Python code

## Installation

```bash
pip install google-wallet-webhook-auth
```

## Usage

An example with flask : 

```python
from flask import Flask, request, jsonify, abort
from google_wallet_webhook_auth import Validator
from google_wallet_webhook_auth.exceptions import SignatureVerificationError


app = Flask(__name__)

@app.route("/webhook/google/events", methods=['POST'])
def event_webhook():
    data = request.get_json()
    try:
        Validator("YOUR_ISSUER_ID").validate(data)
    except SignatureVerificationError:
        abort(401)

if __name__ == '__main__':
    app.run(debug=True)
```

## Development

- Install deps: `uv sync --all-extras`
- Run tests: `uv run pytest`
- Lint and format: `pre-commit run --all-files`
- Before commit: `pre-commit install`

## License

This project is licensed under the GPL-3.0-or-later. See [LICENSE](LICENSE) for details.


**Made with ❤️**
