High-level wrapper for working with cryptocurrencies of the NEM ecosystem
Project description
NEMpy
High-level python wrapper for working with cryptocurrencies of the NEM ecosystem
Implemented on the basis symbol project core sdk python library
Possibilities
- Creating a wallet with profiles and accounts. Importing account by mnemonic.
- Using a wallet to send funds, view activity history and balance
- Blockchain monitoring via websocket
- Ability to use all the above in third-party products and services
Getting Started
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
Prerequisites
For convenient work with the project, you will need pipenv tool.
pip install pipenv
Installing
Install and update using pip:
pip install nempy
A Simple Example
Attention!
The example below is intended to demonstrate 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
Command-line interface (CLI)
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
Running CLI utility
pipenv run nempy-cli.py
For development
To set up development in a virtual environment. Follow the previous steps then:
pipenv run pip inasall -e .
Testing
Follow the previous steps to set up your environment.
Running tests pipenv run tests
or pipenv run tests --cov=src
to assess coverage
Version Numbers
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.
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
Hashes for nem_py-0.0.5.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3015d232b5671dd90d186f29b50e6d4f1d3ae2a1187e0b95a31e0e432aee8c06 |
|
MD5 | a98c29ee1ebbd19e78d0ff450d699da8 |
|
BLAKE2b-256 | 8b69331216578d90fde27bc5d6eb28d5535ee269da9934f728dc5d5aae7cb261 |