Currently, QubiPy is in a very early development phase, so please take this into consideration before using the library.
Please visit the Change log to see all changes.
QubiPy is in beta phase and may change considerably until the stable version. Keep this in mind when using the library.
To learn more about QubiPy and its complete use, please visit our official documentation.
To install the necessary dependencies, run this command in the console :
$ pip install -r requirements.txt
You have two ways to use QubiPy, one is by PyPi or by cloning the project from the official repository.
To use the module, it is necessary to import some classes before :
from qubipy.rpc import rpc_client
from qubipy.core import core_client
Let's request tick info from the RPC for example :
RPC = rpc_client.QubiPy_RPC()
print(RPC.get_tick_info())
Response :
$ {
"tick": 16660254,
"duration": 1,
"epoch": 131,
"initialTick": 16640000
}
Let's request the entity info from the core :
CORE = core_client.QubiPy_Core()
print(CORE.get_entity_info('PEKBRHZQKMGCQBTAHXHZRXQRLBACJIHAGWHMPIJTZBWIJVTIWQOVMGJDTPFO'))
Reponse :
$ {
"entity": {
"id": "PEKBRHZQKMGCQBTAHXHZRXQRLBACJIHAGWHMPIJTZBWIJVTIWQOVMGJDTPFO",
"incomingAmount": "113653127220",
"outgoingAmount": "80838490981",
"numberOfIncomingTransfers": 824156,
"numberOfOutgoingTransfers": 422,
"latestIncomingTransferTick": 16613012,
"latestOutgoingTransferTick": 16613029
},
"validForTick": 16660147,
"spectrumIndex": 7434551,
"siblingIds": [
"GIDNABDPPDFPECDPYUQZEBZONVJAXCTRQXRGHCLPNAOMEAHMULYQBQQEZRBE",
"WUTXDWZRYSBHOEHBZSVCWIRXSAPAZFMZSJFHOGDTIAYOPAIKGUNGIOLEVFVO",
"NZUUNSQJEAXQAACZVEGHEHDNQRLDZRHXDJKCJLCXODFQQJTHGCMIRZDFAXBD",
"HFSHRQUTQONGFDTXKPPAGHEMJSHBLTWVQKZMKVGYYEDSTPBIRBTMHSRCUKUO",
"PGXXITTPEGARXGSHDTBVFYRVBXFHZBXPIQQNBQKJHEGXZGDTTCYGITFGSKBG",
"EFEDDOBGUVASHBTCYRCUZOXQTLUDMKMCEYFHDLETIFAUDPLYOZYQUPEBAXGC",
"DNYA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"ZQLSECAGXOUHNEFFBATFQIBYAYYDECSPKVHNGGJIPEGNSIUWNORASTNAUFYL"
]
}
This library is using crypto.dll
which is a C extension of Qubic key utility functions and bind it to Python. To build this crypto.dll
, this repository was used: https://github.com/serendipity-seeker/key-utils-binding.