python-docx


Namepython-docx JSON
Version 1.1.0 PyPI version JSON
download
home_page
SummaryCreate, read, and update Microsoft Word .docx files.
upload_time2023-11-04 00:21:25
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT
keywords docx office openxml word
VCS
bugtrack_url
requirements lxml typing-extensions
Travis-CI
coveralls test coverage No coveralls.
            # python-docx

*python-docx* is a Python library for reading, creating, and updating Microsoft Word 2007+ (.docx) files.

## Installation

```
pip install python-docx
```

## Example

```python
>>> from docx import Document

>>> document = Document()
>>> document.add_paragraph("It was a dark and stormy night.")
<docx.text.paragraph.Paragraph object at 0x10f19e760>
>>> document.save("dark-and-stormy.docx")

>>> document = Document("dark-and-stormy.docx")
>>> document.paragraphs[0].text
'It was a dark and stormy night.'
```

More information is available in the [python-docx documentation](https://python-docx.readthedocs.org/en/latest/)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "python-docx",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "docx,office,openxml,word",
    "author": "",
    "author_email": "Steve Canny <stcanny@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3c/82/eb6c794e61b7060d465a23917161da4ab554dccce07a3b44a0d69a61ea7d/python-docx-1.1.0.tar.gz",
    "platform": null,
    "description": "# python-docx\n\n*python-docx* is a Python library for reading, creating, and updating Microsoft Word 2007+ (.docx) files.\n\n## Installation\n\n```\npip install python-docx\n```\n\n## Example\n\n```python\n>>> from docx import Document\n\n>>> document = Document()\n>>> document.add_paragraph(\"It was a dark and stormy night.\")\n<docx.text.paragraph.Paragraph object at 0x10f19e760>\n>>> document.save(\"dark-and-stormy.docx\")\n\n>>> document = Document(\"dark-and-stormy.docx\")\n>>> document.paragraphs[0].text\n'It was a dark and stormy night.'\n```\n\nMore information is available in the [python-docx documentation](https://python-docx.readthedocs.org/en/latest/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Create, read, and update Microsoft Word .docx files.",
    "version": "1.1.0",
    "project_urls": {
        "Changelog": "https://github.com/python-openxml/python-docx/blob/master/HISTORY.rst",
        "Documentation": "https://python-docx.readthedocs.org/en/latest/",
        "Homepage": "https://github.com/python-openxml/python-docx",
        "Repository": "https://github.com/python-openxml/python-docx"
    },
    "split_keywords": [
        "docx",
        "office",
        "openxml",
        "word"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5fd86948f7ac00edf74bfa52b3c5e3073df20284bec1db466d13e668fe991707",
                "md5": "49ed59c5b7da156237d3a2a2cb240703",
                "sha256": "bac9773278098a1ddc43a52d84e22f5909c4a3080a624530b3ecb3771b07c6cd"
            },
            "downloads": -1,
            "filename": "python_docx-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "49ed59c5b7da156237d3a2a2cb240703",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 239604,
            "upload_time": "2023-11-04T00:21:17",
            "upload_time_iso_8601": "2023-11-04T00:21:17.894757Z",
            "url": "https://files.pythonhosted.org/packages/5f/d8/6948f7ac00edf74bfa52b3c5e3073df20284bec1db466d13e668fe991707/python_docx-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c82eb6c794e61b7060d465a23917161da4ab554dccce07a3b44a0d69a61ea7d",
                "md5": "5eec0cce48aa886d5a4f72337b3d08a8",
                "sha256": "5829b722141cf1ab79aedf0c34d9fe9924b29764584c0f2164eb2b02dcdf17c9"
            },
            "downloads": -1,
            "filename": "python-docx-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5eec0cce48aa886d5a4f72337b3d08a8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 5650988,
            "upload_time": "2023-11-04T00:21:25",
            "upload_time_iso_8601": "2023-11-04T00:21:25.875388Z",
            "url": "https://files.pythonhosted.org/packages/3c/82/eb6c794e61b7060d465a23917161da4ab554dccce07a3b44a0d69a61ea7d/python-docx-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-04 00:21:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "python-openxml",
    "github_project": "python-docx",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "lxml",
            "specs": [
                [
                    ">=",
                    "3.1.0"
                ]
            ]
        },
        {
            "name": "typing-extensions",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "python-docx"
}
        
Elapsed time: 0.25132s