NQ SDK
Project description
NQ SDK
Part of NQ suite by Inqana.
Abstract Provider Classes
Construct your provider class using base provider class nqsdk.abstract.provider.Provider
and appropriate mixin classes depending on what functionality is supported by your provider.
All abstract methods must be implemented.
nqsdk.abstract.provider.Provider
Base provider class. All providers must be inherited from it.
nqsdk.abstract.provider.HealthCheckMixin
Use if your provider supports health check requests.
nqsdk.abstract.provider.BalanceCheckMixin
Use if your provider supports user's balance check requests.
nqsdk.abstract.provider.DeliveryCheckMixin
Use if your provider supports delivery check requests.
nqsdk.abstract.provider.AckCheckMixin
Use if your provider supports ack check requests.
nqsdk.abstract.provider.CallbackHandleMixin
Use if your provider supports callbacks from your API with no difference b/w nqsdk.enums.CallbackEvent.DELIVERY
& nqsdk.enums.CallbackEvent.ACK
events. E.g. all events are sent to the same URL & provider can distinguish them from callback's payload.
nqsdk.abstract.provider.StaticCallbackHandleMixin
Use this class if your provider only supports static callbacks, meaning that all events are sent to the same URL that is related to the provider. In this case, the provider can only extract the message external ID from the callback payload.
nqsdk.abstract.provider.DeliveryHandleMixin
Use if your provider supports nqsdk.enums.CallbackEvent.DELIVERY
event callbacks sent to a specific URL provided by NQ service.
nqsdk.abstract.provider.AckHandleMixin
Use if your provider supports nqsdk.enums.CallbackEvent.ACK
event callbacks sent to a specific URL provided by NQ service.
Dummy Provider
nqsdk.dummy.provider.DummyProvider
is a dummy implementation of NQ Provider Interface. It does nothing but can be used for tests.
You can find it at dummy/provider.py
.
Tests
Run tests locally:
./scripts/tests
License
Licensed under the terms of the Apache License, version 2.0. See LICENSE
file.
Copyright (c) 2023 Inqana Ltd.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nqsdk-1.0.0a15.tar.gz
.
File metadata
- Download URL: nqsdk-1.0.0a15.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac097409c912744033a9165ec505f8f9363581e557e4e56a9e264ebeb0ae3993 |
|
MD5 | 77d179cee14e926e4e7ceb182041f95a |
|
BLAKE2b-256 | 4a0597621de47afbf750c899f706498626cfbb6f711e256e552519248d388188 |
File details
Details for the file nqsdk-1.0.0a15-py3-none-any.whl
.
File metadata
- Download URL: nqsdk-1.0.0a15-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de199be336bf06951514a209f8dda9e0c1068caab0e77a0263556f84fd254299 |
|
MD5 | 510a667a5d36ec32dd7abf6e8b7a4694 |
|
BLAKE2b-256 | 16a4d30fee2a0408827ed3d6d3bada15c40691cc61f4d436aa161d500a41b7de |