Package: planetmint-abci
Py-ABCIBuild Tendermint blockchain applications in Python.  It's fun.  This library provides the core functionality needed to create Tendermint ABCI applications.Supported Tendermint VersionTendermint0.34.24ABCI0.17.0InstallationRequires Python >= 3.9pip install abciYou'll need a binary version of the Tendermint engine.
Available here:https://github.com/tendermint/tendermint/releasesMake sure the Tendermint version you download matches the current support version of this libraryQuick Start - demoA very simple demo application is included and available from the command line ascounter. You can find the code here:https://github.com/davebryson/py-abci/blob/master/src/example/counter.pyTo try it out:Make sure you have the Tendermint binary setup locally and in your path.  To test it's working
open a terminal window and type:>> tendermint versionIt should output your version of Tendermint that should match the currently supported version
of this library.Next, initialize Tendermint by running:>> tendermint initStart the Tendermint node:>> tendermint nodeThe node will start, but will be waiting for you application to start.Open another terminal, and start thecounterapplication. Thecounterwill be available
from within the Python environment where you installedabci>> counterYou'll see the application start, and in the Tendermint terminal, you'll see the output of
blocks being producedNow, open a 3rd terminal window to send some transaction to the blockchain.  To do this we'll
use thecurlapplication to send transaction to the local blockchain over http. For example:>> curl http://localhost:26657/broadcast_tx_commit?tx=0x01
>> curl http://localhost:26657/broadcast_tx_commit?tx=0x02The counter application expects you to sendtransactionsas numbers encoded as hex in order: 1,2,3...
It will reject and out-of-order numbers.  You can always see the latest accepted value by sending the
request:>> curl http://localhost:26657/abci_queryTo shut down the application enterCTRL-CGet StartedTo start building your own application:Extend theabci.application.BaseApplicationclassImplement the Tendermint ABCI callbacks - seehttps://docs.tendermint.com/v0.34/spec/abcifor details on how they workStart it:fromabci.serverimportABCIServerapp=ABCIServer(app=MyApplication())app.run()See thecounter.pyapplication in theexampledirectoryhttps://github.com/davebryson/py-abci/blob/master/src/example/counter.pyfor a full example.Developing on the code baseIf you're working directly on the code base.  Install a local editable version:pip install --editable '.[test]'Updating Protobuf codeYou should only re-generate the protobuf code if you're updating the associated protobuf files,
and/or contributing to this code base.  You do not need to rebuild protos to create apps.A note on protobuf:  The primary code directory isabci, but you'll notice additional
directories:gogoproto,tendermint, andprotos.Thegogoprotoandtendermintdirectories are the protobuf generated code used byabci. It adds proper Python modules and preserves all the import statements used by Tendermint for the various protobuf files spread
across their codebase.  Theprotosdirectory is the source .proto files.To (re)build the protobuf files:Installprotocso it's available in your PATH as a commandRunmake update-proto