polkascan / py-substrate-interface

Python Substrate Interface
https://polkascan.github.io/py-substrate-interface/
Apache License 2.0
241 stars 115 forks source link

Add multi query documentation #332

Closed gabrieljaegerde closed 1 year ago

gabrieljaegerde commented 1 year ago

There are currently examples for querying a single storage entry as well as querying all entries but there is no documentation on how to query the identities of 2 wallets together in one query for example.

I would assume this is currently possible (with query_map?) and an example in the docs would be much appreciated.

arjanz commented 1 year ago

Currently this isn't possible yet unfortunately, the query_map() is currently only retrieving all storage keys for provided storage function. But this wouldn't be much work to implement a new query_multi() function, that accepts a list of StorageKey objects, like the way subscibe_storage() works now.

I'll create and a PR later for this.

gabrieljaegerde commented 1 year ago

Perfect. 😄

arjanz commented 1 year ago

Released: https://github.com/polkascan/py-substrate-interface/releases/tag/v1.6.2

gabrieljaegerde commented 1 year ago

Thank you! 😄