Cognite-sdk

Latest version: v7.46.1

Safety actively analyzes 634607 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 74 of 82

2.1.0

Added
- Support for passing a single string to `AssetUpdate().labels.add` and `AssetUpdate().labels.remove`. Both a single string and a list of strings is supported. Example:
python
using a single string
my_update = AssetUpdate(id=1).labels.add("PUMP").labels.remove("VALVE")
res = client.assets.update(my_update)

using a list of strings
my_update = AssetUpdate(id=1).labels.add(["PUMP", "ROTATING_EQUIPMENT"]).labels.remove(["VALVE"])
res = client.assets.update(my_update)

2.0.0

Changed
- The interface to interact with labels has changed. A new, improved interface is now in place to make it easier to work with CDF labels. The new interface behaves this way:
python
crate label definition(s)
client.labels.create(LabelDefinition(external_id="PUMP", name="Pump", description="Pump equipment"))
... or multiple
client.labels.create([LabelDefinition(external_id="PUMP"), LabelDefinition(external_id="VALVE")])

list label definitions
label_definitions = client.labels.list(name="Pump")

delete label definitions
client.labels.delete("PUMP")
... or multiple
client.labels.delete(["PUMP", "VALVE"])

create an asset with label
asset = Asset(name="my_pump", labels=[Label(external_id="PUMP")])
client.assets.create(assets)

filter assets by labels
my_label_filter = LabelFilter(contains_all=["PUMP", "VERIFIED"])
asset_list = client.assets.list(labels=my_label_filter)

attach/detach labels to/from assets
my_update = AssetUpdate(id=1).labels.add(["PUMP"]).labels.remove(["VALVE"])
res = client.assets.update(my_update)


Fixed
- Fixed bug where `_call_` in SequencesAPI (`client.sequences`) was incorrectly returning a `GET` method instead of `POST`.

1.8.1

Changed
- For 3d mappings delete, only use node_id and asset_id pairs in delete request to avoid potential bad request.
- Support attaching/detaching multiple labels on assets in a single method

1.8.0

Added
- Synthetic timeseries endpoint for DatapointsApi
- Labels endpoint support
- Assets labelling support
- Support for unique value aggregation for events.

Changed
- When `debug=true`, redirects are shown more clearly.

1.7.0

Fixed
- datasetId is kept as an integer in dataframes.

Changed
- Internal list of retryable endpoints was changed to a class variable so it can be modified.

1.6.0

Added
- Support events filtering by ongoing events (events without `end_time` defined)
- Support events filtering by active timerange of event
- Support files metadata filtering by `asset_external_ids`
- Aggregation endpoint for Assets, DataSets, Events, Files, Sequences and TimeSeries API

Page 74 of 82

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.