Interact with XPR Network blockchain
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.1.tar.gz
.
File metadata
- Download URL: xprpy-1.0.1.tar.gz
- Upload date:
- Size: 18.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 | 29ad5d8f17aafcbed452bd69cf45d64acbbd373d7a4552f04bb44ac1823a0ed6 |
|
MD5 | d8014baf90493c4cee425ecec4fa24ea |
|
BLAKE2b-256 | 302122d48f3f71d561fd5ae75d31c3c979b600d8665fc640d2ea6b105e14fc4f |
File details
Details for the file xprpy-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: xprpy-1.0.1-py3-none-any.whl
- Upload date:
- Size: 20.2 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 | a7fce332638a471cbef3462debf34481667e6662e85126740fb231f03332a733 |
|
MD5 | 633a8deb9bc2176c06c7e639e78e9473 |
|
BLAKE2b-256 | c978a87f1921b9d19a981a42a21d143f4510d8cac8d7bf6e71a434797ccc0517 |