Entry Point Classes

The Bigdata class is the main entry point for interacting with the Bigdata API. You typically create a Bigdata object, providing the credentials, and then use it to interact with the API, through one of its four proxy objects, or other objects created form them:

from bigdata_client import Bigdata

# Providing the credentials directly:
bigdata = Bigdata('username', 'password')
# Or using the environment variables BIGDATA_USERNAME and BIGDATA_PASSWORD:
bigdata = Bigdata()

bigdata.knowledge_graph # methods for interacting with the Bigdata domain
bigdata.search  # methods for searching
bigdata.watchlists      # methods for interacting with watchlists
bigdata.uploads         # methods for managing internal content

Examples

Some examples on how to use the Bigdata class and its proxy objects:

Watchlists:

bigdata.watchlists.create("My new watchlist")
bigdata.watchlists.list()
bigdata.watchlists.get(watchlist_id)
bigdata.watchlists.delete(watchlist_id)

Internal Content:

bigdata.uploads.upload_file(filename)
bigdata.uploads.list()
bigdata.uploads.get(file.id)
bigdata.uploads.delete(file.id)

class Bigdata[source]

Represents a connection to RavenPack’s Bigdata API.

Variables:
  • knowledge_graph – Proxy for the knowledge graph search functionality.

  • search – Proxy object for the content search functionality.

  • watchlists – Proxy object for the watchlist functionality.

  • uploads – Proxy object for the internal content functionality.

  • subscription – Proxy object for the subscription functionality.

__init__(username=None, password=None, *, bigdata_api_url=None, bigdata_ws_url=None, upload_api_url=None, proxy=None, verify_ssl=True)[source]
Parameters:
  • username (str | None) –

  • password (str | None) –

  • bigdata_api_url (str | None) –

  • bigdata_ws_url (str | None) –

  • upload_api_url (str | None) –

  • proxy (Proxy | None) –

  • verify_ssl (bool | str) –


class KnowledgeGraph[source]

For finding entities, sources and topics

__init__(api_connection)[source]
Parameters:

api_connection (BigdataConnectionProtocol) –

autosuggest(values: list[str], /, limit: int = 20) dict[str, list[MacroEntity | Etf | Company | Facility | Landmark | Organization | OrganizationType | Person | Place | Product | ProductType | Source | Topic | Language | AutosuggestedSavedSearch | Watchlist | Concept]][source]
autosuggest(value: str, /, limit: int = 20) list[MacroEntity | Etf | Company | Facility | Landmark | Organization | OrganizationType | Person | Place | Product | ProductType | Source | Topic | Language | AutosuggestedSavedSearch | Watchlist | Concept]

Searches for entities, sources, topics, searches and watchlists

Overloaded method

  • Implementation 1

    Args:

    values: Searched item (str)

    limit: Upper limit for each result

    Returns:

    List of results.

  • Implementation 2: DEPRECATED

    Args:

    values: Searched items (list[str])

    limit: Upper limit for each result

    Returns:

    Dict with the searched terms as keys each with a list of results.

find_companies(values: list[str], /, limit=20) dict[str, list[Company]][source]
find_companies(values: str, /, limit=20) list[Company]

Searches for values in the Knowledge Graph and filters out anything that is not a company.

Overloaded method

  • Implementation 1

    Args:

    values: Searched item (str)

    limit: Upper limit for each result before applying the filter

    Returns:

    List of results.

  • Implementation 2: DEPRECATED

    Args:

    values: Searched items (list[str])

    limit: Upper limit for each result before applying the filter

    Returns:

    Dict with the searched terms as keys each with a list of results.

find_concepts(values: list[str], /, limit=20) dict[str, list[Concept]][source]
find_concepts(values: str, /, limit=20) list[Concept]

Searches for values in the Knowledge Graph and filters out anything that is not a concept.

Overloaded method

  • Implementation 1

    Args:

    values: Searched item (str)

    limit: Upper limit for each result before applying the filter

    Returns:

    List of results.

  • Implementation 2: DEPRECATED

    Args:

    values: Searched items (list[str])

    limit: Upper limit for each result before applying the filter

    Returns:

    Dict with the searched terms as keys each with a list of results.

find_etfs(value, /, limit=20)[source]

Searches for value in the Knowledge Graph and filters out anything that is not a ETF.

Args:

value: Searched item (str)

limit: Upper limit for each result before applying the filter

Returns:

List of results.

Parameters:

value (str) –

find_organizations(values: list[str], /, limit=20) dict[str, list[Organization]][source]
find_organizations(values: str, /, limit=20) list[Organization]

