{"id":27148,"library":"mixbox","title":"mixbox","description":"Utility library providing shared functions and classes for the CybOX, MAEC, and STIX Python packages. Current version 1.0.5, in maintenance mode with no active development since 2018.","status":"maintenance","version":"1.0.5","language":"python","source_language":"en","source_url":"http://github.com/CybOXProject/mixbox","tags":["cyber-threat-intelligence","stix","cybox","maec","utility"],"install":[{"cmd":"pip install mixbox","lang":"bash","label":"Latest release"}],"dependencies":[{"reason":"XML parsing and generation (e.g., for STIX/MAEC documents)","package":"lxml","optional":false},{"reason":"Date/time parsing and manipulation","package":"python-dateutil","optional":false},{"reason":"Ordered set implementation used for ID generation","package":"ordered-set","optional":false}],"imports":[{"note":"Mixbox is a namespace package; use specific submodules","wrong":"","symbol":"Mixbox","correct":"from mixbox import idgen, namespaces, dates, errors, vizard"}],"quickstart":{"code":"from mixbox import idgen, namespaces, dates, errors\n\n# Generate a unique ID with a specified namespace\nnamespace = namespaces.get_namespace('myns')\nid_ = idgen.create_id(namespace)\nprint(id_)\n\n# Parse an ISO 8601 date string\ndt = dates.parse_date('2015-01-01T12:00:00Z')\nprint(dt)","lang":"python","description":"Basic usage of idgen, namespaces, and dates modules"},"warnings":[{"fix":"Migrate to the newer STIX/MAEC/CybOX libraries (e.g., stix2 for STIX 2.x).","message":"mixbox is in maintenance mode. New projects should use stix2, maec5, or cybox2 directly.","severity":"deprecated","affected_versions":"all"},{"fix":"Use namespaces.get_namespace(name) instead of treating the module as a dictionary.","message":"mixbox.namespaces is not a dict: do not iterate over it with .items() or .values(). Use namespace lookup functions instead.","severity":"gotcha","affected_versions":"all"},{"fix":"First obtain a namespace via namespaces.get_namespace('prefix') and then pass it to idgen.create_id().","message":"idgen.create_id() requires a namespace object (not a string). Passing a string will break.","severity":"gotcha","affected_versions":"all"},{"fix":"Avoid using vizard; use direct lxml manipulation or a dedicated validation library.","message":"The vizard submodule (vizard) is deprecated and may be removed in future releases.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: from mixbox import idgen","cause":"Trying to import idgen directly from mixbox instead of the subpackage.","error":"AttributeError: module 'mixbox' has no attribute 'idgen'"},{"fix":"ns = namespaces.get_namespace('your_prefix')\nid_ = idgen.create_id(ns)","cause":"Passing a string prefix to idgen.create_id() instead of a namespace object.","error":"TypeError: create_id() argument 1 must be mixbox.namespaces.Namespace, not str"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}