Registry / devops / crudini

crudini

JSON →
library0.9.6pypypiunverified

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.

pip install crudini
INSTALL
IMPORT
SIG · CRUDINI
C
crudini
devopspythonv0.9.6
Install
1.7s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

None
# crudini is a command-line tool, not importable as a library
from crudini import ...
crudini is designed as a CLI tool and has no public Python API; attempting to import it will fail.

Use subprocess to invoke crudini; it has no Python importable API.

import subprocess import tempfile import os content = """[section] key = value """ with tempfile.NamedTemporaryFile(mode='w', suffix='.ini', delete=False) as f: f.write(content) fname = f.name try: subprocess.run(['crudini', '--get', fname, 'section', 'key'], check=True, capture_output=True, text=True) print('Get succeeds') except subprocess.CalledProcessError as e: print('Error:', e.stderr) finally: os.unlink(fname)
crudini --version
Debug
Known issues
gotchacrudini is not importable as a Python module. It is a CLI tool. Do not try `from crudini import something`.
fix
Use subprocess.run(['crudini', ...]) to call it from Python.
affects: all
gotchaIf the ini file doesn't exist and you use --set without --existing, crudini will create the file. The --existing flag prevents this.
fix
Use --existing=file if you want to enforce that the file already exists.
affects: 0.5+
gotchacrudini modifies files in-place; it does not output to stdout by default. Use --output or redirection carefully.
fix
Use `--output` flag or shell redirection to avoid unintended file modifications.
affects: all
breakingIn version 0.9, the --get command now maintains the case of parameter names. Previously it was lowercased.
fix
Ensure your script does not expect lowercased output from --get.
affects: 0.9+
Upgrade
Version history
0.9.6latest on PyPI · released Apr 16, 2025
Audit
Dependencies
python-iniparserequiredREQUIRED: used under the hood for ini parsing
Agent activity
4 hits · last 30 days
node
4
Resources
crudini — pip install crudini · libregistry