tisdb.model package — tisdb 0.0.1.dev0 documentation

# tisdb.model package

## Subpackages

- tisdb.model.mysql package
  - Module contents

## Module contents

class tisdb.model.SaveResult(data: List[tisdb.model.TsdbData], subcode: Optional[int] = None, status: Optional[str] = None)

  Bases: `object`

  Result of the save function

  Args:

    data (List[TsdbData]): Tsdb data to save this time subcode (int): return subcode of this save result status (str): status of this save result

  property data

class tisdb.model.TsdbData(metric: str, ts: datetime.datetime = datetime.datetime(2021, 6, 2, 9, 6, 20, 566781), tags: tisdb.model.TsdbTags = {}, fields: tisdb.model.TsdbFields = {'value': 0})

  Bases: `object`

  Tsdb Data Value Object

  Args:

    metric (str): metric name ts (datetime): timestamp of this data tags (TsdbTags): tags of this data fields (TsdbFields): fields of this data

  get_value(field_name: str) → float
  property metric: str
  property tags: tisdb.model.TsdbTags
  property tags_uuid: str
  property ts: datetime.datetime
  property value_id: int

class tisdb.model.TsdbFields(*args, **kwargs)

  Bases: `sortedcontainers.sorteddict.SortedDict`

class tisdb.model.TsdbTags(*args, **kwargs)

  Bases: `sortedcontainers.sorteddict.SortedDict`