Skip to main content

IATI Format

Read IATI (International Aid Transparency Initiative) activity XML as one activity dict per record.

Overview​

PropertyValue
Format idiati
ClassIATIIterable
Extensions.iati, .iati.xml
ReadYes
WriteNo
Extraxml (lxml)
Maturityexperimental

Record shape​

Activities are flattened from XML: element text, @attr attributes, and nested children. Typical keys include iati-identifier and title.

Parameters​

ParameterDefaultDescription
tagnameiati-activityElement name to iterate

Streaming via lxml iterparse. Filename or stream supported.

Usage​

from iterable import open_iterable

with open_iterable("activities.iati.xml", format="iati") as source:
for activity in source:
print(activity["iati-identifier"], activity.get("title"))

Install with pip install iterabledata[xml].

Error Handling​

  • Missing dependency: optional libraries raise ImportError with an install hint (pip install 'iterabledata[<extra>]' when an extra exists).
  • Read-only: opening with mode="w" raises WriteNotSupportedError or ValueError.
  • Bad or unsupported input: may raise ValueError, OSError, or library-specific errors.
  • See Troubleshooting for decoding, detection, and engine issues.

See also​