.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.enginelib.traits.EngineTraitsEncoder Class Reference
+ Inheritance diagram for searx.enginelib.traits.EngineTraitsEncoder:
+ Collaboration diagram for searx.enginelib.traits.EngineTraitsEncoder:

Public Member Functions

 default (self, o)
 

Detailed Description

Encodes :class:`EngineTraits` to a serializable object, see
:class:`json.JSONEncoder`.

Definition at line 25 of file traits.py.

Member Function Documentation

◆ default()

searx.enginelib.traits.EngineTraitsEncoder.default ( self,
o )
Return dictionary of a :class:`EngineTraits` object.

Definition at line 29 of file traits.py.

29 def default(self, o):
30 """Return dictionary of a :class:`EngineTraits` object."""
31 if isinstance(o, EngineTraits):
32 return o.__dict__
33 return super().default(o)
34
35
36@dataclasses.dataclass

References searx.enginelib.traits.EngineTraitsEncoder.default().

Referenced by searx.settings_defaults.SettingsDirectoryValue.__call__(), searx.settings_defaults.SettingsValue.__call__(), and searx.enginelib.traits.EngineTraitsEncoder.default().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: