{"id":27105,"library":"kvf","title":"kvf","description":"A Python library for reading and writing key-value files with sections, similar to INI but with a simpler format. Current version 0.0.3, early development stage.","status":"active","version":"0.0.3","language":"python","source_language":"en","source_url":"https://github.com/pyrustic/kvf","tags":["key-value","file-format","sections","configuration"],"install":[{"cmd":"pip install kvf","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Primary function to parse a kvf file.","symbol":"read","correct":"from kvf import read"},{"note":"Primary function to write a kvf file.","symbol":"write","correct":"from kvf import write"}],"quickstart":{"code":"from kvf import read, write\n\n# Example data: sections with key-value pairs\ndata = {\n    'section1': {'key1': 'value1', 'key2': 'value2'},\n    'section2': {'key3': 'value3'}\n}\n\n# Write to a file\nwrite('example.kvf', data)\n\n# Read back\nloaded = read('example.kvf')\nprint(loaded)\n# Output: {'section1': {'key1': 'value1', 'key2': 'value2'}, 'section2': {'key3': 'value3'}}","lang":"python","description":"Basic usage: write a dictionary with sections to a file, then read it back."},"warnings":[{"fix":"Pin version in requirements and test thoroughly.","message":"The library is very early (0.0.3) and may have breaking changes without notice.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure the input data has the correct structure (dict of dicts).","message":"No built-in validation: malformed files may lead to unexpected behavior or errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Check that the section name is correct or use .get() to avoid KeyError.","cause":"Attempting to access a section that does not exist in the parsed data.","error":"KeyError: 'section_name'"},{"fix":"Provide the data dictionary as the second argument: write('file.kvf', data).","cause":"Calling write() without providing the data argument.","error":"TypeError: write() missing 1 required positional argument: 'data'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}