Skip to content

Record

Record in a query

Source code in reduct/record.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@dataclass
class Record:
    """Record in a query"""

    timestamp: int
    """UNIX timestamp in microseconds"""
    size: int
    """size of data"""
    last: bool
    """last record in the query. Deprecated: doesn't work for some cases"""
    content_type: str
    """content type of data"""
    read_all: Callable[[None], Awaitable[bytes]]
    """read all data"""
    read: Callable[[int], AsyncIterator[bytes]]
    """read data in chunks"""

    labels: Dict[str, str]
    """labels of record"""

content_type: str instance-attribute

content type of data

labels: Dict[str, str] instance-attribute

labels of record

last: bool instance-attribute

last record in the query. Deprecated: doesn't work for some cases

read: Callable[[int], AsyncIterator[bytes]] instance-attribute

read data in chunks

read_all: Callable[[None], Awaitable[bytes]] instance-attribute

read all data

size: int instance-attribute

size of data

timestamp: int instance-attribute

UNIX timestamp in microseconds