tbapi.api.series
1from __future__ import annotations 2from typing import TYPE_CHECKING 3from tbapi.common.decorators import tb_class, tb_interface 4from tbapi.common.converters import to_python_datetime, to_net_datetime 5from datetime import datetime 6from Tickblaze.Scripts.Api import Series as _Series 7from typing import Any, overload 8from abc import ABC, abstractmethod 9from tbapi.api.interfaces.iseries import ISeries 10 11@tb_class(_Series) 12class Series(ISeries): 13 """Represents a series of values of type . Provides methods to append, access, and enumerate over the values in the series. The type of the values in the series.""" 14 15 @overload 16 @staticmethod 17 def new() -> "Series": 18 """Constructor overload with arguments: """ 19 ... 20 @overload 21 @staticmethod 22 def new(defaultValue: Any) -> "Series": 23 """Constructor overload with arguments: defaultValue""" 24 ... 25 @staticmethod 26 def new(*args, **kwargs): 27 """Generic factory method for Series. Use overloads for IDE type hints.""" 28 return Series(*args, **kwargs) 29 30 @property 31 def count(self) -> int: 32 """Gets the count of values in the series.""" 33 val = self._value.Count 34 return val 35 36 def get_enumerator(self) -> IEnumerator: 37 """Gets an enumerator for the series values. An enumerator for the series values.""" 38 result = self._value.GetEnumerator() 39 return result 40 41 42 43 def __getitem__(self, index: int) -> Any: 44 result = self._value[index] 45 return result 46 47 def __setitem__(self, index: int, value: Any): 48 tmp = value 49 self._value[index] = tmp
19@tb_class(_Series) 20class Series(ISeries): 21 """Represents a series of values of type . Provides methods to append, access, and enumerate over the values in the series. The type of the values in the series.""" 22 23 @overload 24 @staticmethod 25 def new() -> "Series": 26 """Constructor overload with arguments: """ 27 ... 28 @overload 29 @staticmethod 30 def new(defaultValue: Any) -> "Series": 31 """Constructor overload with arguments: defaultValue""" 32 ... 33 @staticmethod 34 def new(*args, **kwargs): 35 """Generic factory method for Series. Use overloads for IDE type hints.""" 36 return Series(*args, **kwargs) 37 38 @property 39 def count(self) -> int: 40 """Gets the count of values in the series.""" 41 val = self._value.Count 42 return val 43 44 def get_enumerator(self) -> IEnumerator: 45 """Gets an enumerator for the series values. An enumerator for the series values.""" 46 result = self._value.GetEnumerator() 47 return result 48 49 50 51 def __getitem__(self, index: int) -> Any: 52 result = self._value[index] 53 return result 54 55 def __setitem__(self, index: int, value: Any): 56 tmp = value 57 self._value[index] = tmp
Represents a series of values of type . Provides methods to append, access, and enumerate over the values in the series. The type of the values in the series.
@staticmethod
def
new(*args, **kwargs):
33 @staticmethod 34 def new(*args, **kwargs): 35 """Generic factory method for Series. Use overloads for IDE type hints.""" 36 return Series(*args, **kwargs)
Generic factory method for Series. Use overloads for IDE type hints.
count: int
38 @property 39 def count(self) -> int: 40 """Gets the count of values in the series.""" 41 val = self._value.Count 42 return val
Gets the count of values in the series.
def
get_enumerator(self) -> 'IEnumerator':
44 def get_enumerator(self) -> IEnumerator: 45 """Gets an enumerator for the series values. An enumerator for the series values.""" 46 result = self._value.GetEnumerator() 47 return result
Gets an enumerator for the series values. An enumerator for the series values.