luigi.contrib.external_daily_snapshot module

class luigi.contrib.external_daily_snapshot.ExternalDailySnapshot(*args, **kwargs)[source]

Bases: luigi.task.ExternalTask

Abstract class containing a helper method to fetch the latest snapshot.

Example:

class MyTask(luigi.Task):
  def requires(self):
    return PlaylistContent.latest()

All tasks subclassing ExternalDailySnapshot must have a luigi.DateParameter named date.

You can also provide additional parameters to the class and also configure lookback size.

Example:

ServiceLogs.latest(service="radio", lookback=21)
date = DateParameter
classmethod latest(*args, **kwargs)[source]

This is cached so that requires() is deterministic.