Skip to content

Commit 89ea13a

Browse files
update documentation
1 parent b5e0e8e commit 89ea13a

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

Dockerfile.docs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.10-buster
1+
FROM python:3.10-slim-bullseye
22

33
RUN apt-get update && apt-get install -y \
44
pandoc default-jre graphviz \

docs/dsms_sdk/dsms_config_schema.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ This section describes the configuration properties for the DSMS Python SDK.
99
| Field Name | Description | Type | Default | Property Namespace | Required/Optional | Environment Variable |
1010
|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------|------------------------------|-------------------------|-------------------|-------------------------------|
1111
| Host URL | URL of the DSMS instance to connect. | `AnyUrl` | Not Applicable | `host_url` | Required | `DSMS_HOST_URL` |
12-
| Request timeout | Timeout in seconds until the request to the DSMS is timed out. | `int` | `120` | `request_timeout` | Optional | `DSMS_REQUEST_TIMEOUT` |
13-
| SSL verify | Whether the SSL of the DSMS shall be verified during connection. | `bool` | `True` | `ssl_verify` | Optional | `DSMS_SSL_VERIFY` |
1412
| Username | User name for connecting to the DSMS instance | `Optional[SecretStr]`| `None` | `username` | Optional | `DSMS_USERNAME` |
13+
| Client ID | If a service account is used to authenticate, this will proviode the Client ID in Keycloak | `Optional[SecretStr]`| `None` | `client_id` | Optional | `DSMS_CLIENT_ID`, `KEYCLOAK_DSMS_CLIENT_ID` or `KEYCLOAK_CLIENT_ID` |
14+
| Client Secret | If a service account is used to authenticate, this will proviode the Client Secret in Keycloak | `Optional[SecretStr]`| `None` | `client_secret` | Optional | `DSMS_CLIENT_SECRET`, `KEYCLOAK_DSMS_CLIENT_SECRET` or `KEYCLOAK_CLIENT_SECRET` |
1515
| Password | Password for connecting to the DSMS instance | `Optional[SecretStr]`| `None` | `password` | Optional | `DSMS_PASSWORD` |
1616
| Token | JWT bearer token for connecting to the DSMS instance | `Optional[SecretStr]`| `None` | `token` | Optional | `DSMS_TOKEN` |
1717
| Ping Backend | Check whether the host is a DSMS instance or not. | `bool` | `True` | `ping_backend` | Optional | `DSMS_PING_BACKEND` |
1818
| Auto fetch KTypes | Whether the KTypes of the DSMS should be fetched automatically when the session is started. They will be fetched if requested and cached in memory. | `bool` | `True` | `auto_fetch_ktypes` | Optional | `DSMS_AUTO_FETCH_KTYPES` |
19+
| Request timeout | Timeout in seconds until the request to the DSMS is timed out. | `int` | `120` | `request_timeout` | Optional | `DSMS_REQUEST_TIMEOUT` |
20+
| SSL verify | Whether the SSL of the DSMS shall be verified during connection. | `bool` | `True` | `ssl_verify` | Optional | `DSMS_SSL_VERIFY` |
1921
| Auto refresh | Determines whether local objects like KItem, KType, and AppConfig should automatically update with the latest backend data after a successful commit. | `bool` | `True` | `auto_refresh` | Optional | `DSMS_AUTO_REFRESH` |
2022
| Always refetch KTypes | Whether the KTypes of the DSMS should be refetched every time used in the SDK. This can be helpful if the SDK is integrated in a service and the KTypes are updated.<br><br>**WARNING**: This might lead to performance issues. | `bool` | `False` | `always_refetch_ktypes` | Optional | `DSMS_ALWAYS_REFETCH_KTYPES` |
2123
| Strict validation | Whether the validation of custom properties shall be strict. Disabling this might be helpful when, for example, the schema of a KType has been changed and the custom properties are not compatible anymore and should be updated accordingly. | `bool` | `True` | `strict_validation` | Optional | `DSMS_STRICT_VALIDATION` |
@@ -32,6 +34,19 @@ This section describes the configuration properties for the DSMS Python SDK.
3234
| Hide properties | Properties to hide while printing, e.g `{'external_links'}` | `Set[str]` | `{}` | `hide_properties` | Optional | `DSMS_HIDE_PROPERTIES` |
3335
| Log level | Logging level | `str` | `None` | `log_level` | Optional | `DSMS_LOG_LEVEL` |
3436

37+
## Authentication Priority Rules
38+
39+
```{important}
40+
41+
When multiple authentication methods are provided:
42+
43+
* Service account credentials (`client_id` + `client_secret`) always take precedence over user credentials (`username` + `password`)
44+
* If any authentication credentials are provided alongside a token, the original `token` value will be overwritten with a new token obtained during the authentication process
45+
46+
Summary: Service account → User credentials → Direct token (in order of priority)
47+
48+
```
49+
3550
## Example Usage
3651
```python
3752
from dsms import DSMS

docs/dsms_sdk/dsms_kitem_schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The schema contains complex types and references, indicating an advanced usage s
1919
| Updated At | Timestamp of when the KItem was updated. | Union[string, datetime] | `None` | `updated_at` | Automatically generated |
2020
| Avatar | The avatar of the KItem. | Union[[Avatar](#avatar-fields), Dict[str, Any]] | `None` | `avatar` | Optional |
2121
| Avatar Exists | Whether the KItem holds an avatar or not. | boolean | `False` | `avatar_exists` | Automatically generated |
22-
| KItemCustomPropertiesModel(#kitemcustompropertiesmodel) | A set of custom properties related to the KItem. | Any | `None` | `custom_properties`| Optional |
22+
| [KItemCustomPropertiesModel](#kitemcustompropertiesmodel) | A set of custom properties related to the KItem. | Any | `None` | `custom_properties`| Optional |
2323
| Summary | A brief human-readable summary of the KItem | string | `None` | `summary` | Optional |
2424
| Apps | A list of applications associated with the KItem | List[[App](#app-fields)] | `[ ]` | `apps` | Optional |
2525
| Annotations | A list of annotations related to the KItem | List[[Annotation](#annotation-fields)] | `[ ]` | `annotations` | Optional |

docs/dsms_sdk/dsms_sdk.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ You need to authenticate yourself to connect with dsms using the `dsms-sdk` Pyth
8989

9090
The following are the instances of the DSMS you could choose from:
9191

92-
- [StahlDigital](https://lnkd.in/gfwe9a36)
93-
- [KupferDigital](https://lnkd.in/g8mvnM3K)
94-
- [DiMAT](https://lnkd.in/g46baB6J)
92+
- [StahlDigital](https://stahldigital.materials-data.space)
93+
- [KupferDigital](https://kupferdigital.materials-data.space)
94+
- [DiMAT](https://cmdb.materials-data.space)
95+
- [ORCHESTER](https://cmdb.materials-data.space)
9596

9697
2. **Authentication Options**
9798

@@ -160,6 +161,10 @@ You need to authenticate yourself to connect with dsms using the `dsms-sdk` Pyth
160161
DSMS_TOKEN = {YOUR_COPIED_TOKEN}
161162
```
162163

164+
```{important}
165+
Please also note the [priority rules for authentication](dsms_config_schema.md#authentication-priority-rules).
166+
```
167+
163168
Now you are ready to use dsms-sdk. Do check out the tutorials section to try out some basic examples on how to use dsms-sdk.
164169

165170
The next sections covers about the schema of fundamental classes crucial for users to know about DSMS when using the platform. Below given explains about the Schema of `KItem` and its associated properties in DSMS.

0 commit comments

Comments
 (0)