tm1filetools.files.text package¶
Classes representing different TM1 text file types.
tm1filetools.files.text.blb module¶
- class tm1filetools.files.text.blb.TM1BLBFile(path: Path)¶
Bases:
TM1TextFileA class representation of a tm1 BLB file
- suffix = 'blb'¶
tm1filetools.files.text.cfg module¶
tm1filetools.files.text.chore module¶
tm1filetools.files.text.cma module¶
- class tm1filetools.files.text.cma.TM1CMAFile(path: Path)¶
Bases:
TM1TextFileA class representation of a tm1 CMA file
TM1 creates files with a cma extension that are really csv files containing exports of cube data
- quote_character = '"'¶
- reader(dt: Optional[str] = None, el_filter: Optional[str] = None)¶
A generator that reads each line of the cma and yields every row matching the applied filters
- suffix = 'cma'¶
- class tm1filetools.files.text.cma.TM1CMARow(row)¶
Bases:
object
tm1filetools.files.text.log module¶
- class tm1filetools.files.text.log.TM1ChangeLogFile(path: Path)¶
Bases:
TM1LogFileA class representation of a tm1s log file
- delimiter = ','¶
- get_cubes(control: bool = False)¶
- get_users(control: bool = False)¶
- metadata_prefix = '#'¶
- quote = '"'¶
- reader(control: bool = False, cube: Optional[str] = None, user: Optional[str] = None, dt: Optional[str] = None)¶
A generator that reads each line of the log and yields every row matching the applied filters
- class tm1filetools.files.text.log.TM1ChangeLogRow(row)¶
Bases:
object
- class tm1filetools.files.text.log.TM1LogFile(path: Path)¶
Bases:
TM1TextFileA class representation of a tm1 log file
- suffix = 'log'¶
- class tm1filetools.files.text.log.TM1ProcessErorrLogFile(path: Path)¶
Bases:
TM1LogFileA class representation of a tm1s TI process error log file
- prefix = 'TM1ProcessError_'¶
tm1filetools.files.text.process module¶
- class tm1filetools.files.text.process.TM1ProcessFile(path: Path)¶
Bases:
TM1LinecodeFileA class representation of a tm1 TI process file. A TM1 .pro file
- get_data_code(rstrip=True) list[str]¶
Get a list of strings representing each line of code in the data tab
- Args:
rstrip: Strip whitespace from end of lines (default=True)
- Returns:
List of strings, one for each line in the data tab
- get_epilog_code(rstrip=True) list[str]¶
Get a list of strings representing each line of code in the epilog
- Args:
rstrip: Strip whitespace from end of lines (default=True)
- Returns:
List of strings, one for each line in the epilog
- get_metadata_code(rstrip=True) list[str]¶
Get a list of strings representing each line of code in the metadata tab
- Args:
rstrip: Strip whitespace from end of lines (default=True)
- Returns:
List of strings, one for each line in the metadata tab
- get_prolog_code(rstrip=True) list[str]¶
Get a list of strings representing each line of code in the prolog
- Args:
rstrip: Strip whitespace from end of lines (default=True)
- Returns:
List of strings, one for each line in the prolog
- suffix = 'pro'¶
tm1filetools.files.text.rules module¶
tm1filetools.files.text.subset module¶
- class tm1filetools.files.text.subset.TM1SubsetFile(path: Path, public: bool = True)¶
Bases:
TM1UserFile,TM1LinecodeFileA class representation of a tm1 subset file
- folder_suffix = '}subs'¶
- get_elements()¶
Returns a list of the elements in a static subset
Returns None if the subset is dynamic
- is_dynamic() bool¶
- suffix = 'sub'¶
tm1filetools.files.text.text module¶
tm1filetools.files.text.user_owned module¶
- class tm1filetools.files.text.user_owned.TM1UserFile(path: Path, public: bool = True)¶
Bases:
TM1TextFileA base class for files that get created (and may be owned) by users That is, views and subsets. You probably don’t want to instantiate this class, use view or subset instead
- move_to_public() None¶
tm1filetools.files.text.view module¶
- class tm1filetools.files.text.view.TM1ViewFile(path: Path, public: bool = True)¶
Bases:
TM1UserFile,TM1LinecodeFileA class representation of a tm1 view file
- folder_suffix = '}vues'¶
- suffix = 'vue'¶