Python

Timed Key Value Structure

Key value structure that organizes a keys value chronologically

This program displays how to create a class in python, including class methods.

The class uses default dictionary library to initialize the values as a list so they can be put in order. The put method will append the desired key of the dictionary with a list of each value, time pair. This is important because this class requires chronological order which is obtainable using lists. The get method returns the most resent value, or if we pass a time get returns the value that was just before the time.

Example:

> python kv_store.py

> 1.1

> 1

> None