API Reference¶
This section documents all the modules included in naturtag. Many of these are internal modules, and likely only relevant if you are interested in contributing to naturtag.
Main entry points¶
To use the core tagging features in your own code, the following functions and classes are the main entry points:
Get taxonomy tags from an iNaturalist observation or taxon, and write them to local image metadata. |
|
Refresh metadata for previously tagged images with latest observation and/or taxon data. |
Parses observation info and other higher-level details derived from raw image metadata |
Examples¶
Some basic examples:
from naturtag import tag_images, refresh_tags
# Tag images with full observation metadata
tag_images(['img1.jpg', 'img2.jpg'], observation_id=1234)
# Tag images with taxonomy metadata only
tag_images(['img1.jpg', 'img2.jpg'], taxon_id=1234)
# Glob patterns are also supported
tag_images(['~/observations/*.jpg'], taxon_id=1234)
# Refresh previously tagged images with latest observation and taxonomy metadata
refresh_tags(['~/observations/'], recursive=True)