2023-04-11 10:00:38 +02:00

1.8 KiB

ICON Service Base

ICON Service Base is a git repository that contains code shared among all Icon services in a service-oriented architecture. The repository consists of a backend written in Python and a frontend written in TypeScript.

Installation

Python

Make sure you have Python 3.10 or later installed on your system. The dependencies of this package are handled with poetry. You can install the icon_service_base like so:

poetry add git+ssh://git@gitlab.phys.ethz.ch:tiqi-projects/qchub/icon-services/icon_service_base.git

TypeScript frontend

Make sure you have Node.js and npm or yarn installed on your system. You can install @icon-service/icon_service_base like so:

npm install git+ssh://git@gitlab.phys.ethz.ch:tiqi-projects/qchub/icon-services/icon_service_base.git

Usage

Python

The Python code can be used as a library in other ICON services. Import the relevant modules and classes from the icon_service_base package in your Python code, as needed.

TypeScript Frontend

The frontend code contains the core of the typescript openAPI clients generated by openapi-typescript-codegen. This needs to be imported in the ICON services like so:

import { OpenAPI } from '@icon-service/icon_service_base';
import { request as __request } from '@icon-service/icon_service_base';
export { ApiError } from "@icon-service/icon_service_base";
export { CancelablePromise, CancelError } from '@icon-service/icon_service_base';
export type { OpenAPIConfig } from '@icon-service/icon_service_base';

License

This project is licensed under the MIT License. See the LICENSE file for details.