2.1.3. biggr.objects#
Attributes#
Functions#
|
Get the raw API request results as a python dictionary. |
|
Get an entity from the BiGGr database and return it as a python object. |
|
Module Contents#
- biggr.objects.API_URL = 'https://biggr.org/api/v3/'#
- biggr.objects.OBJECTS_API_URL = 'https://biggr.org/api/v3/objects/'#
- biggr.objects.IDENTIFIERS_API_URL = 'https://biggr.org/api/v3/identifiers/'#
- biggr.objects.MODEL_NAMES#
- biggr.objects.get_raw(obj_type: str | Type[biggr.models.Base], obj_id: str | int) Any | None[source]#
Get the raw API request results as a python dictionary.
Makes the BiGGr API request to obtain object(s) of type obj_type. Returns the JSON result interpreted as python dictionary.
- Parameters:
obj_type (str or the class of the object to be retrieved) – For all possible values, please refer to the BiGGr API documentation at biggr.org/data_access
obj_id (str or int) – If obj_id is a str, the ID is interpreted as a BiGG ID (this can not be used with all database entities). In the case that obj_id is of type int, the ID is interpreted as an internal ID, as used for defining relationships between database entities.
- biggr.objects.get(obj_type: str | Type[biggr.models.Base], obj_id: str | int)[source]#
Get an entity from the BiGGr database and return it as a python object.
Makes the BiGGr API request to obtain object(s) of type obj_type. Returns the JSON result interpreted as an instance of the applicable class, as available in the biggr.models module. Some relations are loaded by default, whilst others are loaded automatically when accessed.
- Parameters:
obj_type (str or the class of the object to be retrieved) – For all possible values, please refer to the BiGGr API documentation at biggr.org/data_access
obj_id (str or int) – If obj_id is a str, the ID is interpreted as a BiGG ID (this can not be used with all database entities). In the case that obj_id is of type int, the ID is interpreted as an internal ID, as used for defining relationships between database entities.