Searches for values in the Knowledge Graph and filters out anything that is not an organization.

Overloaded method

  • Implementation 1

    Args:

    values: Searched item (str)

    limit: Upper limit for each result before applying the filter

    Returns:

    List of results.

  • Implementation 2: DEPRECATED

    Args:

    values: Searched items (list[str])

    limit: Upper limit for each result before applying the filter

    Returns:

    Dict with the searched terms as keys each with a list of results.

find_people(values: list[str], /, limit=20)[source]
find_people(values: str, /, limit=20) list[Person]

Searches for values in the Knowledge Graph and filters out anything that is not a person.

Overloaded method

  • Implementation 1

    Args:

    values: Searched item (str)

    limit: Upper limit for each result before applying the filter

    Returns:

    List of results.

  • Implementation 2: DEPRECATED

    Args:

    values: Searched items (list[str])

    limit: Upper limit for each result before applying the filter

    Returns:

    Dict with the searched terms as keys each with a list of results.

find_places(values: list[str], /, limit=20) dict[str, list[Place]][source]
find_places(values: str, /, limit=20) list[Place]

Searches for values in the Knowledge Graph and filters out anything that is not a place.

Overloaded method

  • Implementation 1

    Args:

    values: Searched item (str)

    limit: Upper limit for each result before applying the filter

    Returns:

    List of results.

  • Implementation 2: DEPRECATED

    Args:

    values: Searched items (list[str])

    limit: Upper limit for each result before applying the filter

    Returns:

    Dict with the searched terms as keys each with a list of results.

find_products(values: list[str], /, limit=20) dict[str, list[Product]][source]
find_products(values: str, /, limit=20) list[Product]

Searches for values in the Knowledge Graph and filters out anything that is not a product.

Overloaded method

  • Implementation 1

    Args:

    values: Searched item (str)

    limit: Upper limit for each result before applying the filter

    Returns:

    List of results.

  • Implementation 2: DEPRECATED

    Args:

    values: Searched items (list[str])

    limit: Upper limit for each result before applying the filter

    Returns:

    Dict with the searched terms as keys each with a list of results.

find_sources(values: list[str], /, limit=20) dict[str, list[Source]][source]
find_sources(values: str, /, limit=20) list[Source]

Searches for values in the Knowledge Graph and filters out anything that is not a source.

Overloaded method

  • Implementation 1

    Args:

    values: Searched item (str)

    limit: Upper limit for each result before applying the filter

    Returns:

    List of results.

  • Implementation 2: DEPRECATED

    Args:

    values: Searched items (list[str])

    limit: Upper limit for each result before applying the filter

    Returns:

    Dict with the searched terms as keys each with a list of results.

find_topics(values: list[str], /, limit=20) dict[str, list[Topic]][source]
find_topics(value: str, /, limit=20) list[Topic]

Searches for values in the Knowledge Graph and filters out anything that is not a topic.

Overloaded method

  • Implementation 1

    Args:

    values: Searched item (str)

    limit: Upper limit for each result before applying the filter

    Returns:

    List of results.

  • Implementation 2: DEPRECATED

    Args:

    values: Searched items (list[str])

    limit: Upper limit for each result before applying the filter

    Returns:

    Dict with the searched terms as keys each with a list of results.

get_companies_by_cusip(cusips)[source]

Retrieve a list of companies by their CUSIP

Parameters:

cusips (list[str]) – CUSIP list

Returns:

List of companies in the same order as original @cusip list, or None if was not found

Return type:

list[Optional[Company]]

get_companies_by_isin(isins)[source]

Retrieve a list of companies by their ISIN

Parameters:

isins (list[str]) – ISIN list

Returns:

List of companies in the same order as original @isin list, or None if was not found

Return type:

list[Optional[Company]]

get_companies_by_listing(listings)[source]

Retrieve a list of companies by their listing

Parameters:

listings (list[str]) – listing list

Returns:

List of companies in the same order as original @listing list, or None if was not found

Return type:

list[Optional[Company]]

get_companies_by_sedol(sedols)[source]

Retrieve a list of companies by their SEDOL

Parameters:

sedols (list[str]) – SEDOL list

Returns:

List of companies in the same order as original @sedol list, or None if was not found

Return type:

list[Optional[Company]]

get_entities(ids, /)[source]

Retrieve a list of entities by their ids.

Parameters:

ids (list[str]) –

Return type:

list[Etf | Company | Facility | Landmark | Organization | OrganizationType | Person | Place | Product | ProductType | Concept | None]

get_languages(ids, /)[source]

Retrieve a list of languages by its ids.

