{"id":23173,"library":"stix","title":"stix - STIX Content API","description":"An API for parsing and generating Structured Threat Information Expression (STIX) content. Current version 1.2.0.11 is legacy, based on the older STIX 1.x standard; development has been superseded by stix2 for STIX 2.x. Low release cadence.","status":"maintenance","version":"1.2.0.11","language":"python","source_language":"en","source_url":"https://github.com/STIXProject/python-stix","tags":["stix","cyber threat intelligence","cti","xml","threat intelligence"],"install":[{"cmd":"pip install stix","lang":"bash","label":"Install stix from PyPI"}],"dependencies":[{"reason":"XML parsing and generation for STIX content","package":"lxml","optional":false},{"reason":"Date/time parsing","package":"python-dateutil","optional":false},{"reason":"CybOX objects used within STIX","package":"cybox","optional":true}],"imports":[{"wrong":"from stix.core import STIXPackage","symbol":"STIXPackage","correct":"from stix.core import STIXPackage"}],"quickstart":{"code":"from stix.core import STIXPackage\nfrom stix.utils import parse_xml\nimport os\n\nstix_xml = os.environ.get('STIX_XML', '<stix:STIXPackage xmlns:stix=\"http://stix.mitre.org/stix-1\" id=\"example:package-1\"><stix:STIX_Header><stix:Title>Example</stix:Title></stix:STIX_Header></stix:STIXPackage>')\npackage = parse_xml(stix_xml)\nprint(package.stix_header.title)","lang":"python","description":"Parse a STIX 1.x XML document and access the package title."},"warnings":[{"fix":"Install stix2 (`pip install stix2`) and import from stix2.","message":"stix library is for STIX 1.x only. For STIX 2.x, use the stix2 library. Using stix with STIX 2.x XML will fail.","severity":"gotcha","affected_versions":"all"},{"fix":"Migrate to the stix2 library for STIX 2.x compatibility.","message":"The stix library is no longer actively developed. New features and STIX 2.x support are only in stix2.","severity":"deprecated","affected_versions":">=1.2"},{"fix":"with open('file.xml', 'r') as f: package = parse_xml(f.read())","message":"parse_xml() expects a string, not a file path. Use open().read() or handle file reading separately.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1':27 '1.2.0.11':19 '2':38 'api':4,6 'base':22 'cadenc':42 'content':3,16 'cti':47 'current':17 'cyber':44 'develop':30 'express':14 'generat':10 'inform':13 'intellig':46,50 'legaci':21 'low':40 'older':25 'pars':8 'releas':41 'standard':29 'stix':1,2,15,26,37,43 'stix2':35 'structur':11 'supersed':33 'threat':12,45,49 'version':18 'x':28,39 'xml':48","created_at":"2026-05-01T06:02:48.478206+00:00","updated_at":"2026-05-01T06:02:48.478206+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmple2lp5wo/venv/lib/python3.12/site-packages/stix/__init__.py\", line 5, in <module>\n    from .base import (Entity, EntityList, TypedCollection, TypedList,  # noqa\n  File \"/tmp/tmple2lp5wo/venv/lib/python3.12/site"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.2.0.11","cli_name":"","cli_version":null,"type":"library","homepage":"https://stixproject.github.io/","github":"https://github.com/STIXProject/python-stix","docs":"https://stix.readthedocs.io/","changelog":null,"pypi":"https://pypi.org/project/stix/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","auth-security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}