This question already has an answer here:

I'm currently writing a thesis on a simulation of a peer to peer electricity market. The payments between the agents of the simulation would be settled through an Eth smart contract. I would like to run the simulation of the marketplace (supply/demand of agents, order book) in Python. I have zero experience coding smart contracts.

I was wondering if there was any way to invoke a smart contract using Python code. What I am envisioning is Python invoking a smart contract in an Ethereum test net which would keep track of how much Ethereum each agent has.


marked as duplicate by carver, Achala Dissanayake, Richard Horrocks, eth Aug 31 '18 at 6:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You can use web3.py to work with ethereum and smart contract similar to web3js


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