Categories Queries

The EC3Categories class can be used for retrieving Categories in the EC3 database.

EC3 Categories represent the categories as EC3 has defined and organized them for their interface. These categories will not map 1:1 with other systems such as Masterformat.

Current functionality provides the ability to get the entire category tree as well as categories by id.

EC3Categories

class ec3.ec3_categories.EC3Categories(bearer_token, response_format='json', ssl_verify=True)

Wraps functionality of EC3 Categories

Usage:
>>> ec3_categories = EC3Categories(bearer_token=token, ssl_verify=False)
>>> ec3_categories.get_all_categories()
get_all_categories()

Gets the entire categories tree

Returns

Dictionary of entire category tree

Return type

dict

get_category_by_id(category_id)

Returns the category from a category id

Parameters

category_id (str) – Category ID

Returns

Returns a category by ID with the whole sub-categories tree

Return type

dict