aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-01-19 14:21:30 -0600
committerGitHub <noreply@github.com>2020-01-19 14:21:30 -0600
commitd91a146198ea2f5e2ca0cfa45948913e878ff315 (patch)
tree0a33ecb1ca4ad9697c8e34673e73b4a076f39979
parentFix example heading that is too large (diff)
downloadconfig-file-d91a146198ea2f5e2ca0cfa45948913e878ff315.zip
Add section on using your own parser
Also, a sentence is added on what is exposed to the public API.
-rw-r--r--README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index de1fa99..bb76e0f 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,8 @@ $ pip install config_file
## Example
+The `config_file` package exposes `ConfigFile`, `ParsingError`, and `BaseParser` to the public API.
+
### Sample Configuration File
`config.ini`
@@ -120,3 +122,9 @@ config.reset()
config.reset(original_file_path="~/some_other_directory/this_is_actually_the_original.ini")
>>> True
```
+
+## Using your own parser
+
+> This feature is a work in-progress and has not been tested yet.
+
+You can still use config file, even if you don't use one of our supported configuration formats. The `ConfigFile` object swaps in the parser it needs based on the file format. However, the constructor takes in an optional `parser` argument that you can use to supply your own custom parser. The only requirement is that the parser must be a concrete implementation of `BaseParser`.