Skip to main content

Miru callback verification library

Project description

Miru Python SDK

This repository contains the Miru Python SDK for verifying Miru callbacks.

Installation

pip install miru-server-sdk

Verify a Callback

Please refer to the official documentation for more usage instructions.

from miru.webhooks import Webhook

secret = "cbsec_WrtItCFkZWrP8h9q4FgnoZsS3QlwUt3o/7juCWkGc1c="

# These were all sent from the server
headers = {
  "miru-id": "evt_p5jXN8AQM9LWM0D4loKWxJek",
  "miru-timestamp": "1614265330",
  "miru-signature": "v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE=",
}
payload = '{"test": 2432232314}'

wh = Webhook(secret)
# Throws on error, returns the verified content on success
wh.verify(payload, headers)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miru_server_sdk-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miru_server_sdk-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file miru_server_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: miru_server_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for miru_server_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5966349bd5c387807c380d4e24e3418c11b76c8d454539a86986d6655ccac262
MD5 640f1ca514668a77c9cecd6b49aad763
BLAKE2b-256 23287973003182aa247da76de651fce7e19ed2058a2989b739d781e684944d0e

See more details on using hashes here.

File details

Details for the file miru_server_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for miru_server_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71e476fcfd4670895e272191cd8a1fc1584c8650e803ce2af963aba1000877b3
MD5 905a1be5b199110165c026ed74f4d5fe
BLAKE2b-256 831969d4abc3550370b9fbe1b42d3a3833fa7cd6269977ca4840b7b54c36a3f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page