A Python library for XPR Network blockchain transactions.
Project description
Minimalist python library to interact with "XPR Network" blockchain also known as "XPR" or "XPRNetwork"
What is it?
xprpy is a python library to interact with XPR Network, an XPR Network.
Its main focus are server side applications.
This library is heavily influenced by µEOSIO and forked from FACINGS pyntelope. Many thanks to them for the astonishing job!
Main features
- Send transactions Its main usage today is to send transactions to the blockchain
- Statically typed This library enforces and verifies types and values.
- Serialization xprpy serializes the transaction before sending to the blockchain.
- Paralellization
Although python has the GIL we try to make as easier as possible to paralellize the jobs.
All data is as immutable and all functions are as pure as we can make them.
Stability
This work is in alpha version. That means that we make constant breaking changes to its api.
Using
How to Use the transfer.py
Function
The transfer.py
script allows you to transfer XPR tokens between accounts via the command line.
Command-Line Arguments
sender
: The account sending the XPR tokens.receiver
: The account receiving the XPR tokens.amount
: The amount of XPR to send (e.g., "55.0000 XPR").--memo
: (Optional) A memo to include with the transaction.--testnet
: (Optional) Use this flag to run the transaction on the XPR Testnet. If not provided, the transaction will be sent to the XPR Mainnet.
Example Usage
See the examples folder for transfer.py Use environment variables: XPRNETWORK_ACCOUNT=your_account XPRNETWORK_PRIVATE_KEY=your_private_key
-
Transfer on Mainnet:
To send 55.0000 XPR from the account
a.babyagi
topaul
on the XPR Mainnet with an optional memo:python transfer.py a.babyagi paul "55.0000 XPR" --memo "Mainnet transaction"
-
Transfer on Testnet:
To send 55.0000 XPR from the account
a.babyagi
topaul
on the XPR Testnet with an optional memo:python transfer.py a.babyagi paul "55.0000 XPR" --memo "Testnet transaction" --testnet
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
File details
Details for the file xprpy-1.0.0.tar.gz
.
File metadata
- Download URL: xprpy-1.0.0.tar.gz
- Upload date:
- Size: 54.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 736fc2af9f2636b9579c40d163e913aba97b52f906e830e4595e870ca294256c |
|
MD5 | 95c1ec3d40e12f47bca06b50cafe014e |
|
BLAKE2b-256 | 6eb3bcd6ad6ceaa59ee50e752d5a7dd820602aec32c595f80c8d8eee79a099a6 |
File details
Details for the file xprpy-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: xprpy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 58.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f3eef960ccc576365c30bd60ac18af9d8d6855618e102f0bd050ebea39c130b |
|
MD5 | 0cd4b3a9d13cf83a739eea10d5e12686 |
|
BLAKE2b-256 | 0fb88fadf529b3a405ddce4f0d2fe1a3278d1029507869e4e56a3aaf0cb04be8 |