Add `Symbol.tokens()` for grabbing separate strs

mkts_backup
Tyler Goodlet 2022-03-24 13:25:48 -04:00
parent 34635c21a9
commit 0676f3271c
1 changed files with 5 additions and 3 deletions

View File

@ -214,13 +214,15 @@ class Symbol(BaseModel):
self.key,
)
def front_fqsn(self) -> str:
def tokens(self) -> tuple[str]:
broker, key = self.front_feed()
if self.suffix:
tokens = (key, self.suffix, broker)
return (key, self.suffix, broker)
else:
tokens = (key, broker)
return (key, broker)
def front_fqsn(self) -> str:
tokens = self.tokens()
fqsn = '.'.join(tokens)
return fqsn