Cognite-sdk

Latest version: v7.43.3

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

Scan your dependencies

Page 43 of 80

5.10.1

Fixed
- Add missing field `when` (human readable version of the CRON expression) to `FunctionSchedule` class.

5.10.0

Fixed
- Implemented automatic retries for connection errors by default, improving the reliability of the connection to the Cognite API.
- Added a user-readable message to `CogniteConnectionRefused` error for improved user experience.

Changed
- Introduce a `max_retries_connect` attribute on the global config, and default it to 3.

5.9.3

Fixed
- After creating a schedule for a function, the returned `FunctionSchedule` was missing a reference to the `CogniteClient`, meaning later calls to `.get_input_data()` would fail and raise `CogniteMissingClientError`.
- When calling `.get_input_data()` on a `FunctionSchedule` instance, it would fail and raise `KeyError` if no input data was specified for the schedule. This now returns `None`.

5.9.2

Fixed
- After calling e.g. `.time_series()` or `.events()` on an `AssetList` instance, the resulting resource list would be missing the lookup tables that allow for quick lookups by ID or external ID through the `.get()` method. Additionally, for future-proofing, the resulting resource list now also correctly has a `CogniteClient` reference.

5.9.1

Fixed
- `FunctionsAPI.call` now also works for clients using auth flow `OAuthInteractive`, `OAuthDeviceCode`, and any user-made subclass of `CredentialProvider`.

Improved
- `FunctionSchedulesAPI.create` now also accepts an instance of `ClientCredentials` (used to be dictionary only).

5.9.0

Added
- New class `AssetHierarchy` for easy verification and reporting on asset hierarchy issues without explicitly trying to insert them.
- Orphan assets can now be reported on (orphan is an asset whose parent is not part of the given assets). Also, `AssetHierarchy` accepts an `ignore_orphans` argument to mimic the old behaviour where all orphans were assumed to be valid.
- `AssetsAPI.create_hierarchy` now accepts two new parameters: `upsert` and `upsert_mode`. These allow the user to do "insert or update" instead of an error being raised when trying to create an already existing asset. Upsert mode controls whether updates should replace/overwrite or just patch (partial update to non-null values only).
- `AssetsAPI.create_hierarchy` now also verifies the `name` parameter which is required and that `id` has not been set.

Changed
- `AssetsAPI.create_hierarchy` now uses `AssetHierarchy` under the hood to offer concrete feedback on asset hierarchy issues, accessible through attributes on the raised exception, e.g. invalid assets, duplicates, orphans, or any cyclical asset references.

Fixed
- `AssetsAPI.create_hierarchy`...:
- Now respects `max_workers` when spawning worker threads.
- Can no longer raise `RecursionError`. Used to be an issue for asset hierarchies deeper than `sys.getrecursionlimit()` (typically set at 1000 to avoid stack overflow).
- Is now `pyodide` compatible.

Page 43 of 80

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.