Skip to content

Conversation

@kylebarron
Copy link
Member

@kylebarron kylebarron commented Dec 3, 2025

We now support passing IFD and GeoKeyDirectory to dict() constructor.

Change list

  • Add methods: keys, __iter__, __getitem__ to the ImageFileDirectory and GeoKeyDirectory Python classes. This means that we now implement the Python "Mapping Protocol", so we can call dict(ifd) and dict(geo_key_dir).
  • Add method __eq__ onto ifd and geo key dir classes. This makes it easier to test the dict conversions because we can check actual equality of instances.

Closes #145

@github-actions github-actions bot added the feat label Dec 3, 2025
@kylebarron kylebarron merged commit d803d0f into main Dec 3, 2025
10 checks passed
@kylebarron kylebarron deleted the kyle/cast-ifd-gkd-to-dict branch December 3, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: Define dict conversion for IFD?

2 participants