Skip to main content

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()))

You must make sure JAVA_HOME is set to a JRE/JDK that's >=11. Do a echo $JAVA_HOME on Linux/MacOS or echo %JAVA_HOME% on Windows to confirm.

MacOS example:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-16.0.2.jdk/Contents/Home

Linux example:

export JAVA_HOME=/usr/lib/jvm/java-16-openjdk-amd64

Windows:

Type to search "advanced system", you should see "View Advanced System settings", click it, then click "Environment Variables..."

On Windows, if you get "no jvm dll found" error, you need to add %JAVA_HOME%/bin/server (i.e. C:\Program Files\Java\jdk-11.0.10\bin\server) to your path.

See examples for more example usages.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hedera-sdk-py-2.29.0.tar.gz (22.7 MB view hashes)

Uploaded Source

Built Distribution

hedera_sdk_py-2.29.0-py3-none-any.whl (22.7 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page