QubiPy, a Python Library for the QUBIC RPC API
Project description
QubiPy, a Python Library for the QUBIC RPC API
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.
Important notice
QubiPy is in beta phase and may change considerably until the stable version. Keep this in mind when using the library.
Documentation
To learn more about QubiPy and its complete use, please visit our official documentation.
Requirements
To install the necessary dependencies, run this command in the console :
$ pip install -r requirements.txt
How to use
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",
"PGXXITTPEGARXGSHDTBVFYRVBXFHZBXPIQQNBQKJHEGXZGDTTCYGITFGSKB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MYDDJIO",
"HGDFFPYTXOKSMGYMXPFEPLCQXXLDRULLJEIAYOVZBFABJIYZHVNSLRAENXUG",
"ZQLSECAGXOUHNEFFBATFQIBYAYYDECSPKVHNGGJIPEGNSIUWNORASTNAUFYL"
]
}
Technical notes
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.
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
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 qubipy-0.2.5.tar.gz.
File metadata
- Download URL: qubipy-0.2.5.tar.gz
- Upload date:
- Size: 253.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c3637baec3e0839d6a60651c75426331c3e365ba2d8479fc79d113f3a8041bd
|
|
| MD5 |
ea0f44bb2798dda506eec05e9e7c7a57
|
|
| BLAKE2b-256 |
680d7dfcc4e53c01582ab816b00b0298117b01b10c47119683fbde9341d136d8
|
File details
Details for the file QubiPy-0.2.5-py3-none-any.whl.
File metadata
- Download URL: QubiPy-0.2.5-py3-none-any.whl
- Upload date:
- Size: 255.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7b2d16f5e73998a8ed7034d909e2bdddf447b044357b327f1152c6445d9e06b
|
|
| MD5 |
8ee3292166c9c19328cd05ea961cabbe
|
|
| BLAKE2b-256 |
04ac3f97c50c180e6c48c8b41ae7dc2454ee6666cc6a6930c442b40c03714d38
|