1

I am thinking/trying to create payment system. Just to learn more about crypto. I would like to generate public and private key. And send(broadcast) payment into the eth network using python. How should I do it? Btw. Thanks for any help and info.

3

There's a few tools you can use, here are the links to help you get started:

Web3Py:

Pyethereum:

Main Ethereum Client (geth, can be plugged into via web3py):

1

I do something similar, but only need to use the Ethereum sparingly. so instead of learning these subpar python tools for interacting with the network, I just use javascript and then submit my javascript file in python with arguments passed.

Here's the basic program to call my 'Details.js' file in python:

from Naked.toolshed.shell import execute_js

def ex(file_path, arguments=""):
    try:
        if len(arguments) > 0:
            js_command = file_path + " " + arguments
        else:
            js_command = file_path
        return execute_js(js_command) # return result of execute() of node.js file
    except Exception as e:
        if DEBUG_FLAG:
             sys.stderr.write("Naked Framework Error: unable to run the shell command with the run_js() function (Naked.toolshed.shell.py).")
        raise e 
ex('Details.js',"0xc99CC3CeD3208A5637bdb52cD2aD03550A62F71C")

I like this way much better since its easier to find javascript examples of how to send Ether transactions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.