diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..620e414 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dist/ +src/*.egg-info/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6ded6b4 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,8 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "config-parser" +version = "0.1.0" +description = "A configuration file parser." \ No newline at end of file diff --git a/config_parser.py b/src/config_parser/__init__.py similarity index 94% rename from config_parser.py rename to src/config_parser/__init__.py index f87b28c..70aa217 100644 --- a/config_parser.py +++ b/src/config_parser/__init__.py @@ -32,6 +32,8 @@ def compress_conf(conf): return conf.strip() def parse_ini(conf): + '''Parses INI configuration from a string and returns a nested dictionary.''' + conf = compress_conf(conf) result = {} current_group = {} diff --git a/src/config_parser/__main__.py b/src/config_parser/__main__.py new file mode 100644 index 0000000..e69de29