Problem
Docserv is orchestrated through a docserv.ini file which contains all the options for the server and its targets.
The file src/docserv/docserv.py contains the class DocservConfig with the method parse_config() method. It reads such INI file and transforms it into a Python dictionary, validates the structure, converts data types, replaces placeholders etc.
The problem with this method is, it's very long, complicated and hard to maintain.
Possible Solution
The code has to be replaced by something more elaborate. We should delegate this to a project that can validate this structure.
Possible projects to consider:
Comparison of Solutions
| Project |
Doc |
Learning |
| jsonschema |
extensive and detailed |
Steeper (JSON Schema standard) |
| Cerberus |
Clear & straightforward |
Easy & intuitive |
| marshmallow |
Comprehensive, plenty of examples, FAQ, Guides |
Moderate |
| pydantic |
Excellent, lots of examples |
Easy to moderate |
| schema |
Sufficient |
Easy |
Problem
Docserv is orchestrated through a
docserv.inifile which contains all the options for the server and its targets.The file
src/docserv/docserv.pycontains the classDocservConfigwith the methodparse_config()method. It reads such INI file and transforms it into a Python dictionary, validates the structure, converts data types, replaces placeholders etc.The problem with this method is, it's very long, complicated and hard to maintain.
Possible Solution
The code has to be replaced by something more elaborate. We should delegate this to a project that can validate this structure.
Possible projects to consider:
schema, no doc availablejsonschema, doccerberus, docmarshmallow, docpydantic, docComparison of Solutions