Parameters:

ids (list[str]) –

Return type:

list[Language | None]

get_sources(ids, /)[source]

Retrieve a list of sources by its ids.

Parameters:

ids (list[str]) –

Return type:

list[Source | None]

get_topics(ids, /)[source]

Retrieve a list of topics by its ids.

Parameters:

ids (list[str]) –

Return type:

list[Topic | None]


class ContentSearch[source]
__init__(api_connection)[source]
Parameters:

api_connection (BigdataConnection) –

delete(id_, /)[source]

Delete a saved search by its id.

get(id_, /)[source]

Retrieve a saved search by its id.

Return type:

Search

list()[source]

Retrieve all saved searches for the current user.

Return type:

list[Search]

new(query, date_range=None, sortby=SortBy.RELEVANCE, scope=DocumentType.ALL, rerank_threshold=None)[source]

Creates a new search object that allows you to perform a search on keywords, entities, etc.

Example usage:

>>> query = Entity("228D42") & Keyword("tesla")  
>>> search = bigdata.search.new(
...    query,
...    date_range=RollingDateRange.LAST_WEEK,
...    sortby=SortBy.RELEVANCE,
...    scope=DocumentType.ALL
... )                               
>>> search.save()                   
>>> for document in search.limit_documents(100): 
>>>     print(document)                
>>> print(search.get_summary())     
>>> search.delete()                 
Parameters:
Return type:

Search


class Watchlists[source]

For finding, iterating and doing operations with watchlist objects

__init__(api_connection)[source]
Parameters:

api_connection (BigdataConnectionProtocol) –

create(name, items)[source]

Creates a new watchlist in the system.

Parameters:
  • name (str) –

  • items (List[str]) –

Return type:

Watchlist

delete(id_, /)[source]

Delete a watchlist by its id.

Parameters:

id_ (str) –

Return type:

str

get(id_, /)[source]

Retrieve a watchlist by its id.

Parameters:

id_ (str) –

Return type:

Watchlist

list(owned=False)[source]

Retrieve all watchlist objects for the current user.

Parameters:

owned (bool) –

Return type:

list[Watchlist]

share_with_company(id_)[source]

Share a watchlist with the whole company.

Parameters:

id_ (str) –

unshare_with_company(id_)[source]

Stop sharing a watchlist with the company

Parameters:

id_ (str) –

update(id_, /, name=None, items=None)[source]

Update a watchlist by its id.

Parameters:

id_ (str) –

Return type:

Watchlist


class Uploads[source]

For managing internal uploads. Searching will be done through content

__init__(uploads_api)[source]
Parameters:

uploads_api (UploadsConnection) –

delete(id_, /)[source]

Delete a file by its id. The file must be fully processed before deleting.

get(id_, /)[source]

Retrieve a file by its id.

Return type:

File

list(start_date=None, end_date=None, tags=None, status=None, file_name=None, folder_id=None, page_size=5000, page_number=1)[source]

Retrieve all documents for the current user.

Parameters:
  • start_date (datetime | str | None) –

  • end_date (datetime | str | None) –

  • tags (list[str] | None) –

  • status (FileStatus | None) –

  • file_name (str | None) –

  • folder_id (str | None) –

  • page_size (int) –

  • page_number (int) –

Return type:

list[File] | tuple[list[File], int]

list_my_tags()[source]

List all tags set by the current user.

Return type:

List[str]

list_shared(start_date=None, end_date=None, tags=None, status=None, file_name=None, folder_id=None, page_size=5000, page_number=1)[source]

Retrieve all documents shared with the user that do not belong to them.

Parameters:
  • start_date (datetime | str | None) –

  • end_date (datetime | str | None) –

  • tags (List[str] | None) –

  • status (FileStatus | None) –

  • file_name (str | None) –

  • folder_id (str | None) –

  • page_size (int) –

  • page_number (int) –

Return type:

List[File] | tuple[List[File], int]

list_tags_shared_with_me()[source]

List all tags shared with the current user.

Return type:

List[str]

share_with_company(id_)[source]

Share with own company

Parameters:

id_ (str) –

unshare_with_company(id_)[source]

Stop sharing with own company

Parameters:

id_ (str) –

upload_from_disk(path, /, provider_document_id=None, provider_date_utc=None, primary_entity=None, skip_metadata=None)[source]

Uploads a file to the bigdata platform.

Parameters:
  • path (str) –

  • provider_document_id (str | None) –

  • provider_date_utc (datetime | str | None) –

  • primary_entity (str | None) –

  • skip_metadata (bool | None) –

Return type:

File