Closed BrennanWoodbury closed 3 months ago
You can convert the output of RecordListCommand to a list of dictionaries (each dictionary corresponding to a vault record) using the format='json'
kwarg value....something like the following:
import json
...
records_json = RecordListCommand().execute(params, format='json') # command output as JSON string
records_list = json.loads(records_json) # list of record dictionaries
I would like to see the output of vault records as a dictionary, like so:
{"uid": "xyz123", "title": "name", "description": "descriptor", "shared": True}
This would be useful as a means to grab UID or other fields programmatically, and pass it into another method for further processing.
I think this can be implemented by building out logic for the kwarg "format" to have an option "dict" through another if block in the RecordListCommand.execute() method.