{"id":22392,"library":"sphobjinv","title":"sphobjinv","description":"Sphinx objects.inv Inspection/Manipulation Tool. Version 2.4 (requires Python >=3.10). Enables introspection and modification of Sphinx inventories, including conversion to/from JSON, HTML, and Text. Last release: v2.4 (2025-04-01). Release cadence: irregular.","status":"active","version":"2.4","language":"python","source_language":"en","source_url":"https://github.com/bskinn/sphobjinv","tags":["sphinx","inventory","documentation","tool"],"install":[{"cmd":"pip install sphobjinv","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTPS certificate validation for remote inventory fetching","package":"certifi","optional":false},{"reason":"JSON schema validation for inventory JSON format","package":"jsonschema","optional":false},{"reason":"CLI tool to generate objects.inv (optional if only inspecting existing inventories)","package":"sphinx","optional":true}],"imports":[{"note":"Pre-v2.0 used a different module layout; now Inventory is directly importable from the top-level package.","wrong":"from sphobjinv.inv import Inventory","symbol":"Inventory","correct":"from sphobjinv import Inventory"},{"note":"","wrong":"","symbol":"DataObjStr","correct":"from sphobjinv import DataObjStr"}],"quickstart":{"code":"from sphobjinv import Inventory\n\n# Load a remote inventory (e.g., from Python docs)\nurl = \"https://docs.python.org/3/objects.inv\"\ninv = Inventory(url=url)\nprint(f\"Loaded {len(inv.objects)} objects from {inv.project}\")\n\n# Convert to JSON and print first object\ndata = inv.json()\nprint(data[:100])","lang":"python","description":"Quick example: load a remote Sphinx objects.inv and inspect it."},"warnings":[{"fix":"Use Inventory class from top-level sphobjinv. Refer to migration guide in docs.","message":"In v2.0, the API was overhauled: Inventory class replaced old inv module, many functions renamed. Code written for v1.x is not compatible.","severity":"breaking","affected_versions":">=2.0,<2.0"},{"fix":"Set the environment variable REQUESTS_CA_BUNDLE to a custom CA bundle, or use a local file path instead of URL.","message":"Remote inventory URLs must be HTTPS. HTTP is blocked in v2.4 due to certifi enforcement; fails with requests.exceptions.SSLError if using custom CA or proxies.","severity":"gotcha","affected_versions":">=2.4"},{"fix":"Call inv.load() explicitly if you want tight control over download timing.","message":"Inventory objects are lazily loaded from URL; iteration or len() triggers download and parsing. That may delay first access.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'-01':30 '-04':29 '2.4':7 '2025':28 '3.10':10 'cadenc':32 'convers':19 'document':36 'enabl':11 'html':22 'includ':18 'inspection/manipulation':4 'introspect':12 'inventori':17,35 'irregular':33 'json':21 'last':25 'modif':14 'objects.inv':3 'python':9 'releas':26,31 'requir':8 'sphinx':2,16,34 'sphobjinv':1 'text':24 'to/from':20 'tool':5,37 'v2.4':27 'version':6","created_at":"2026-04-27T17:04:56.766123+00:00","updated_at":"2026-04-27T17:04:56.766123+00:00","problems":[{"fix":"Call inv.load() first, or access after invoking a property that triggers load: len(inv) or list(inv.objects).","cause":"Trying to access inv.project before the inventory has been fully loaded (lazy load).","error":"KeyError: 'project'"},{"fix":"Set environment variable REQUESTS_CA_BUNDLE to the appropriate CA bundle path, or use a local file path for the inventory.","cause":"Default requests SSL verification fails due to corporate proxy or custom CA.","error":"requests.exceptions.SSLError: HTTPSConnectionPool(host='...')"},{"fix":"Use: from sphobjinv import Inventory","cause":"Importing from obsolete module path.","error":"ModuleNotFoundError: No module named 'sphobjinv.inv'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.4","cli_name":"sphobjinv","cli_version":"","type":"library","homepage":null,"github":"https://github.com/bskinn/sphobjinv","docs":"https://sphobjinv.readthedocs.io/en/stable/","changelog":"https://github.com/bskinn/sphobjinv/blob/main/CHANGELOG.md","pypi":"https://pypi.org/project/sphobjinv/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}