{"id":24629,"library":"sphinxcontrib-datatemplates","title":"sphinxcontrib-datatemplates","description":"A Sphinx extension that renders data files (YAML, JSON, CSV, etc.) as nicely formatted HTML tables or custom templates. Current version 0.11.0, requires Python >=3.8, released periodically.","status":"active","version":"0.11.0","language":"python","source_language":"en","source_url":"https://github.com/collective/sphinxcontrib-datatemplates","tags":["sphinx","extension","data-files","templates","documentation"],"install":[{"cmd":"pip install sphinxcontrib-datatemplates","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"The extension runs as a Sphinx plugin; requires Sphinx >=2.0","package":"Sphinx","optional":false},{"reason":"Required for reading YAML data files","package":"PyYAML","optional":true},{"reason":"Used for Sphinx document transformation","package":"docutils","optional":true}],"imports":[{"note":"Common mistake: using underscore instead of dot in the module path","wrong":"from sphinxcontrib_datatemplates import setup","symbol":"setup","correct":"from sphinxcontrib.datatemplates import setup"}],"quickstart":{"code":"# conf.py\nimport os\nextensions = ['sphinxcontrib.datatemplates']\n# In any .rst file:\n# .. datatemplate:: path/to/data.yaml\n#    :template: table.rst.j2","lang":"python","description":"Activate the extension in conf.py, then use the datatemplate directive in reStructuredText to include data files rendered via Jinja2 templates."},"warnings":[{"fix":"Replace '.. data::' with '.. datatemplate::' in all .rst files.","message":"Version 0.6.0 renamed the directive from 'data' to 'datatemplate'. Old syntax using '.. data::' breaks; update to '.. datatemplate::'.","severity":"breaking","affected_versions":"<0.6.0"},{"fix":"Run 'make clean' after modifying data files, or use sphinx-autobuild.","message":"The extension does not automatically reload data files on each build; changes require a clean build. Use 'make clean' before rebuilding.","severity":"gotcha","affected_versions":"all"},{"fix":"Convert CSV data to JSON or YAML format.","message":"Support for CSV files may be removed in a future version; prefer JSON or YAML.","severity":"deprecated","affected_versions":">=0.10.0"}],"env_vars":null,"search_vec":"'0.11.0':25 '3.8':28 'csv':13 'current':23 'custom':21 'data':9,34 'data-fil':33 'datatempl':3 'document':37 'etc':14 'extens':6,32 'file':10,35 'format':17 'html':18 'json':12 'nice':16 'period':30 'python':27 'releas':29 'render':8 'requir':26 'sphinx':5,31 'sphinxcontrib':2 'sphinxcontrib-datatempl':1 'tabl':19 'templat':22,36 'version':24 'yaml':11","created_at":"2026-05-01T08:14:06.034343+00:00","updated_at":"2026-05-01T08:14:06.034343+00:00","problems":[{"fix":"Install with 'pip install sphinxcontrib-datatemplates' and check ext_list: ['sphinxcontrib.datatemplates'] (dot, not underscore).","cause":"Missing package or misspelled extension name in conf.py.","error":"Extension error: Could not import extension sphinxcontrib.datatemplates"},{"fix":"Ensure 'sphinxcontrib.datatemplates' is in extensions list in conf.py and that you are using the correct directive name (not 'data').","cause":"Sphinx does not recognize the directive; extension possibly not loaded.","error":"Directive 'datatemplate' is not registered"},{"fix":"Place template in source directory or provide absolute/relative path from conf.py directory.","cause":"The specified Jinja2 template path is incorrect or missing.","error":"Template 'table.rst.j2' not found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.11.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://sphinxcontribdatatemplates.readthedocs.io/en/latest/","github":"http://github.com/sphinx-contrib/datatemplates","docs":null,"changelog":null,"pypi":"https://pypi.org/project/sphinxcontrib-datatemplates/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}