{"id":23059,"library":"cybox","title":"cybox","description":"A Python library for parsing and generating CybOX (Cyber Observable eXpression) content. Version 2.1.0.21 is the latest. The library is in maintenance mode with infrequent releases.","status":"maintenance","version":"2.1.0.21","language":"python","source_language":"en","source_url":"https://github.com/CybOXProject/python-cybox","tags":["cybox","stix","observables","cti","cybersecurity"],"install":[{"cmd":"pip install cybox","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"XML parsing and generation","package":"lxml","optional":false}],"imports":[{"note":"CybOX is in the core module, not top-level","wrong":"from cybox import CybOX","symbol":"CybOX","correct":"from cybox.core import CybOX"}],"quickstart":{"code":"from cybox.core import CybOX\nfrom cybox.objects import build_object\n\ncybox = CybOX()\nobj = build_object({'type': 'File', 'name': 'test.txt'})\ncybox.add(obj)\nprint(cybox.to_xml())","lang":"python","description":"Creates a CybOX document, adds a File object, and prints XML."},"warnings":[{"fix":"Use stix2 library instead (pip install stix2).","message":"cybox is in maintenance mode; prefer the STIX 2 Python library for new projects.","severity":"deprecated","affected_versions":"all"},{"fix":"Update imports to match current module structure, e.g., from cybox.objects import build_object.","message":"Import paths changed between versions. Older code may use 'cybox.common' but now objects are in 'cybox.objects'.","severity":"gotcha","affected_versions":"<2.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: from cybox.core import CybOX","cause":"Using wrong import path: from cybox import CybOX","error":"ImportError: cannot import name 'CybOX'"},{"fix":"Run: pip install cybox","cause":"Library not installed or installed under different name.","error":"ModuleNotFoundError: No module named 'cybox'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}