Averager
Usage
Averager(
cache,
key,
expire=None,
tag=None,
)The total and count are updated together in one transaction, so every thread and process adding to it agrees. None while nothing has been added.
Methods
| Name | Description |
|---|---|
| add() |
Add value to the average.
|
| get() | The current average, or None if nothing has been added. |
| pop() | The current average, removing it. |
add()
Add value to the average.
Usage
add(value)get()
The current average, or None if nothing has been added.
Usage
get()pop()
The current average, removing it.
Usage
pop()