talkytrend.main.TalkyTrend#

class talkytrend.main.TalkyTrend[source]#

Bases: object

TalkyTrend Main Class to interact with market news, financial instruments analysis and news and economics events.

Initialize the TalkyTrend class

Methods

continuous_stream()

Continuously fetches stream data and handles it.

fetch_feed()

Asynchronously retrieves the latest news from various sources based on the configured settings.

fetch_page()

Asynchronously scrapes a webpage and retrieves the content specified by the scraper_page_url and scraper_page_id attributes.

fetch_signal()

Asynchronously fetches the signal from Tradingview.

fetch_tv()

Asynchronously retrieves the URL for TV feed.

get_all_client_classes()

Retrieves all client classes from the myllm.provider module.

get_info()

Get information about the TalkyTrend version and clients.

get_news()

Asynchronously retrieves the latest news from various sources based on the configured settings.

get_stream()

Asynchronously streams data from the source using the configured settings.

get_tv()

Asynchronously retrieves the URL for TV feed.

monitor()

Asynchronously monitors the system and retrieves various data sources based on the configured settings.

scrape_page()

Asynchronously scrapes a webpage and retrieves the content specified by the scraper_page_url and scraper_page_id attributes.

get_all_client_classes()[source]#

Retrieves all client classes from the myllm.provider module.

This function imports the myllm.provider module and retrieves all the classes defined in it.

The function returns a dictionary where the keys are the names of the classes and the values are the corresponding class objects.

Returns:

A dictionary containing all the client classes from the myllm.provider module.

Return type:

dict

async get_info()[source]#

Get information about the TalkyTrend version and clients.

Returns:

A string containing the TalkyTrend version.

async monitor()[source]#

Asynchronously monitors the system and retrieves various data sources based on the configured settings. Cover Events, Feed, and Signal.

Returns:

A string containing the concatenated results

of the retrieved data sources.

Return type:

str

async fetch_signal()[source]#

Asynchronously fetches the signal from Tradingview.

Returns:

A string containing the concatenated results

of the retrieved signal.

Return type:

str

async fetch_feed()[source]#

Asynchronously retrieves the latest news from various sources based on the configured settings.

Returns:

A string containing the concatenated

results of the retrieved news sources.

Return type:

str

async fetch_page()[source]#

Asynchronously scrapes a webpage and retrieves the content specified by the scraper_page_url and scraper_page_id attributes.

Returns:

The content of the webpage as a string,

formatted using BeautifulSoup. If the scraper_page_id is not specified, the entire webpage is returned.

Return type:

str

async scrape_page()#

Asynchronously scrapes a webpage and retrieves the content specified by the scraper_page_url and scraper_page_id attributes.

Returns:

The content of the webpage as a string,

formatted using BeautifulSoup. If the scraper_page_id is not specified, the entire webpage is returned.

Return type:

str

async fetch_tv()[source]#

Asynchronously retrieves the URL for TV feed.

Returns:

An URL representing the live TV url if available, otherwise None.

Return type:

str

async get_tv()#

Asynchronously retrieves the URL for TV feed.

Returns:

An URL representing the live TV url if available, otherwise None.

Return type:

str

async get_news()[source]#

Asynchronously retrieves the latest news from various sources based on the configured settings.

Returns:

A string containing the concatenated

results of the retrieved news sources.

Return type:

str

async get_stream()[source]#

Asynchronously streams data from the source using the configured settings.

Returns:

A string containing the concatenated results

of the retrieved data sources.

Return type:

str

async continuous_stream()[source]#

Continuously fetches stream data and handles it.