🏭 Industrial Model Client Generator
A utility for generating client-specific configurations for industrial data models
📦 Overview
The industrial_model_client_generator package automates the generation of client configurations based on a set of input definitions.
🚀 Installation
pip install industrial-model-client-generator
⚙️ Configuration Guide
This project requires a generator-config.yaml file to be placed in the root directory where the script is executed. This file contains environment-specific settings such as Cognite credentials, data model configuration, and instance space mappings.
Creating generator-config.yaml
client_name: "TestingClientV2"
output_path: "output" # not required
client_mode: "async" # options: both, async, sync
cognite:
project: "${CDF_PROJECT}"
client_name: "${CDF_CLIENT_NAME}"
base_url: "https://${CDF_CLUSTER}.cognitedata.com"
credentials:
client_credentials:
token_url: "${CDF_TOKEN_URL}"
client_id: "${CDF_CLIENT_ID}"
client_secret: "${CDF_CLIENT_SECRET}"
scopes: ["https://${CDF_CLUSTER}.cognitedata.com/.default"]
data_model:
external_id: "${CDF_DATA_MODEL_EXTERNAL_ID}"
space: "${CDF_DATA_MODEL_SPACE}"
version: "${CDF_DATA_MODEL_VERSION}"
instance_space_configs: # not required
- view_or_space_external_id: "GENERIC-COR-ALL-DMD"
instance_spaces:
- "REF-COR-ALL-DAT"
- view_or_space_external_id: "Equipment"
instance_spaces_prefix: "SAP-"
- view_or_space_external_id: "FunctionalLocation"
instance_spaces_prefix: "SAP-"
🔐 Setting the Variables
Option: .env File (Recommended)
Create a file named .env in the root of your project:
CDF_PROJECT=cognite-dev
CDF_CLIENT_NAME=testing
CDF_CLUSTER=az-eastus-1
CDF_TOKEN_URL=https://login.microsoftonline.com/xxxx/oauth2/v2.0/token
CDF_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
CDF_CLIENT_SECRET=your-client-secret
CDF_DATA_MODEL_EXTERNAL_ID=CogniteCore
CDF_DATA_MODEL_SPACE=cdf_cdm
CDF_DATA_MODEL_VERSION=v1
🚀 Usage
from industrial_model_client_generator import generate
generate()
Metadata
Release files for industrial-model-client-generator 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| industrial_model_client_generator-0.1.7.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| industrial_model_client_generator-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.3 kB
Release files / industrial_model_client_generator-0.1.7.tar.gz
| Download URL | industrial_model_client_generator-0.1.7.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c17d954c903017167385a77298fb6f0690766269b52b6dd04c2f14bf48f34f9
|
|
BLAKE2b-256 checksum How to use checksums |
9a561e9e74ace9d513bf91cc1806fc43a06bff406c0b572f294fe4bfbb605fea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.22
|
Release files / industrial_model_client_generator-0.1.7-py3-none-any.whl
| Download URL | industrial_model_client_generator-0.1.7-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49ac8c4b98985883dd79bd4707e3eacc0f624269a20ad1cdd6cbd05eb0b0a9c6
|
|
BLAKE2b-256 checksum How to use checksums |
88d459d6a1822eb199f0d278103db5ec3cb18cd55b438737d0556ed1d67ff533
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.22
|