blob: 8c93fc6fed0bc756778a6fed4d99ae0531efd973 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
Ordered dictionary
==================
[TimeStampedBuffer](/argaze/#argaze.DataStructures.TimeStampedBuffer) class inherits from [OrderedDict](https://docs.python.org/3/library/collections.html#collections.OrderedDict) as data are de facto ordered by time.
Any data type can be stored using int or float keys as timestamp.
```python
from argaze import DataStructures
# Create a timestamped data buffer
ts_data = DataStructures.TimeStampedBuffer()
# Store any data type using numeric keys
ts_data[0] = 123
ts_data[0.1] = "message"
ts_data[0.23] = {"key": value}
...
```
|