{"library":"xgrammar","type":"library","category":null,"description":"xgrammar is a Python library focused on efficient, flexible, and portable structured generation, primarily for Large Language Models (LLMs). It allows defining output constraints using grammars (e.g., JSON schema) to ensure LLM outputs conform to specific formats. It is under active development, with frequent minor releases providing new features and performance improvements.","language":"python","status":"active","version":"0.1.33","tags":["LLM","grammar","structured generation","json","python","mlc-ai"],"last_verified":"Wed May 20","install":[{"cmd":"pip install xgrammar","imports":["from xgrammar.dfa import JsonSchemaConverter","from xgrammar.dfa import Grammar","from xgrammar.dfa import TagDispatch"]}],"homepage":"https://xgrammar.mlc.ai/","github":"https://github.com/mlc-ai/xgrammar","docs":null,"changelog":null,"pypi":"https://pypi.org/project/xgrammar/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"3.10–3.9","success_rate":20,"avg_install_s":81.5,"avg_import_s":null,"wheel_type":"wheel"},"url":"https://checklist.day/v1/registry/xgrammar/compatibility"}}