Ingest CLI
jq
to access and print each element’s ID, text, and originating file name:Ingest Python library
Open-source library
partition_via_api
function returns a list of elements (list[Element]
). For example:.text
provides the element’s text
field value as a str
. See Element example..metadata
provides the element’s metadata
field as an ElementMetadata
object. See Metadata..category
provides the element’s type
field value as a str
. See Element type..id
provides the element’s element_id
value as a str
. See Element ID..convert_coordinates_to_new_system()
converts the element’s location coordinates, if any, to a new coordinate system. See Element’s coordinates..to_dict()
gets the element’s content as a standard Python key-value dictionary (dict[str, Any]
).elements_to_dicts
method, for example:elements_to_json
function to convert the list of elements (Iterable[Element]
) into a JSON-formatted string and then print or save that string. For example: