Objects

The utility classes for dankmemer.py.

class dankmemer.utils.Above(threshold)[source]

Represents a filter to match numeric fields above a given threshold.

Parameters:

threshold (int | float) – The value to use as a threshold.

Example

netValue = Above(10000)

class dankmemer.utils.Below(threshold)[source]

Represents a filter to match numeric fields below a given threshold.

Parameters:

threshold (int | float) – The value to use as a threshold.

Example

netValue = Below(100000)

class dankmemer.utils.Fuzzy(value, cutoff=80)[source]

Represents a fuzzy match criterion.

Parameters:
  • value (str) – The string value to match.

  • cutoff (int) – The minimum matching ratio (0-100) required for a successful fuzzy match. Defaults to 80.

Example

name = Fuzzy(“Melmsie”, cutoff=75)

class dankmemer.utils.IN(*patterns)[source]

Represents a filter for string membership.

Use this filter to check if a target string matches any of the provided patterns.

Parameters:

patterns (str) – The string / strings to match.

Example

name = IN(“Melmsie”, “Mel”)

class dankmemer.utils.Range(low, high)[source]

Represents a filter for numeric fields within an inclusive range.

Parameters:

threshold – The value to use as a threshold.

Example

netValue = Range(100, 100000)