prai 🙏
===========
Raiblocks Python RPC client
Install
-------
A somewhat stable version from pypi:
.. code-block:: bash
$ pip install prai
Or the most recent master version from Github:
.. code-block:: bash
$ git clone https://github.com/jxub/prai
Usage
-----
.. code-block:: Python
>>> from prai import Wallet, Account
# creating a wallet with the rai node url
>>> w = Wallet(http://localhost:7475)
>>> w.account_list()
{
"accounts" : [
]
}
>>> w.accounts_create(count=2)
{
"accounts": [
"xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000",
"xrb_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3s00000000"
]
}
>>> w.account_balance("xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000")
{
"balance": "10000",
"pending": "10000"
}
# using unpacking to pass in the params with *
>>> w.send(*w.account_list()['accounts'], 10000)
{
"block": "000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F"
}
# query the same account as before
>>> w.account_balance("xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000")
{
"balance": "0",
"pending": "0"
}
Some notes
----------
Prai is a work in progress, so expect some rough edges and stay tuned for updates 🙈.
Roadmap
-------
- Finish basic API.
- Add some higher-level features, for example a simple e-commerce payment API.
- Add more validation and tests (ughhh).
- Add hashing of Rai addrsses to shorter to be better for end-user (??!)
🍻
Metadata
Release files for prai 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| prai-1.0.0.tar.gz | 3.8 kB | Without provenance | Details for prai-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prai-1.0.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for prai-1.0.0-py2.py3-none-any.whl |
Total release size: 7.4 kB
Release files / prai-1.0.0.tar.gz
| Download URL | prai-1.0.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27d37db27ebf0fc0eff05512d7484350dbd7a6458876cae3b3b7ab63f3d1884d
|
|
BLAKE2b-256 checksum How to use checksums |
cad72b77010383ba81fa08aafceceac607bc0531ec380917ef33e0f244202763
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / prai-1.0.0-py2.py3-none-any.whl
| Download URL | prai-1.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8cb1dab28d7c4fdae6d70e1e37bb08a7e66e5147dab6ed7f2b2485f94a915f3f
|
|
BLAKE2b-256 checksum How to use checksums |
e4ea423198b732e83fc750f108d8a7002da5dd1f6b35bfdc31be208aa1884d39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for prai 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.