iroha-python
                                
                                 iroha-python copied to clipboard
                                
                                    iroha-python copied to clipboard
                            
                            
                            
                        Replace structures with methods in the Python API
The current approach of creating lots of objects is not very pythonic. It would be preferable, if instead we had a way of using dick-typing and methods + keyword arguments to set things up.
Example
As of today our example contains the following:
asset_definition = asset.Definition(
    "pyasset#python",
    asset.ValueType.Quantity(),
    asset.Mintable.Infinitely(),
)
In reality what we should have
asset_definition = asset.definition("pyasset#python", value_type = "q", mintable=True)
Where the method handles the conversion of the shorthand notation of "q" into Quantity, mintable=True into Mintable.Infinitely and not specifying them creates an asset with sensible defaults (which are Quantity and Mintable.Infinitely).
We can also treat the rust FromStr methods to do the conversion in place.