Skip to main content

Miru server SDK & webhook 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_server_sdk.callbacks import Callback 

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}'

cb = Callback(secret)
# Throws on error, returns the verified content on success
cb.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.2.0.tar.gz (3.9 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.2.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: miru_server_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 3.9 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.2.0.tar.gz
Algorithm Hash digest
SHA256 ee6ad56d9e00ff899b8e7fac14e2b2bfb406b4995b2fe4d9467597c9e11b302f
MD5 61e82cca86d764839aa1cdf9097bd117
BLAKE2b-256 f57e8cb0abbdacf4257f2cc89c37f34fd1e8635815e85d26d8a9c2e8066b1c7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for miru_server_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 176d34acdbdfe091e5e5fe3e98c9d591c442bb24b37194c0ac0f04c1cf0f585d
MD5 01462476f17914b7dc44630e8680c7a4
BLAKE2b-256 986e925d9f9182cc4661a0c830473796abca7a7bd954307d142b65b5cde11122

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