Cognite-sdk

Latest version: v7.43.3

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

Scan your dependencies

Page 72 of 80

2.2.1

Added
- Fixed a bug where `/timeseries/list` was missing from the retryable endpoints.

2.2.0

Added
- Files labelling support

2.1.2

Fixed
- Fixed a bug where only v1 endpoints (not playground) could be added as retryable

2.1.1

Fixed
- Calls to datapoints `retrieve_dataframe` with `complete="fill"` would break using Pandas version 1.1.0 because it raises TypeError when calling `.interpolate(...)` on a dataframe with no columns.

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`.

Page 72 of 80

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.