Python API Client v4.0.0 #384
Replies: 1 comment
-
|
Deprecation notice: v4.0.0 and v4.0.1 of this client have been pulled from PyPi. The newest v4 client (v4.0.2 at the time of this post) should be used for AICA Core v5.1.0 and newer. As of v4 of this client, we were using automatic code generation from our OpenAPI schema, based on openapi-python-client. Unfortunately, some parts of our API schema in AICA Core v5.0.0 and v5.0.1 were not fully compatible with the behavior of these clients, and as a result the v4.0.0 and v4.0.1 Python client versions had exceptions when calling certain endpoints. AICA Core v5.0.0 and v5.0.1 are now unsupported by this client, and we therefore encourage users to upgrade to Core v5.1.0. Users are otherwise also able to create custom clients to interact with the API of Core v5.0.0 and v5.0.1 as necessary. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Version 4.0 of the Python API Client has been released and now supports AICA Core v5 (Enduring Eiger).
The release can be found here: https://pypi.org/project/aica-api/4.0.0/
The new version of the client is available to update or install with
pip install aica-api==4.0.0. First time installs withpip install aica-apiwill use the latest version by default.This major version change has the following breaking changes that are incompatible with previous usage. Please continue using version 3.x of the client for older versions of AICA Core.
Breaking Changes
The
AICAconstructor now takes only keyword arguments:url: optional, a valid URL pointing to your AICA Core instance (defaults tohttp://localhost:8080/api), this is different to the currenturlwhich only covers the host itselfapi_key: required, an API key with appropriate scopeslog_level: optional, a log level fromloggingmodule (defaults tologging.INFO)Methods of the
AICAstop returningrequests.Responsebut instead an appropriate class containing the data (orNone).A few argument types have also been changed similarly.
This allows for better type-checking, avoid using dictionary everywhere and leaving JSON parsing to the user.
Finally, nearly all exceptions are now subclasses of
AICAErrorto allow for easier exception handling. The only exception isValueErrorwhen calling the newload_application(allows to load application by name). The Socket.IO-based functions also raise exceptions now.Two functions were removed:
licenseandapi_versionas they aren't available through the API anymore. Moreover,component_descriptionsandcontroller_descriptionshave been deprecated in favor ofextension_descriptions.Beta Was this translation helpful? Give feedback.
All reactions