{"id":27064,"library":"interchange","title":"interchange","description":"A Python library providing data types and interchange formats (JSON, YAML, XML, etc.) with a focus on seamless conversion between them. Current version is 2021.0.4, released in 2021. The library is in maintenance mode with no active development.","status":"maintenance","version":"2021.0.4","language":"python","source_language":"en","source_url":"https://github.com/py2neo-org/interchange","tags":["data-interchange","json","yaml","xml","data-types","py2neo"],"install":[{"cmd":"pip install interchange","lang":"bash","label":"Latest release"}],"dependencies":[],"imports":[{"note":"DataTypes is at the top level, not in a submodule.","wrong":"from interchange.data_types import DataTypes","symbol":"DataTypes","correct":"from interchange import DataTypes"},{"note":"convert is a function, not a module.","wrong":"import interchange.convert","symbol":"convert","correct":"from interchange import convert"}],"quickstart":{"code":"from interchange import DataTypes, convert\n\n# Convert a dict to JSON string\ndata = {\"name\": \"example\"}\njson_str = convert(data, DataTypes.JSON)\nprint(json_str)\n\n# Parse JSON back to dict\nparsed = convert(json_str, DataTypes.DICT)\nprint(parsed)","lang":"python","description":"Basic usage of convert() to transform between data formats."},"warnings":[{"fix":"Consider migrating to modern alternatives like pydantic or json.dumps for simple cases.","message":"The library is in maintenance mode and no longer actively developed. Future Python versions (e.g., 3.12+) may break due to missing updates.","severity":"deprecated","affected_versions":">=2021.0.0"},{"fix":"Test your specific data shapes thoroughly before relying on interchange in production.","message":"The convert() function may not handle all edge cases (e.g., nested custom objects). It is designed for simple types.","severity":"gotcha","affected_versions":"all"},{"fix":"Use a virtual environment with Python 3.8 or 3.9 if you must use this library.","message":"The library does not support Python 3.10+ officially; it was last tested on Python 3.8.","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":"Use 'from interchange import DataTypes'.","cause":"Incorrect import path (e.g., from interchange.data_types import DataTypes) but DataTypes is not a submodule.","error":"AttributeError: module 'interchange' has no attribute 'DataTypes'"},{"fix":"Wrap the list in a dict like {'data': my_list} or use a different approach.","cause":"The convert() function expects a specific input type depending on target format. Lists may not be directly convertible to some formats.","error":"TypeError: convert() argument 1 must be a string or dict, not list"},{"fix":"Ensure you have version >=2021.0.0: pip install --upgrade interchange","cause":"Old versions of interchange may not have the convert function, or package installation is corrupted.","error":"ImportError: cannot import name 'convert' from 'interchange'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}