trendminer.client module¶
- class trendminer.client.TrendMinerClient¶
Bases:
object
TrendminerClient handles requests to the Trendminer Services. User needs to provide token and basic configuration in order to retrieve a
Client
instance.- static from_token(token: str, url: str | None = None, tz: ~pytz.tzinfo.BaseTzInfo | None = <UTC>) Client ¶
Returns the TrendMiner client instance.
- Parameters:
token (str) – Token of a authenticated user
url (str, optional) – Url of the trendminer instance, default None
tz (str or BaseTzInfo, optional) – Timezone of the client, default utc
- Returns:
Client instance for navigating functionalities of the Trendminer SDK
- Return type:
Example
from trendminer import TrendMinerClient #When user is working from a TrendMiner environment client = TrendMinerClient.from_token('<oauth2_token>') #When user is working from an external environment, pass the URL client = TrendMinerClient.from_token(url='https://trendminer.yourcompany.com',token='<oauth2_token>')