Skip to main content

Notrix Official Python SDK

Project description

Notrix Python SDK

This SDK is divided into two parts

webhook verification

will help you verify the webhook source and extract its data

API

helps you communicate with notrix API with type hints

Installation

pip install notrix

Basic usage

API

from notrix import Client

client = Client("NOTRIX_SECRET_KEY")
payment_page = client.create_payment_page(
    title="...",
    description="...",
    image="...",
    currency_short_name="BIT",
    price=0.013,
    wallet_address="...",
)
client.get_orders(payment_page_uuid="...")

Webhook

from fastapi import FastAPI, Request, HttpException
from notrix import WebhookVerify

api = FastAPI()
wf = WebhookVerify("WEBHOOK_VERIFICATION_KEY")

@api.post("/notrix/webhook/")
async def payment_webhook(request: Request):
    if not wf.is_verfied(request.headers):
        raise HttpException(b"request is not verified")

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

notrix-0.1.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

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

notrix-0.1.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: notrix-0.1.0.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.12 Linux/6.2.0-26-generic

File hashes

Hashes for notrix-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2205fb6a41140439867dc7e4fbbf3b79e06d61068f6cd7d0af1b6ed98f13875d
MD5 15986efc19a5e537e8e0c6d42d2c9f6e
BLAKE2b-256 46d0bb06f7994b0c6aec064c7d4ea697f4732fb7dac83bffde0193544a7881b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: notrix-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.12 Linux/6.2.0-26-generic

File hashes

Hashes for notrix-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 011478a785919ad5476c55c4cd20f27c80f8cf13e3080651e27a61540161d944
MD5 f5da7763943a86d818200b77f99631dc
BLAKE2b-256 4d0e51d0e4239104fdd793280406525037aec0b35a775ac03bce53f12fd81569

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