9.1.2. DataReaders

DataReaders for datasets’ data loading.

pydantic model junifer.datareader.DefaultDataReader

Concrete implementation for common data reading.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "DefaultDataReader",
   "description": "Concrete implementation for common data reading.",
   "type": "object",
   "properties": {},
   "additionalProperties": false
}

Config:
  • extra: str = forbid

  • use_enum_values: bool = True

Validators:

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.

validate_input(input)

Validate input.

Parameters:
inputlist of str

The input to the pipeline step. The list must contain the available Junifer Data dictionary keys.

Returns:
list of str

The actual elements of the input that will be processed by this pipeline step.