module documentation

FiftyOne operator utilities.

Copyright 2017-2025, Voxel51, Inc.

Class ProgressHandler A logging handler that reports all logging messages issued while the handler's context manager is active to the provided execution context's set_progress()...
Function is_method_overridden Returns whether a method is overridden in a subclass.
Function is_new Determines if a feature is considered "new" based on its release date.
def is_method_overridden(base_class, sub_class_instance, method_name): (source)

Returns whether a method is overridden in a subclass.

Parameters
base_classthe base class
sub_class_instancean instance of the subclass
method_namethe name of the method
Returns
True/False
def is_new(release_date, days=30): (source)

Determines if a feature is considered "new" based on its release date.

A feature is considered new if its release date is within the specified number of days.

Examples:

is_new("2024-11-09")
# True if today's date is within 30 days after 2024-11-09

is_new(datetime(2024, 11, 9), days=15)
# True if today's date is within 15 days after November 9, 2024

is_new("2024-10-01", days=45)
# False if today's date is more than 45 days after October 1, 2024
Parameters
release_date

the release date of the feature, in one of the following formats:

  • a string in the format "%Y-%m-%d", e.g., "2024-11-09"
  • a datetime instance
days:30the number of days for which the feature is considered new
Returns
True/False whether the release date is within the specified number of days