Dicts module¶
Module for managing dict in sdcv
Route¶
- app.features.dicts.route.list_dicts(body)¶
Get the list of all available dictionaries — tags:
features/dicts
- requestBody:
required: true content:
- application/json:
- schema:
type: object required:
sdcv_type
- properties:
- sdcv_type:
type: string description: Where to run sdcv from example: “docker”
- container_name:
type: string description: Container name, if sdcv is in docker example: “sdcv-test”
- responses:
- 200:
description: Successful retrieval of the dictionary list content:
- application/json:
- schema:
type: object required: [data, error] properties:
- data:
type: array description: List of dictionary names available in sdcv items:
type: string
example: [“Mueller7GPL”, “Full English-Russian”, “LingvoUniversal”]
- error:
type: string nullable: true example: null
- 409:
description: Internal server error when communicating with the sdcv container content:
- application/json:
- schema:
type: object required: [data, error] properties:
- data:
type: object nullable: true example: null
- error:
type: string example: “Failed to fetch dictionaries from container”
- Parameters:
body (DictRequest)
Service¶
- class app.features.dicts.service.DictsService¶
Bases:
objectService for managing available dictionaries.
- get_all(engine)¶
Retrieves all available dictionaries.
- Parameters:
engine (BaseSdcvEngine) – The engine implementation based on the sdcv deployment location.
- Returns:
A data transfer object containing the list of dictionaries.
- Return type:
Repository¶
Requests¶
- class app.features.dicts.requests.DictRequest¶
Bases:
BaseModelRepresents a request to retrieve the list of available dictionaries.
Fields¶ Field
Type
Required
Default
Constraints
strYes
min_length=0
strYes
min_length=0
- container_name: str¶
The name of the sdcv container, if deployed inside Docker.
- Constraints:
min_length =
0
- sdcv_type: str¶
The deployment type of the sdcv application.
- Constraints:
min_length =
0