blob: 64dd899c4570122573c22daf6697bd3664329fd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
Ordered dictionary
==================
[TimeStampedBuffer](../../argaze.md/#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}
...
```
|