From e0f31db3b81ebfc6f37f6105fc35551e4f63733f Mon Sep 17 00:00:00 2001 From: Cariad Eccleston Date: Wed, 18 Mar 2026 11:55:53 +0000 Subject: [PATCH 1/5] Add instructions for using custom environments --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 820deead..b236c588 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,38 @@ With an instantiated `Client` object, and username and password set as environme client.authenticate() ``` +### Using different environments + +The `Client` defaults to using the Uncertainty Engine production environment. To use a different named environment, pass it as the `env` argument: + +```python +client = Client(env="dev") +``` + +If a custom environment has been provided for you, pass an `Environment` that describes the details: + +```python +from uncertainty_engine import Client, Environment + +client = Client( + env=Environment( + cognito_user_pool_client_id="…", + core_api="…", + region="…", + resource_api="…", + ), +) +``` + +| Argument | Format | Example | +| ----------------------------- | --------------------------------------------- | -------------------------------------------------------- | +| `cognito_user_pool_client_id` | Alphanumeric string | `3vj5pe253j4v070euqjdk38a24` | +| `core_api` | Starts with `https://`, does not end with `/` | `https://de1v75vvk6.execute-api.eu-west-2.amazonaws.com` | +| `region` | Geographic region code | `eu-west-2` | +| `resource_api` | Starts with `https://`, does not end with `/` | `https://m90q55iux6.execute-api.eu-west-2.amazonaws.com` | + +**Note:** Every password is tied to a specific environment. A password for the production environment, for example, won't grant access to the development environment. Ensure you set the correct `UE_PASSWORD` value for the environment you configure. + ### Running a node ```python From 81d7c5361ff2d5676b8eaafe786c02cc2a8d0e23 Mon Sep 17 00:00:00 2001 From: Cariad Eccleston Date: Wed, 18 Mar 2026 13:12:34 +0000 Subject: [PATCH 2/5] Fix inconsistent indentation --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b236c588..178dd616 100644 --- a/README.md +++ b/README.md @@ -64,12 +64,12 @@ If a custom environment has been provided for you, pass an `Environment` that de from uncertainty_engine import Client, Environment client = Client( - env=Environment( + env=Environment( cognito_user_pool_client_id="…", core_api="…", region="…", resource_api="…", - ), + ), ) ``` From eaea6386baaa8d4b99cd5fdda30b409d39a7fec6 Mon Sep 17 00:00:00 2001 From: Cariad Eccleston Date: Wed, 25 Mar 2026 11:39:11 +0000 Subject: [PATCH 3/5] Add troubleshooting section with instructions to delete the token cache if authentication fails --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 178dd616..bebf5238 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,22 @@ client = Client( **Note:** Every password is tied to a specific environment. A password for the production environment, for example, won't grant access to the development environment. Ensure you set the correct `UE_PASSWORD` value for the environment you configure. +### Troubleshooting + +Authorisation tokens are cached under `.ue_auth` in your home directory. If the SDK fails to authenticate you (for example, after switching from one environment to another), delete `.ue_auth` to generate and cache new tokens. + +To delete the cache in macOS or Linux: + +```bash +rm -rf ~/.ue_auth +``` + +To delete the cache in Windows: + +```bat +rmdir /s %USERPROFILE%\.ue_auth +``` + ### Running a node ```python From 8d98bf9fdb95e5fc5e4ec238372140d6e5d9fb52 Mon Sep 17 00:00:00 2001 From: Cariad Eccleston Date: Wed, 25 Mar 2026 11:50:48 +0000 Subject: [PATCH 4/5] Refer to `.ue_auth` as a file rather than a directory --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bebf5238..448d4179 100644 --- a/README.md +++ b/README.md @@ -84,18 +84,18 @@ client = Client( ### Troubleshooting -Authorisation tokens are cached under `.ue_auth` in your home directory. If the SDK fails to authenticate you (for example, after switching from one environment to another), delete `.ue_auth` to generate and cache new tokens. +Authorisation tokens are cached in `.ue_auth` in your home directory. If the SDK fails to authenticate you (for example, after switching from one environment to another), delete `.ue_auth` to generate and cache new tokens. To delete the cache in macOS or Linux: ```bash -rm -rf ~/.ue_auth +rm ~/.ue_auth ``` To delete the cache in Windows: ```bat -rmdir /s %USERPROFILE%\.ue_auth +del %USERPROFILE%\.ue_auth ``` ### Running a node From 9b4b6dd2b8ddaf6ff26c80e89b1ca6d28b035223 Mon Sep 17 00:00:00 2001 From: Cariad Eccleston Date: Wed, 25 Mar 2026 13:07:50 +0000 Subject: [PATCH 5/5] Accommodate spaces in `%USERPROFILE%` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 448d4179..0de80750 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ rm ~/.ue_auth To delete the cache in Windows: ```bat -del %USERPROFILE%\.ue_auth +del "%USERPROFILE%\.ue_auth" ``` ### Running a node