Base parser

class freedictionaryapi.parsers.base_parser.BaseDictionaryApiParser(response: Any)[source]

Bases: abc.ABC

Implements base abstract dictionary API parser.

Supposed to be inherited by other dictionary API parsers.

__init__(response: Any)None[source]

Init base dictionary API parser instance.

Parameters

response (Any) – API JSON response loaded in python object

abstract property data: dict

Response data. Actually, dict of API response. API response object is not always a dict.

To make sure that in ParsedObject instances we use dict here is this property.

Returns

response data for parsing

Return type

dict

property response: Any
Returns

API JSON response loaded in python object

Return type

Any