# Integrations ## Shyft Time Series The following is provided as a python package (wheel): `trident-shyft`. It provides integrations with Shyft's distributed time series system. The following shows how it connects a Trident engine to a DTS server: ![shyft dtss](shyft-dtss-diagram.svg) ### API Overview The `trident-shyft` package provides the following components, to be used together with the Trident engine: - `ShyftDataService` - factory strategy object - `ShyftDataProvider` - read-only time series data provider for input data - `ShyftDataStore` - read-write time series data store for result data ### Basic usage The following will set up Shyft as the default data provider for time series data: ```python import trident.core import ngltmshyft engine = trident.core.Engine() ... shyft_host = "localhost" shyft_port = 91919 service = ngltmshyft.ShyftDataService() service.shyft_ref_prefix = "shyft://trident" # will be prepended to each shyft request service.connect_dts("{shyft_host}:{shyft_port}") engine.data_service = service ``` ### Shyft URL's When requests are made from Trident through the `ShyftDataService`, Shyft URL's are chosen as follows: When requesting input data: `/datasets//`; e.g. `shyft://trident/datasets/my_dataset/my_ts` When storing result data: `/runs//results/`; e.g. `shyft://trident/runs/my_run/results/my_ts` ### More examples For a more complete set of examples, see the `shyft` folder in the `trident.notebooks` repository. ### Source code The source code is available in the `trident-shyft` repository.