High-level python wrapper for working with NEM cryptocurrencies ecosystem (only Symbol supported)
Implemented on the basis symbol project core sdk python library
- Creating a wallet with profiles and accounts. Importing account by mnemonic.
- Using a wallet to send funds, message (plain/encrypted), view activity history and balance
- Blockchain monitoring via websocket
- Ability to use all the above in third-party products and services
This is an example of how you can set up your project locally. For up and running the wrapper locally please follow the next simple example steps.
To work with the project, you will need pipenv tool.
pip install pipenv
Install and update using pip:
pip install nem-py
Attention!
The example below is intended to demonstrate the ease of use, but it is not secure! Use this code only on the NetworkType.TEST_NET
from nempy.user_data import AccountData
from nempy.engine import XYMEngine
from nempy.sym.network import NetworkType
from nempy.sym.constants import Fees
PRIVATE_KEY = '<YOUR_PRIVATE_KEY>'
PASSWORD = '<YOUR_PASS>'
account = AccountData.create(PRIVATE_KEY, NetworkType.TEST_NET).encrypt(PASSWORD)
engine = XYMEngine(account)
entity_hash, status = engine.send_tokens(recipient_address='TDPFLBK4NSCKUBGAZDWQWCUFNJOJB33Y5R5AWPQ',
mosaics=[('@symbol.xym', 0.1), ],
message='Hallo NEM!',
password=PASSWORD,
fee_type=Fees.SLOWEST)
print(status.name, status.value)
You can get funds for the balance for testing in the Faucet.
Additional documentation can be found here
You can get acquainted with the capabilities of the CLI interface here
Working with pipenv environment
- Clone the repository
git clone https://github.com/denjas/nempy.git
- Go to the directory with the project
cd nempy
- Install virtualenv package
pip install pipenv
- Setting up a virtual environment
pipenv install --dev
- Installing a nem-py package into the environment
pipenv run pip install .
orpipenv run pip install -e .
for development mode.
pipenv run nempy-cli.py
Follow the previous steps to set up your environment.
Running tests pipenv run tests
or pipenv run tests --cov=nempy
to assess coverage
Version numbers will be assigned according to the Semantic Versioning scheme. This means, given a version number MAJOR.MINOR.PATCH, we will increment the:
- MAJOR version when we make incompatible API changes,
- MINOR version when we add functionality in a backwards compatible manner, and
- PATCH version when we make backwards compatible bug fixes.