{"id":23470,"library":"crudini","title":"crudini","description":"A command-line utility for manipulating INI configuration files. It can get, set, delete, and merge values in sections. Current version: 0.9.6, released 2021-03. Maintenance-focused, low release cadence.","status":"active","version":"0.9.6","language":"python","source_language":"en","source_url":"https://github.com/pixelb/crudini","tags":["ini","configuration","cli","utilities"],"install":[{"cmd":"pip install crudini","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"REQUIRED: used under the hood for ini parsing","package":"python-iniparse","optional":false}],"imports":[{"note":"crudini is designed as a CLI tool and has no public Python API; attempting to import it will fail.","wrong":"from crudini import ...","symbol":"None","correct":"# crudini is a command-line tool, not importable as a library"}],"quickstart":{"code":"import subprocess\nimport tempfile\nimport os\n\ncontent = \"\"\"[section]\nkey = value\n\"\"\"\nwith tempfile.NamedTemporaryFile(mode='w', suffix='.ini', delete=False) as f:\n    f.write(content)\n    fname = f.name\n\ntry:\n    subprocess.run(['crudini', '--get', fname, 'section', 'key'], check=True, capture_output=True, text=True)\n    print('Get succeeds')\nexcept subprocess.CalledProcessError as e:\n    print('Error:', e.stderr)\nfinally:\n    os.unlink(fname)","lang":"python","description":"Use subprocess to invoke crudini; it has no Python importable API."},"warnings":[{"fix":"Use subprocess.run(['crudini', ...]) to call it from Python.","message":"crudini is not importable as a Python module. It is a CLI tool. Do not try `from crudini import something`.","severity":"gotcha","affected_versions":"all"},{"fix":"Use --existing=file if you want to enforce that the file already exists.","message":"If the ini file doesn't exist and you use --set without --existing, crudini will create the file. The --existing flag prevents this.","severity":"gotcha","affected_versions":"0.5+"},{"fix":"Use `--output` flag or shell redirection to avoid unintended file modifications.","message":"crudini modifies files in-place; it does not output to stdout by default. Use --output or redirection carefully.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure your script does not expect lowercased output from --get.","message":"In version 0.9, the --get command now maintains the case of parameter names. Previously it was lowercased.","severity":"breaking","affected_versions":"0.9+"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Call it via `subprocess.run(['crudini', ...])` or install it via pip and invoke as `crudini` in shell.","cause":"crudini is not a Python importable module; it is a command-line script.","error":"ImportError: No module named crudini"},{"fix":"Verify the key exists or use --set to add it first.","cause":"Trying to --get a key that doesn't exist in the section.","error":"ERROR: [section] parameter 'key' does not exist"},{"fix":"Check file path and permissions; use --existing=file if you want crudini to require the file.","cause":"File does not exist or permissions issue.","error":"Failed to open file: /path/to/file.ini"},{"fix":"Provide a filename after --output, e.g., `--output new.ini`.","cause":"Missing value for --output flag.","error":"crudini: error: argument --output: expected one argument"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}