An object type in the Ontology.
This class provides methods to create references to time series stored as time series properties on objects in the Ontology.
Ensure you’re using the ID for object_type_id
since there are three object type references available on
the platform: ID, API, RID.
Copied!1 2
>>> aircraft_object_type = Object("aircraft") # object type reference >>> airplane = airplane_object_type.id("aircraft-1") # you can now use the primary key to get the object reference
Creates a reference to an Ontology object using its primary key.
FoundryObject.property()
FoundryObject
Copied!1 2
>>> aircraft_object_type = Object("aircraft") >>> airplane = airplane_object_type.id("aircraft-1") # the object reference can be used for accessing the TSP
The example below shows a fuller implementation of performing a FoundryTS function on a time series property of a foundryts.objects.Object.
Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
... import foundryts.functions as F from foundryts.objects import Object from foundryts import FoundryTS # optional: from foundry_sdk_runtime.context_vars import FOUNDRY_HOSTNAME from foundry_sdk_runtime.context_vars import FOUNDRY_TOKEN import os @function def get_sensor_range() -> str: stack = "<your stack here>" #or use FOUNDRY_HOSTNAME os.environ["FOUNDRYTS_CODEX_HUB_URIS"] = f"https://{stack}.palantirfoundry.com/codex-hub/api" os.environ["FOUNDRYTS_ONTOLOGY_METADATA_URIS"] = f"https://{stack}.palantirfoundry.com/ontology-metadata/api" os.environ["FOUNDRYTS_OSS_URIS"] = f"https://{stack}.palantirfoundry.com/object-set-service/api" os.environ["FOUNDRY_AUTH_TOKEN"] = FOUNDRY_TOKEN.get() foundry = FoundryTS() sensor_object_type = Object("<object id>") sensor = sensor_object_type.id("<primary key>") series = sensor.property("<time series property>") end_dt = datetime(2025, 9, 23) series = F.time_range(start=0, end=end_dt)(series) return str(series.to_pandas())