Skip to main content

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.

release python Python Package Code Quality license dependabot

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",
    "PGXXITTPEGARXGSHDTBVFYRVBXFHZBXPIQQNBQKJHEGXZGDTTCYGITFGSKBG",
    "EFEDDOBGUVASHBTCYRCUZOXQTLUDMKMCEYFHDLETIFAUDPLYOZYQUPEBAXGC",
    "DNYAQMGQRFCUMBUCEIFRNYSCYUXDWNWTTLFQQFDCEBVCTOWGLVXLCNBESPJE",
    "MSWZOKQKAWZUECKOEWOPMNUBSQSDAHTHYIFMSYRRKBZSJJLHLECBOUUDNNHO",
    "RGHPZOHWBHKIICUGBENRQPKDJHJDLIFKETGMKMPMTAJGRTPIOKCPETRDPBME",
    "CADVHWJMDNOJJGPDAVPYOUNDPWEABLSDLPGHCWJWGDFTYIVFBAZIBTDBQKVL",
    "AEMCJNNWDXBRSFEZVXAHFDPLNBJHMMMDBLKPVETCQFCZFJWEVEEXANUBUMCM",
    "BTOZFRHDVNYUVAMHNBBZJTNMCVZBORRPFNQIZZPRDEMHIFPWTFSARQVBMATC",
    "SHWFJGOAMBUIJDDSKCWAMOIWBNJHUUDHRDDHRBORSDCCSJLSSCDGXOKCVWMB",
    "XTOYTMZTUTPPVGBWYCVIFDVMLLWFIMXRZKOGUHJLADMIKLZTIPQJPLKCGVUB",
    "ZVBYCOZKUMZRTBIAYVWUTWUGYNQEPASOMENYCCERUDCYFHKMIQDLCVNCZCVA",
    "GHGNSBIOBLCIRGBBEKQZOSTKXJGHXWUYVNLRCTSBUENITLCSDIBNSDBBITQL",
    "PKFLHUYXWAELGGXBXTRRASNCQZSEDURLIUXKEDHTYFAIASIPPTSBVYMCQTWB",
    "OCOVEQIPGTUPIBAYGYDOSAWXWIGBKDBVKIFARQSHWAUUYSYVLKZITMZCMHCI",
    "NAPHRLGCLNNKVERLZDIGIFADQSLAZYUULTBAGCDYEEDSBFZGCCLXZXDGSBKK",
    "IGIZMDVOTFEJTFXHXURCUXNOSCDFJJJHTTTSRGABECNPKMJFZQTTEKOBSDFH",
    "OHEMQVDLSQLQQAVHTYOKFPZUOHIBNBWJITCHETOBUAAPWWFSYACPPSMEHSEE",
    "LPJMDKCKOOYGBFAEXDRZCALQUIIALWMHFSAEJUUBKBQXRPDYCXEXKMYDDJIO",
    "HGDFFPYTXOKSMGYMXPFEPLCQXXLDRULLJEIAYOVZBFABJIYZHVNSLRAENXUG",
    "ZQLSECAGXOUHNEFFBATFQIBYAYYDECSPKVHNGGJIPEGNSIUWNORASTNAUFYL"
  ]
}

Support Our Work (Donations)

Your Contribution Matters

QubiPy is developed and maintained by QubiPy Labs as a free, open-source project for the Qubic community.

Our dedication to providing high-quality tools is driven by passion, but maintaining and enhancing the library requires time, effort, and resources.

If you find QubiPy valuable and wish to support its continued development, any contribution is greatly appreciated.

Your donations help us cover operational costs, dedicate more time to new features, bug fixes, and comprehensive documentation, ensuring QubiPy remains a robust tool for everyone.

You can send your generous contributions to the following addresses:

  • QUBIC : CNSLISZCRHAVHADBQCZWVYAVTYXCVNQREGVVTWKBLHSJXFHRFEGNLORCHRSE
  • USDT (ETH, ARB, BSC or Polygon) : 0x453471Cc01868895b833841Ce7DbaE11fd9D1933

A huge thank you for being a part of the QubiPy journey!

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

qubipy-0.4.0.tar.gz (257.3 kB view details)

Uploaded Source

Built Distribution

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

QubiPy-0.4.0-py3-none-any.whl (259.1 kB view details)

Uploaded Python 3

File details

Details for the file qubipy-0.4.0.tar.gz.

File metadata

  • Download URL: qubipy-0.4.0.tar.gz
  • Upload date:
  • Size: 257.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for qubipy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 2ad3c9dfaafe5ef9ccf585047a8e17e1bfc9d78b9f9deb3344cab46cade81a31
MD5 91c2ee048fb8d3047f955b9490c626f2
BLAKE2b-256 ffdeeaaf1ef07e9c7f7a8c29c1c8cbac114ead8918847d4824d57f8273a8b5f6

See more details on using hashes here.

File details

Details for the file QubiPy-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: QubiPy-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 259.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for QubiPy-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48376a6bb406aa8070d3892c7cc869a82f7bdbcbeacfd45b774ae2550da0124b
MD5 ba790a1afa2108465cf4d89bc241a1c1
BLAKE2b-256 c7a1364bd39a4840feb8ce622b342ab309935c019b03c65e16538e101f65f69c

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