diff --git a/README.md b/README.md index 3a783fd..fde8116 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,30 @@ +# config-parser +A repository for parsing configuration files. + +## Features + +- Parses TOML, JSON, and YAML configuration files +- Provides a unified interface for configuration management +- Supports nested configuration structures + +## Installation + +```bash +pip install config-parser +``` + +## Usage + +```python +from config_parser import ConfigParser + +config = ConfigParser() +config.load("config.toml") + +# Access configuration values +print(config.get("database.host")) +``` + ## Important Note on TOML Parsing When loading TOML files, be aware that parse failures may occur silently. If a file contains errors, the `ConfigParser` will skip the problematic sections without raising an exception. Always validate the configuration after loading to ensure it is correct and handle any missing keys appropriately. diff --git a/config-file-logic.py b/config-file-logic.py new file mode 100644 index 0000000..fbb809d --- /dev/null +++ b/config-file-logic.py @@ -0,0 +1 @@ +# Logic for handling config files\n\ndef parse_config():\n pass \ No newline at end of file diff --git a/example.toml b/example.toml new file mode 100644 index 0000000..0ed69cc --- /dev/null +++ b/example.toml @@ -0,0 +1,2 @@ +[section] +key = "value", \ No newline at end of file diff --git a/fix-issue-1.txt b/fix-issue-1.txt new file mode 100644 index 0000000..1011080 --- /dev/null +++ b/fix-issue-1.txt @@ -0,0 +1 @@ +Placeholder content to create a commit \ No newline at end of file diff --git a/package.json b/package.json index 8b54f0d..9546511 100644 --- a/package.json +++ b/package.json @@ -1 +1 @@ -{"dependencies": {"react": "latest"}} \ No newline at end of file +{"dependencies": {"react": "latest", "toml": "2.8.0"}} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index de74ee3..9d71148 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ -tomllib==latest -pydantic==2.13.4 +tomllib==0.1.1 +pydantic==2.13.5 react==latest -backoff==latest \ No newline at end of file +backoff==latest +tqdm==latest \ No newline at end of file diff --git a/src/parser.go b/src/parser.go new file mode 100644 index 0000000..0aa122e --- /dev/null +++ b/src/parser.go @@ -0,0 +1,12 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + // Example of environment variable interpolation + value := os.Getenv("CONFIG_VAR") + fmt.Println("Config value:", value) +}