qiibee loyalty blockchain brand SDK
Project description
qb-sdk-python
Brand SDK for the qiibee blockchain.
Requirements
Consult the docs to see how to obtain the credentials necessary for this.
Installation
pip install qb-sdk
Example usage
Import the SDK library:
import qbsdk
Initialize the API object:
api_key = os.environ['QB_API_KEY']
brand_address_private_key = os.environ['BRAND_ADDRESS_PRIVATE_KEY']
token_symbol = os.environ['BRAND_TOKEN_SYMBOL']
api = qbsdk.Api(api_key)
Fetch existing tokens:
tokens = api.get_tokens()
for token in tokens.private:
print(vars(token))
Reward a particular user:
wallet = qbsdk.Wallet(brand_address_private_key, token_symbol, api, transfer_strategy=qbsdk.TransferStrategy.brand)
wallet.setup()
transfer_receiver = '0x87265a62c60247f862b9149423061b36b460f4bb'
tx = wallet.send_transaction(transfer_receiver, 10)
Check out the examples directory for more comprehensive examples.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qb-sdk-0.0.3.tar.gz.
File metadata
- Download URL: qb-sdk-0.0.3.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2af43f3d1bd595f651632522f38c07913f0b910edfda3d1fadf3b38387eb903f
|
|
| MD5 |
d5c9bb5091598369fc8ebc14b6a2fc0b
|
|
| BLAKE2b-256 |
cadc91d266f23f9a069abe3c3b9b7e9ed5296be5424c3ca09d50a8fcd1b09bdc
|
File details
Details for the file qb_sdk-0.0.3-py3-none-any.whl.
File metadata
- Download URL: qb_sdk-0.0.3-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c1417665f890c000c9ef5e8226acf765aed093f42c956f4984aec259c6eef2c
|
|
| MD5 |
773cb342dae83418699bc9b1b92572c3
|
|
| BLAKE2b-256 |
42a1394e3419121b2acbccd6e8c7c13a7956037cfd6c089e817559ea62825195
|