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 some of the features of naturtag in your own code, the following functions and classes are the main entry points:

tag_images

Get taxonomy tags from an iNaturalist observation or taxon, and write them to local image metadata.

refresh_tags

Refresh metadata for previously tagged images

MetaMetadata

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)

All Modules#