ipsurv.serializer package

IpSurv’s Module Index

ipsurv.serializer.serializer module

class Serializer(args)

Bases: abc.ABC

Description: https://deer-hunt.github.io/ipsurv/pages/ipsurv-cmd/program_architecture_classes.html#serializer

build(data, target)
Parameters
Return type

object

abstract build_error(error)
abstract build_row(data)
Parameters

data (ValueData) –

Return type

object

create_labels(columns, mode)
Parameters
  • columns (dict) –

  • mode (int) –

Return type

dict

filter_value(v)
get_label(v, mode)
output(v)
output_begin(mode, args, rows)
Parameters
output_complete(mode, args, rows)
Parameters
  • mode (int) –

  • args (argparse.Namespace) –

  • rows (list) –

output_item(data)
Parameters

data (ValueData) –

output_message(msg)
output_result(v)
set_delimiter(delimiter)
Parameters

delimiter (str) –

set_status(data, target, args, skip)
Parameters
  • data (ValueData) –

  • target (Target) –

  • args (argparse.Namespace) –

  • skip (bool) –

set_survey_mode(survey_mode)
Parameters

survey_mode (int) –

transform(data)
Parameters

data (ValueData) –

transform_key_labels(data, mode)
Parameters

ipsurv.serializer.json_serializer module

class JsonSerializer(args)

Bases: ipsurv.serializer.serializer.Serializer

Description: https://deer-hunt.github.io/ipsurv/pages/ipsurv-cmd/program_architecture_classes.html#serializer

build_error(error)
build_row(data)
Parameters

data (ValueData) –

Return type

object

filter_value(v)
output(v)
output_begin(mode, args, rows)
Parameters
output_complete(mode, args, rows)
Parameters
  • mode (int) –

  • args (argparse.Namespace) –

  • rows (list) –

output_item(data)
Parameters

data (ValueData) –

output_message(msg)
transform_key_labels(data, mode)
Parameters

ipsurv.serializer.line_serializer module

class LineSerializer(args)

Bases: ipsurv.serializer.serializer.Serializer

Description: https://deer-hunt.github.io/ipsurv/pages/ipsurv-cmd/program_architecture_classes.html#serializer

build_error(error)
build_row(data)
Parameters

data (ValueData) –

Return type

object

filter_value(v)
output(v)
output_item(data)
Parameters

data (ValueData) –

output_message(msg)
transform(data)
Parameters

data (ValueData) –

transform_key_labels(data, mode)
Parameters
transform_status(data)
Parameters

data (ValueData) –