Hedera SDK in Python
Project description
hedera-sdk-py
Hedera SDK in Python
This is basically a python wrapper of Hedera SDK in Java.
Install
pip install hedera-sdk-py
How to Use
from hedera import PrivateKey
prikey = PrivateKey.generate()
print("Private key: {}".format(prikey.toString()))
print("Public key: {}".format(prikey.getPublicKey().toString()))
see examples for more example usages.
How to Build
Hedera-sdk-py requires JDK >=11, either OpenJDK or Oracle JDK.
Clone this repo:
git clone --recurse-submodules https://github.com/wensheng/hedera-sdk-py.git
Patch Java code:
patch -p 1 -d hedera-sdk-java < patches/961b6dc9.patch
To insure patching success, check out the commit whose hash match the patch filename. For example:
cd hedera-sdk-java
git checkout 961b6dc9
cd ..
patch -p 1 -d hedera-sdk-java < patches/961b6dc9.patch
As of now (2021/4), the difference is very minimal, no java source code is changed, only build.gradle's are modified to ensure jar packaging. But in the future, java source code might be modified to provide convience for interacting with SDK in Python.
You can revert the patches:
cd hedera-sdk-java
git reset --hard
Build the Jar (make sure JAVA_HOME set to a JDK that's >=11):
cd hedera-sdk-java
./gradlew uberJar
Generate code (make sure tqdm is installed):
python scripts/generate_code.py
Build package:
rm -fr build dist
python -m build
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 hedera_sdk_py-2.0.5b9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4455529185d67bebc3e8df1bc4334a1d62bfc92fbef3bd80eef306c93544ddd |
|
MD5 | 286ef7cd283cb1625f93fb04f6c14635 |
|
BLAKE2b-256 | 50aa54cf9f6f9381fd9969eb0a5af070b29ca569dab36f680e324f409e094739 |