1. Parsers: argonodes.parsers
Parsers are tools for converting data sources into a JSON format, usable by Argonodes.
There are different Parsers depending on the original source. Basically, Parsers should implement the dunder __call__
, that takes into account a parameter data_in
, which corresponds to, well, the data to parse. That data may be either a string, or a File object.
Basic usage: parser = Parser(); json_data = parser(data)
- class argonodes.parsers.CSVParser
Bases:
Parser
CSV to JSON.
- Parameters
data_in (str or File.) – The data source.
- class argonodes.parsers.JSONParser
Bases:
Parser
A default parser that will take JSON and produce JSON.
- Parameters
data_in (str or File.) – The data source.
- class argonodes.parsers.Parser
Bases:
ABC
Abstraction for every Parser.
- class argonodes.parsers.XMLParser
Bases:
Parser
XML to JSON.
Warning, it uses an external package that you should install first: pip install xmltodict.
- Parameters
data_in (str or File.) – The data source.
- class argonodes.parsers.ZIPParser(parser=None, regex=None, extension=None, mime=None, verbose=None)
Bases:
object