From b05d4b8eb917899d1d7a3f769783464ed9ce8410 Mon Sep 17 00:00:00 2001 From: Spyros Garyfallidis Date: Thu, 27 Nov 2025 16:36:07 +0100 Subject: [PATCH 1/3] fix: README --- python/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/README.md b/python/README.md index 592d2a12..80f01059 100644 --- a/python/README.md +++ b/python/README.md @@ -60,10 +60,10 @@ the port from the url. from aica_api.client import AICA # connect to a non-default port on the local network -aica = AICA(port=55000) +aica = AICA(url='http://localhost:55005/api') # or connect to a different host address entirely -aica = AICA(url='192.168.0.1', port=55005) +aica = AICA(url='http://192.168.0.1:55005/api') ``` ## Authentication with an API key @@ -88,12 +88,12 @@ AICA_API_KEY = os.getenv('AICA_API_KEY') aica = AICA(api_key=AICA_API_KEY) ``` -## Compatability table +## Compatibility table The latest version of this AICA API client will generally support the latest AICA Core version. Major version changes to the API client or to AICA Core indicate breaking changes and are not always backwards compatible. To interact with older versions of AICA Core, it may be necessary to install older versions of the client. -Use the following compatability table to determine which client version to use. +Use the following compatibility table to determine which client version to use. | AICA Core version | API protocol version | Matching Python client version | |-------------------|----------------------|--------------------------------| @@ -135,7 +135,7 @@ AICA Core versions `v5` and later change some endpoints paths, methods and paylo ### Checking compatibility -Recent client versions include a `check()` method to assess the client version and API compatability. +Recent client versions include a `check()` method to assess the client version and API compatibility. ```python3 from aica_api.client import AICA From 37529f1ab7a99b7030c43eccf80d111ef11e50b4 Mon Sep 17 00:00:00 2001 From: Spyros Garyfallidis Date: Mon, 1 Dec 2025 10:29:15 +0100 Subject: [PATCH 2/3] fix: restructure --- python/README.md | 63 +++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/python/README.md b/python/README.md index 80f01059..85fe004a 100644 --- a/python/README.md +++ b/python/README.md @@ -8,12 +8,36 @@ The AICA API client module provides simple functions for interacting with the AI Refer to https://docs.aica.tech for more information about the AICA System. +## Authentication with an API key + +For connecting to AICA Core v4.3.0 and later, an API key is required for authentication. + +API keys can be generated in AICA Studio with configurable access scopes. Note that available scopes are limited to +those of the currently logged-in user. A generated API key is only shown once and should be kept secret. For example, it +may be exported as an environment variable. The following example key is shown for demonstrative purposes only: + +```shell +export AICA_API_KEY=64ce9e8f-aa46-4ba7-814f-f169c01c957e.RwoH6A1Ti5poNKSizoWrcBEYzh7AkB0kpMq1TR59t6os +``` + +The API key must then be provided to the constructor with the `api_key` keyword argument: + +```python +import os +from aica_api.client import AICA + +AICA_API_KEY = os.getenv('AICA_API_KEY') +aica = AICA(api_key=AICA_API_KEY) +``` + ## Basic usage ```python +import os from aica_api.client import AICA -aica = AICA() +AICA_API_KEY = os.getenv('AICA_API_KEY') +aica = AICA(api_key=AICA_API_KEY) if aica.check(): print(f"Connected to AICA Core version {aica.core_version()}") @@ -57,35 +81,16 @@ conflict with reserved ports. Use the "Open in browser" button from Launcher to the port from the url. ```python +import os from aica_api.client import AICA +AICA_API_KEY = os.getenv('AICA_API_KEY') + # connect to a non-default port on the local network -aica = AICA(url='http://localhost:55005/api') +aica = AICA(url='http://localhost:55005/api', api_key=AICA_API_KEY) # or connect to a different host address entirely -aica = AICA(url='http://192.168.0.1:55005/api') -``` - -## Authentication with an API key - -For connecting to AICA Core v4.3.0 and later, an API key is required for authentication. - -API keys can be generated in AICA Studio with configurable access scopes. Note that available scopes are limited to -those of the currently logged-in user. A generated API key is only shown once and should be kept secret. For example, it -may be exported as an environment variable. The following example key is shown for demonstrative purposes only: - -```shell -export AICA_API_KEY=64ce9e8f-aa46-4ba7-814f-f169c01c957e.RwoH6A1Ti5poNKSizoWrcBEYzh7AkB0kpMq1TR59t6os -``` - -The API key can then be provided to the constructor with the `api_key` keyword argument: - -```python -import os -from aica_api.client import AICA - -AICA_API_KEY = os.getenv('AICA_API_KEY') -aica = AICA(api_key=AICA_API_KEY) +aica = AICA(url='http://192.168.0.1:55005/api', api_key=AICA_API_KEY) ``` ## Compatibility table @@ -138,9 +143,11 @@ AICA Core versions `v5` and later change some endpoints paths, methods and paylo Recent client versions include a `check()` method to assess the client version and API compatibility. ```python3 +import os from aica_api.client import AICA -aica = AICA() +AICA_API_KEY = os.getenv('AICA_API_KEY') +aica = AICA(api_key=AICA_API_KEY) # check compatability between the client version and API version if aica.check(): @@ -152,9 +159,11 @@ else: The latest client versions also include the following functions to check the configuration details manually. ```python3 +import os from aica_api.client import AICA -aica = AICA() +AICA_API_KEY = os.getenv('AICA_API_KEY') +aica = AICA(api_key=AICA_API_KEY) # get the current version of this client print(aica.client_version()) From 0c523b4a3fd9d615fd8a15ab7c561deb6bc6e0be Mon Sep 17 00:00:00 2001 From: Spyros Garyfallidis Date: Mon, 1 Dec 2025 17:35:38 +0100 Subject: [PATCH 3/3] fix: argument order --- python/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/README.md b/python/README.md index 85fe004a..f6c10006 100644 --- a/python/README.md +++ b/python/README.md @@ -87,10 +87,10 @@ from aica_api.client import AICA AICA_API_KEY = os.getenv('AICA_API_KEY') # connect to a non-default port on the local network -aica = AICA(url='http://localhost:55005/api', api_key=AICA_API_KEY) +aica = AICA(api_key=AICA_API_KEY, url='http://localhost:55005/api') # or connect to a different host address entirely -aica = AICA(url='http://192.168.0.1:55005/api', api_key=AICA_API_KEY) +aica = AICA(api_key=AICA_API_KEY, url='http://192.168.0.1:55005/api') ``` ## Compatibility table