{"library":"python-docx-ml6","title":"python-docx-ml6: Microsoft Word .docx File Manipulation","description":"python-docx-ml6 is a Python library for creating, reading, and updating Microsoft Word 2007+ (.docx) files. It is a fork from the original `python-docx` library, specifically including feature requests provided by the open-source community that have not yet been merged into the upstream project. The current version is 1.0.2, released in November 2023, indicating an active development and maintenance cadence.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install python-docx-ml6"],"cli":null},"imports":["from docx import Document"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from docx import Document\nfrom docx.shared import Inches\n\n# Create a new document\ndocument = Document()\n\n# Add a heading\ndocument.add_heading('Document Title', level=0)\n\n# Add a paragraph\np = document.add_paragraph('A plain paragraph having some ')\np.add_run('bold').bold = True\np.add_run(' and some ')\np.add_run('italic.').italic = True\n\n# Add a heading with level 1\ndocument.add_heading('Heading, level 1', level=1)\n\n# Add a picture\ndocument.add_picture('path/to/image.png', width=Inches(1.25))\n\n# Add a table\nrecords = (\n    (3, '101', 'Spam'),\n    (7, '422', 'Eggs'),\n    (4, '631', 'Spam, eggs, and bacon'),\n)\n\ntable = document.add_table(rows=1, cols=3)\nhdr_cells = table.rows[0].cells\nhdr_cells[0].text = 'Qty'\nhdr_cells[1].text = 'Id'\nhdr_cells[2].text = 'Desc'\nfor qty, id, desc in records:\n    row_cells = table.add_row().cells\n    row_cells[0].text = str(qty)\n    row_cells[1].text = id\n    row_cells[2].text = desc\n\ndocument.add_page_break()\n\n# Save the document\ndocument.save('demo.docx')\nprint(\"Document 'demo.docx' created successfully.\")","lang":"python","description":"This quickstart demonstrates how to create a new Word document, add headings, paragraphs with formatted text (bold/italic), insert an image, and create a simple table. It then saves the document to a .docx file.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"1.0.2","pypi_latest":"1.0.2","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.1,"avg_import_s":0.18,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"python-docx-ml6","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.16,"mem_mb":6.7,"disk_size":"32.6M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"python-docx-ml6","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.2,"import_time_s":0.13,"mem_mb":6.7,"disk_size":"33M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"python-docx-ml6","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.26,"mem_mb":7.3,"disk_size":"34.6M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"python-docx-ml6","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.1,"import_time_s":0.23,"mem_mb":7.3,"disk_size":"35M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"python-docx-ml6","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.2,"mem_mb":7.2,"disk_size":"26.6M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"python-docx-ml6","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.9,"import_time_s":0.2,"mem_mb":7.2,"disk_size":"27M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"python-docx-ml6","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.19,"mem_mb":7.1,"disk_size":"26.3M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"python-docx-ml6","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2,"import_time_s":0.18,"mem_mb":7.1,"disk_size":"27M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"python-docx-ml6","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.15,"mem_mb":6.3,"disk_size":"32.1M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"python-docx-ml6","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.5,"import_time_s":0.13,"mem_mb":6.3,"disk_size":"33M"}]}}