{"id":27390,"library":"shared","title":"Shared","description":"A Python library for data exchange and persistence using human-readable files. It provides a simple interface to save and load Python objects as JSON or YAML files. Current version is 0.0.32 (pre-release), with infrequent releases.","status":"active","version":"0.0.32","language":"python","source_language":"en","source_url":"https://github.com/pyrustic/shared","tags":["data-exchange","persistence","human-readable","json","yaml"],"install":[{"cmd":"pip install shared","lang":"bash","label":"PyPI install"}],"dependencies":[],"imports":[{"note":"Main class for data exchange.","symbol":"Shared","correct":"from shared import Shared"}],"quickstart":{"code":"from shared import Shared\n\n# Create a Shared instance with a file path\nshared = Shared('config')\n# Save a dictionary\nshared.save({'key': 'value'})\n# Load the data\ndata = shared.load()\nprint(data)","lang":"python","description":"Basic usage: save and load Python dictionaries to/from human-readable files."},"warnings":[{"fix":"Pin version: shared==0.0.32","message":"The library is in pre-release (0.0.x) and API may change significantly between versions. Pin your dependency to avoid breakage.","severity":"deprecated","affected_versions":"<1.0.0"},{"fix":"Check file existence manually before calling save() or use a unique filename.","message":"Shared silently overwrites existing files without warning. Ensure you have backups or use a different directory.","severity":"gotcha","affected_versions":"all"},{"fix":"Install PyYAML: pip install pyyaml, then use .yaml extension.","message":"Default serialization uses JSON. For YAML support, you must install PyYAML separately; otherwise, save will raise an error if the extension is .yaml.","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":"Run: pip install shared","cause":"Library not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'shared'"},{"fix":"Use: from shared import Shared","cause":"Wrong import path; some users try 'import shared' directly.","error":"AttributeError: module 'shared' has no attribute 'Shared'"},{"fix":"Install PyYAML: pip install pyyaml","cause":"Trying to load a YAML file without PyYAML installed.","error":"yaml.YAMLError: could not determine a constructor for the tag 'tag:yaml.org,2002:...'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}