cognite-extractor-utils 7.5.10__tar.gz → 7.5.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cognite-extractor-utils might be problematic. Click here for more details.
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/PKG-INFO +1 -1
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/__init__.py +1 -1
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/configuration/models.py +31 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/pyproject.toml +1 -1
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/.gitignore +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/LICENSE +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/README.md +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/_inner_util.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/base.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/configtools/__init__.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/configtools/_util.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/configtools/elements.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/configtools/loaders.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/configtools/validators.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/exceptions.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/metrics.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/py.typed +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/statestore/__init__.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/statestore/_base.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/statestore/hashing.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/statestore/watermark.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/threading.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/__init__.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/configuration/__init__.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/configuration/exceptions.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/configuration/loaders.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/core/__init__.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/core/_dto.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/core/_messaging.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/core/base.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/core/errors.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/core/logger.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/core/restart_policy.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/core/runtime.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/core/tasks.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/scheduling/__init__.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/scheduling/_scheduler.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/unstable/scheduling/_schedules.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader/__init__.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader/_base.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader/_metrics.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader/assets.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader/data_modeling.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader/events.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader/files.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader/raw.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader/time_series.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader/upload_failure_handler.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader_extractor.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/uploader_types.py +0 -0
- {cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cognite-extractor-utils
|
|
3
|
-
Version: 7.5.
|
|
3
|
+
Version: 7.5.11
|
|
4
4
|
Summary: Utilities for easier development of extractors for CDF
|
|
5
5
|
Project-URL: repository, https://github.com/cognitedata/python-extractor-utils
|
|
6
6
|
Author-email: Mathias Lohne <mathias.lohne@cognite.com>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import os
|
|
1
2
|
import re
|
|
2
3
|
from datetime import timedelta
|
|
3
4
|
from enum import Enum
|
|
@@ -215,6 +216,36 @@ class ConnectionConfig(ConfigModel):
|
|
|
215
216
|
|
|
216
217
|
return CogniteClient(client_config)
|
|
217
218
|
|
|
219
|
+
@classmethod
|
|
220
|
+
def from_environment(cls) -> "ConnectionConfig":
|
|
221
|
+
auth: AuthenticationConfig
|
|
222
|
+
if "COGNITE_CLIENT_SECRET" in os.environ:
|
|
223
|
+
auth = _ClientCredentialsConfig(
|
|
224
|
+
type="client-credentials",
|
|
225
|
+
client_id=os.environ["COGNITE_CLIENT_ID"],
|
|
226
|
+
client_secret=os.environ["COGNITE_CLIENT_SECRET"],
|
|
227
|
+
token_url=os.environ["COGNITE_TOKEN_URL"],
|
|
228
|
+
scopes=os.environ["COGNITE_TOKEN_SCOPES"].split(","),
|
|
229
|
+
)
|
|
230
|
+
elif "COGNITE_CLIENT_CERTIFICATE_PATH" in os.environ:
|
|
231
|
+
auth = _ClientCertificateConfig(
|
|
232
|
+
type="client-certificate",
|
|
233
|
+
client_id=os.environ["COGNITE_CLIENT_ID"],
|
|
234
|
+
path=Path(os.environ["COGNITE_CLIENT_CERTIFICATE_PATH"]),
|
|
235
|
+
password=os.environ.get("COGNITE_CLIENT_CERTIFICATE_PATH"),
|
|
236
|
+
authority_url=os.environ["COGNITE_AUTHORITY_URL"],
|
|
237
|
+
scopes=os.environ["COGNITE_TOKEN_SCOPES"].split(","),
|
|
238
|
+
)
|
|
239
|
+
else:
|
|
240
|
+
raise KeyError("Missing auth, either COGNITE_CLIENT_SECRET or COGNITE_CLIENT_CERTIFICATE_PATH must be set")
|
|
241
|
+
|
|
242
|
+
return ConnectionConfig(
|
|
243
|
+
project=os.environ["COGNITE_PROJECT"],
|
|
244
|
+
base_url=os.environ["COGNITE_BASE_URL"],
|
|
245
|
+
integration=os.environ["COGNITE_INTEGRATION"],
|
|
246
|
+
authentication=auth,
|
|
247
|
+
)
|
|
248
|
+
|
|
218
249
|
|
|
219
250
|
class CronConfig(ConfigModel):
|
|
220
251
|
type: Literal["cron"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/metrics.py
RENAMED
|
File without changes
|
{cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_extractor_utils-7.5.10 → cognite_extractor_utils-7.5.11}/cognite/extractorutils/util.py
RENAMED
|
File without changes
|