Skip to main content

Official python lib for interacting with the Helium blockchain

Project description

helium-py logo

helium-py

Test

Versioning

This project follows semantic versioning. Prior to 1.0.0 this project does not guarantee a stable public API.

Modules

API

The API module classes provide client classes for interacting with the Helium APIs.

For full API specification and documentation please reference docs.helium.com.

from datetime import datetime, timedelta
from helium_py.api import ChainVariables, Hotspots

# Example of fetching chain variables
chain_vars = ChainVariables()  # Create a ChainVariables client
print(chain_vars.get_all())    # Get all chain variables

# Example of fetching hotspot earnings for the last five days
hotspot_address = "some_valid_hotspot_address"
hotspots = Hotspots()
hotspots.get_hotspot_rewards_total(hotspot_address, min_time=datetime.now() - timedelta(days=5))

Crypto

The Crypto module classes provide Address, Keypair, and Mnemonic classes as well as helpful utilities.

from helium_py.crypto.keypair import Keypair

# Example of creating a random keypair, accessing the address, and signing a message
keypair = Keypair.make_random()
address = keypair.address.b58  # B58 public key address
keypair.sign(b'message')  # Sign a message with keypair private key

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

helium-py-0.2a2.tar.gz (42.0 kB view hashes)

Uploaded Source

Built Distribution

helium_py-0.2a2-py3-none-any.whl (60.2 kB 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