Industrial Model Client Generator
Project description
🏭 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
🚀 Usage
from industrial_model_client_generator import InstanceSpaceConfig, generate
instance_space_configs = [
InstanceSpaceConfig(
view_or_space_external_id="ANY-COR-ALL-DML", instance_spaces_prefix="ANY-"
),
InstanceSpaceConfig(
view_or_space_external_id="ANOTHER-COR-ALL-DMD",
instance_spaces=["ANOTHER-COR-ALL-DAT"],
),
InstanceSpaceConfig(
view_or_space_external_id="CogniteAsset", instance_spaces_prefix="GENERIC-"
),
]
generate(
client_name="TestingClient", # required
instance_space_configs=instance_space_configs, # optional - map the instance spaces to views to improve perf
output_path="output" # optional - if not set, it will output to the client_name folder
)
⚙️ Environment Configuration Guide
Below is a list of all required variables and what each of them does:
| Variable Name | Description |
|---|---|
CDF_PROJECT |
The name of the CDF project |
CDF_CLIENT_NAME |
A friendly name for the client configuration |
CDF_CLUSTER |
The Cognite cluster where your project is hosted |
CDF_TOKEN_URL |
The OAuth2 token URL. |
CDF_CLIENT_ID |
The Client ID of the registered service principal. |
CDF_CLIENT_SECRET |
The Client Secret of the registered service principal. |
CDF_DATA_MODEL_EXTERNAL_ID |
External ID of the data model in CDF. |
CDF_DATA_MODEL_SPACE |
Data model space where the model is stored. |
CDF_DATA_MODEL_VERSION |
The version of the data model to be used. |
🔐 Setting the Variables
Option: .env File (Recommended for Local Development)
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file industrial_model_client_generator-0.1.0.tar.gz.
File metadata
- Download URL: industrial_model_client_generator-0.1.0.tar.gz
- Upload date:
- Size: 43.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e28d9cd38446780237846412a821fc7f5e7b9841d1ecb8d218da2d9f0567b2e0
|
|
| MD5 |
bda976d9cb90f3c01e176d09c7c365e1
|
|
| BLAKE2b-256 |
6548eed835371405cc67ea87a5143814d124ead35a0ce31d4334ca69f8586315
|
File details
Details for the file industrial_model_client_generator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: industrial_model_client_generator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8aed2e9960257f9c2a3b7a9d42fbfb106465f7ce588d4e948d154bcde30230f4
|
|
| MD5 |
ff9eccb32986e230ff7c5eb2cb4287e4
|
|
| BLAKE2b-256 |
f01212cb1dd02dda8bd1a0202aff4365047eeecf7827eda2ace5d98c41f9a361
|