`query_metadata` retrieves a metadata associated with the given key stored in the current BinaryView. :param str key: key to query :rtype: metadata associated with the key :Example: >>> bv.store_metadata("integer", 1337) >>> bv.query_metadata("integer") 1337L >>> bv.store_meta
(self, key: str)
| 9731 | core.BNApplyDebugInfo(self.handle, value.handle) |
| 9732 | |
| 9733 | def query_metadata(self, key: str) -> 'metadata.MetadataValueType': |
| 9734 | """ |
| 9735 | `query_metadata` retrieves a metadata associated with the given key stored in the current BinaryView. |
| 9736 | |
| 9737 | :param str key: key to query |
| 9738 | :rtype: metadata associated with the key |
| 9739 | :Example: |
| 9740 | |
| 9741 | >>> bv.store_metadata("integer", 1337) |
| 9742 | >>> bv.query_metadata("integer") |
| 9743 | 1337L |
| 9744 | >>> bv.store_metadata("list", [1,2,3]) |
| 9745 | >>> bv.query_metadata("list") |
| 9746 | [1L, 2L, 3L] |
| 9747 | >>> bv.store_metadata("string", "my_data") |
| 9748 | >>> bv.query_metadata("string") |
| 9749 | 'my_data' |
| 9750 | """ |
| 9751 | md_handle = core.BNBinaryViewQueryMetadata(self.handle, key) |
| 9752 | if md_handle is None: |
| 9753 | raise KeyError(key) |
| 9754 | return metadata.Metadata(handle=md_handle).value |
| 9755 | |
| 9756 | def store_metadata(self, key: str, md: metadata.MetadataValueType, isAuto: bool = False) -> None: |
| 9757 | """ |