tessa.symbol
Working with Symbols
The main class is tessa.symbol.symbol.Symbol
, which encapsulates all the information
and functionality around symbols. A tessa.symbol.symbolcollection.SymbolCollection
manages a collection of symbols including save and load functionality.
Example use:
from tessa import Symbol, SymbolCollection
s1 = Symbol("MSFT") # will use "yahoo" as the default source
s1.price_latest() # get latest price
sc = SymbolCollection([s1]) # create collection
sc.add(Symbol("ethereum", source="coingecko")) # add another symbol
sc.find_one("ethereum").price_graph(monthsback=600) # graph of 10 past yearss
sc.save_yaml("my_symbols.yaml") # save
tessa.symbol.extended_symbol.ExtendedSymbol
shows how the Symbol
class can be
extended.
1""" 2 3# Working with Symbols 4 5The main class is `tessa.symbol.symbol.Symbol`, which encapsulates all the information 6and functionality around symbols. A `tessa.symbol.symbolcollection.SymbolCollection` 7manages a collection of symbols including save and load functionality. 8 9Example use: 10 11```python 12from tessa import Symbol, SymbolCollection 13s1 = Symbol("MSFT") # will use "yahoo" as the default source 14s1.price_latest() # get latest price 15sc = SymbolCollection([s1]) # create collection 16sc.add(Symbol("ethereum", source="coingecko")) # add another symbol 17sc.find_one("ethereum").price_graph(monthsback=600) # graph of 10 past yearss 18sc.save_yaml("my_symbols.yaml") # save 19``` 20 21`tessa.symbol.extended_symbol.ExtendedSymbol` shows how the `Symbol` class can be 22extended. 23 24""" 25 26from .symbol import Symbol 27from .extended_symbol import ExtendedSymbol 28from .symbolcollection import SymbolCollection