{"library":"defusedcsv","type":"library","category":null,"description":"defusedcsv is a Python library (version 3.0.0) that acts as a drop-in replacement for the standard library's `csv` module, specifically designed to mitigate CSV injection attacks. It works by sanitizing output, prepending an apostrophe to cells that start with potentially malicious characters like `=`, `+`, `-`, `@`, `|`, or `%`, and escaping `|` characters within these cells. This prevents spreadsheet software (like MS Excel or LibreOffice) from interpreting the cell content as a formula. The library's release cadence appears to be infrequent, with the latest version published to PyPI on September 2, 2025.","language":"python","status":"active","version":"3.0.0","tags":["security","csv","injection-prevention","data-sanitization"],"last_verified":"Thu May 21","install":[{"cmd":"pip install defusedcsv","imports":["from defusedcsv import csv"]}],"homepage":null,"github":"https://github.com/raphaelm/defusedcsv","docs":null,"changelog":null,"pypi":"https://pypi.org/project/defusedcsv/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":1.7,"avg_import_s":0,"wheel_type":"wheel"},"url":"https://checklist.day/v1/registry/defusedcsv/compatibility"}}