{"id":24485,"library":"pyxb","title":"PyXB","description":"PyXB is a Python package for generating XML schema (XSD) bindings. Version 1.2.6 is the latest stable release. Development appears to be in maintenance mode with infrequent updates.","status":"maintenance","version":"1.2.6","language":"python","source_language":"en","source_url":"https://github.com/pabigot/pyxb","tags":["xml","schema","binding","xsd"],"install":[{"cmd":"pip install pyxb","lang":"bash","label":"Install PyXB from PyPI"}],"dependencies":[],"imports":[{"note":"CreateFromDocument is in pyxb.binding, not in pyxb top-level","wrong":"from pyxb import CreateFromDocument","symbol":"CreateFromDocument","correct":"from pyxb.utils.domutils import BindingDOMSupport\nfrom pyxb.binding import CreateFromDocument"},{"note":"BIND is in pyxb.binding submodule","wrong":"from pyxb import BIND","symbol":"BIND","correct":"from pyxb.binding import BIND"}],"quickstart":{"code":"import pyxb\nfrom pyxb.binding import BIND\n# Load schema\nxmlschema = pyxb.GlobalBindings()\nprint('PyXB loaded successfully')","lang":"python","description":"Basic import test for PyXB."},"warnings":[{"fix":"Consider using PyXB‑b (a fork) or transition to xmlschema / lxml.","message":"PyXB uses the deprecated 'from xml.etree import ElementTree' internally. Python 3.9+ raises deprecation warnings.","severity":"deprecated","affected_versions":">=1.2.6"},{"fix":"Always call 'pyxb.namespace.Namespace.ImportNamespace()' for custom prefixes.","message":"Namespace handling is fragile: use fully qualified local names in bindings and always register namespaces explicitly.","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":"Use 'from pyxb.binding import CreateFromDocument'","cause":"Incorrect import path; CreateFromDocument is in pyxb.binding.","error":"ImportError: cannot import name 'CreateFromDocument' from 'pyxb'"},{"fix":"Use 'from pyxb.binding import BIND'","cause":"BIND is not a top-level symbol; it's in pyxb.binding.","error":"AttributeError: module 'pyxb' has no attribute 'BIND'"},{"fix":"Validate your XML with lxml before passing to PyXB.","cause":"PyXB's internal DOM binding is strict; ensure XML is fully valid and well-formed.","error":"xml.etree.ElementTree.ParseError: not well-formed (invalid token)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}