python-docx-oss 0.1.0rc1__py3-none-any.whl → 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- docx/__init__.py +1 -1
- docx/api.py +6 -3
- docx/document.py +12 -0
- docx/image/constants.py +1 -0
- docx/image/emf.py +2 -3
- docx/opc/rel.py +5 -0
- docx/parts/customxml.py +12 -7
- docx/parts/document.py +20 -2
- python_docx_oss-0.2.0.dist-info/METADATA +218 -0
- {python_docx_oss-0.1.0rc1.dist-info → python_docx_oss-0.2.0.dist-info}/RECORD +13 -13
- {python_docx_oss-0.1.0rc1.dist-info → python_docx_oss-0.2.0.dist-info}/WHEEL +1 -1
- python_docx_oss-0.1.0rc1.dist-info/METADATA +0 -57
- {python_docx_oss-0.1.0rc1.dist-info → python_docx_oss-0.2.0.dist-info}/licenses/LICENSE +0 -0
- {python_docx_oss-0.1.0rc1.dist-info → python_docx_oss-0.2.0.dist-info}/top_level.txt +0 -0
docx/__init__.py
CHANGED
docx/api.py
CHANGED
|
@@ -5,6 +5,7 @@ Provides a syntactically more convenient API for interacting with the OpcPackage
|
|
|
5
5
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
|
+
import io
|
|
8
9
|
import os
|
|
9
10
|
from typing import IO, TYPE_CHECKING, cast
|
|
10
11
|
|
|
@@ -16,18 +17,20 @@ if TYPE_CHECKING:
|
|
|
16
17
|
from docx.parts.document import DocumentPart
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
def Document(docx: str | IO[bytes] | None = None) -> DocumentObject:
|
|
20
|
+
def Document(docx: str | bytes | IO[bytes] | None = None) -> DocumentObject:
|
|
20
21
|
"""Return a |Document| object loaded from `docx`, where `docx` can be either a path
|
|
21
|
-
to a ``.docx`` file
|
|
22
|
+
to a ``.docx`` file, raw DOCX bytes, or a binary file-like object.
|
|
22
23
|
|
|
23
24
|
If `docx` is missing or ``None``, the built-in default document "template" is
|
|
24
25
|
loaded.
|
|
25
26
|
"""
|
|
26
27
|
docx = _default_docx_path() if docx is None else docx
|
|
28
|
+
source_name = "<bytes>" if isinstance(docx, bytes) else docx
|
|
29
|
+
docx = io.BytesIO(docx) if isinstance(docx, bytes) else docx
|
|
27
30
|
document_part = cast("DocumentPart", Package.open(docx).main_document_part)
|
|
28
31
|
if document_part.content_type != CT.WML_DOCUMENT_MAIN:
|
|
29
32
|
tmpl = "file '%s' is not a Word file, content type is '%s'"
|
|
30
|
-
raise ValueError(tmpl % (
|
|
33
|
+
raise ValueError(tmpl % (source_name, document_part.content_type))
|
|
31
34
|
return document_part.document
|
|
32
35
|
|
|
33
36
|
|
docx/document.py
CHANGED
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
|
+
import io
|
|
8
9
|
from typing import IO, TYPE_CHECKING, Iterator, List, Sequence
|
|
9
10
|
|
|
11
|
+
from docx.api import Document as open_document
|
|
10
12
|
from docx.blkcntnr import BlockItemContainer
|
|
11
13
|
from docx.enum.section import WD_SECTION
|
|
12
14
|
from docx.enum.text import WD_BREAK
|
|
@@ -182,6 +184,10 @@ class Document(ElementProxy):
|
|
|
182
184
|
"""A |CoreProperties| object providing Dublin Core properties of document."""
|
|
183
185
|
return self._part.core_properties
|
|
184
186
|
|
|
187
|
+
def copy(self) -> Document:
|
|
188
|
+
"""Return an independent in-memory snapshot of this document."""
|
|
189
|
+
return open_document(io.BytesIO(self.to_bytes()))
|
|
190
|
+
|
|
185
191
|
@property
|
|
186
192
|
def custom_properties(self) -> CustomProperties:
|
|
187
193
|
"""A |CustomProperties| object providing custom properties of document."""
|
|
@@ -249,6 +255,12 @@ class Document(ElementProxy):
|
|
|
249
255
|
"""
|
|
250
256
|
return self._body.tables
|
|
251
257
|
|
|
258
|
+
def to_bytes(self) -> bytes:
|
|
259
|
+
"""Serialize this document as a complete in-memory DOCX package."""
|
|
260
|
+
with io.BytesIO() as stream:
|
|
261
|
+
self.save(stream)
|
|
262
|
+
return stream.getvalue()
|
|
263
|
+
|
|
252
264
|
@property
|
|
253
265
|
def _block_width(self) -> Length:
|
|
254
266
|
"""A |Length| object specifying the space between margins in last section."""
|
docx/image/constants.py
CHANGED
docx/image/emf.py
CHANGED
|
@@ -13,7 +13,7 @@ class Emf(BaseImageHeader):
|
|
|
13
13
|
@property
|
|
14
14
|
def content_type(self):
|
|
15
15
|
"""
|
|
16
|
-
MIME content type for this image, unconditionally `image/emf` for
|
|
16
|
+
MIME content type for this image, unconditionally `image/x-emf` for
|
|
17
17
|
EMF images.
|
|
18
18
|
"""
|
|
19
19
|
return MIME_TYPE.EMF
|
|
@@ -38,9 +38,8 @@ class Emf(BaseImageHeader):
|
|
|
38
38
|
y1 = stream_rdr.read_long(20)
|
|
39
39
|
|
|
40
40
|
frame = tuple(map(stream_rdr.read_long, (24, 28, 32, 36)))
|
|
41
|
-
size = x1 - x0, y1 - y0
|
|
42
41
|
|
|
43
42
|
xdpi = 2540.0 * (x1 - x0) / (frame[2] - frame[0])
|
|
44
43
|
ydpi = 2540.0 * (y1 - y0) / (frame[3] - frame[1])
|
|
45
44
|
|
|
46
|
-
return cls(x1 - x0, y1 - y0, xdpi, ydpi)
|
|
45
|
+
return cls(x1 - x0, y1 - y0, xdpi, ydpi)
|
docx/opc/rel.py
CHANGED
|
@@ -28,6 +28,11 @@ class Relationships(Dict[str, "_Relationship"]):
|
|
|
28
28
|
self._target_parts_by_rId[rId] = target
|
|
29
29
|
return rel
|
|
30
30
|
|
|
31
|
+
def __delitem__(self, rId: str) -> None:
|
|
32
|
+
"""Remove the relationship and its cached target-part reference."""
|
|
33
|
+
super().__delitem__(rId)
|
|
34
|
+
self._target_parts_by_rId.pop(rId, None)
|
|
35
|
+
|
|
31
36
|
def get_or_add(self, reltype: str, target_part: Part) -> _Relationship:
|
|
32
37
|
"""Return relationship of `reltype` to `target_part`, newly added if not already
|
|
33
38
|
present in collection."""
|
docx/parts/customxml.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""
|
|
2
2
|
|CustomXmlPart| and closely related objects
|
|
3
3
|
"""
|
|
4
|
+
|
|
4
5
|
from lxml import etree
|
|
5
6
|
from lxml.etree import fromstring
|
|
6
7
|
|
|
@@ -17,17 +18,21 @@ class CustomXmlPart(XmlPart):
|
|
|
17
18
|
@classmethod
|
|
18
19
|
def default(
|
|
19
20
|
cls,
|
|
20
|
-
file_name: str,
|
|
21
|
+
file_name: str | None,
|
|
21
22
|
content_type: str,
|
|
22
23
|
xml: str,
|
|
23
24
|
package: OpcPackage,
|
|
24
25
|
) -> "CustomXmlPart":
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
"""Create a Custom XML part with a unique package partname."""
|
|
27
|
+
if file_name is None:
|
|
28
|
+
partname = package.next_partname("/customXml/item%d.xml")
|
|
29
|
+
else:
|
|
30
|
+
partname = PackURI(f"/customXml/{file_name}.xml")
|
|
31
|
+
if any(part.partname == partname for part in package.iter_parts()):
|
|
32
|
+
raise ValueError(f"part already exists at '{partname}'")
|
|
33
|
+
|
|
29
34
|
return cls(
|
|
30
|
-
|
|
35
|
+
partname,
|
|
31
36
|
content_type,
|
|
32
37
|
fromstring(xml),
|
|
33
38
|
package,
|
|
@@ -54,7 +59,7 @@ class CustomXmlPart(XmlPart):
|
|
|
54
59
|
"""
|
|
55
60
|
return self.element.getchildren()
|
|
56
61
|
|
|
57
|
-
def add_item(self, tag: str, text: str = "", **attrib):
|
|
62
|
+
def add_item(self, tag: str, text: str = "", **attrib: str) -> None:
|
|
58
63
|
"""
|
|
59
64
|
Add a child element to root.
|
|
60
65
|
"""
|
docx/parts/document.py
CHANGED
|
@@ -36,9 +36,9 @@ class DocumentPart(StoryPart):
|
|
|
36
36
|
"""
|
|
37
37
|
|
|
38
38
|
def add_custom_xml_part(
|
|
39
|
-
self, xml: str, file_name: str =
|
|
39
|
+
self, xml: str, file_name: str | None = None, content_type: str = CT.XML
|
|
40
40
|
) -> CustomXmlPart:
|
|
41
|
-
"""Add a
|
|
41
|
+
"""Add a Custom XML part, using the next available `itemN.xml` by default."""
|
|
42
42
|
part = CustomXmlPart.default(file_name, content_type, xml, self.package)
|
|
43
43
|
return self.rels.get_or_add(RT.CUSTOM_XML, part).target_part
|
|
44
44
|
|
|
@@ -54,6 +54,24 @@ class DocumentPart(StoryPart):
|
|
|
54
54
|
rId = self.relate_to(header_part, RT.HEADER)
|
|
55
55
|
return header_part, rId
|
|
56
56
|
|
|
57
|
+
def delete_custom_xml_part(self, part: CustomXmlPart) -> None:
|
|
58
|
+
"""Delete a Custom XML part related to this document.
|
|
59
|
+
|
|
60
|
+
Related Custom XML property parts are detached with the part and omitted from
|
|
61
|
+
the package when it is next saved.
|
|
62
|
+
"""
|
|
63
|
+
matching_rIds = [
|
|
64
|
+
rId
|
|
65
|
+
for rId, rel in self.rels.items()
|
|
66
|
+
if rel.reltype == RT.CUSTOM_XML and not rel.is_external and rel.target_part is part
|
|
67
|
+
]
|
|
68
|
+
if not matching_rIds:
|
|
69
|
+
raise ValueError(f"part '{part.partname}' is not related to this document")
|
|
70
|
+
|
|
71
|
+
part.drop_rels(lambda rel: rel.reltype == RT.CUSTOM_XML_PROPS)
|
|
72
|
+
for rId in matching_rIds:
|
|
73
|
+
del self.rels[rId]
|
|
74
|
+
|
|
57
75
|
@property
|
|
58
76
|
def comments(self) -> Comments:
|
|
59
77
|
"""|Comments| object providing access to the comments added to this document."""
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: python-docx-oss
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Create, read, and update Microsoft Word .docx files.
|
|
5
|
+
Author: Ethan St Lee
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Changelog, https://github.com/lsaint/python-docx-oss/blob/master/HISTORY.md
|
|
8
|
+
Project-URL: Documentation, https://python-docx-oss.readthedocs.io/en/latest/
|
|
9
|
+
Project-URL: Issues, https://github.com/lsaint/python-docx-oss/issues
|
|
10
|
+
Project-URL: Repository, https://github.com/lsaint/python-docx-oss
|
|
11
|
+
Keywords: docx,office,openxml,word
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Office/Business :: Office Suites
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
23
|
+
Requires-Python: >=3.12
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: lxml>=3.1.0
|
|
27
|
+
Requires-Dist: typing_extensions>=4.9.0
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
<p align="center">
|
|
31
|
+
<img src="https://raw.githubusercontent.com/lsaint/python-docx-oss/master/docs/_static/img/oss.png" width="400" alt="python-docx-oss"/>
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<strong>A Python SDK for advanced creation and manipulation of Microsoft Word <code>.docx</code> files.</strong>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<a href="https://pypi.org/project/python-docx-oss/"><img alt="PyPI" src="https://img.shields.io/pypi/v/python-docx-oss"></a>
|
|
40
|
+
<a href="https://pypi.org/project/python-docx-oss/"><img alt="Python versions" src="https://img.shields.io/pypi/pyversions/python-docx-oss.svg"></a>
|
|
41
|
+
<a href="https://github.com/astral-sh/ruff"><img alt="Code style: Ruff" src="https://img.shields.io/badge/code%20style-ruff-FF6B6B.svg?logo=ruff&logoColor=white"></a>
|
|
42
|
+
<a href="https://github.com/lsaint/python-docx-oss/blob/master/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>
|
|
43
|
+
</p>
|
|
44
|
+
|
|
45
|
+
## Overview
|
|
46
|
+
|
|
47
|
+
`python-docx-oss` is an independently evolving DOCX SDK built on the proven API
|
|
48
|
+
foundation of [`python-docx`](https://github.com/python-openxml/python-docx). It keeps
|
|
49
|
+
the familiar `docx` programming model while extending it for advanced OOXML and Open
|
|
50
|
+
Packaging Convention (OPC) workflows.
|
|
51
|
+
|
|
52
|
+
Use it when an application needs more than basic paragraphs and tables: custom document
|
|
53
|
+
metadata, application-owned XML, vector images, floating pictures, East Asian fonts,
|
|
54
|
+
or low-level package and relationship access.
|
|
55
|
+
|
|
56
|
+
## Capability Matrix
|
|
57
|
+
|
|
58
|
+
| Capability | Status | Primary API |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| Documents, paragraphs, tables, styles, sections, headers, and footers | Stable | `Document()` and document object APIs |
|
|
61
|
+
| Custom document properties | Stable | `document.custom_properties` |
|
|
62
|
+
| Custom XML lifecycle | Stable | `add_custom_xml_part()`, `delete_custom_xml_part()` |
|
|
63
|
+
| SVG and EMF images | Stable | `add_picture()` |
|
|
64
|
+
| Inline and floating pictures | Stable | `add_picture()`, `add_float_picture()` |
|
|
65
|
+
| Latin and East Asian font controls | Stable | `run.font.name`, `run.font.hAnsi`, `run.font.eastAsia` |
|
|
66
|
+
| Low-level OPC parts and relationships | Stable | `document.part.package`, `part.rels` |
|
|
67
|
+
| In-memory read, export, and independent copies | Stable | `Document()`, `to_bytes()`, `copy()` |
|
|
68
|
+
| Package inspection, diff, and sanitization | Planned | — |
|
|
69
|
+
|
|
70
|
+
## Installation
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
python -m pip install python-docx-oss
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The distribution name is `python-docx-oss`, but the Python import namespace remains
|
|
77
|
+
`docx`:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from docx import Document
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
> [!WARNING]
|
|
84
|
+
> `python-docx` and `python-docx-oss` provide the same `docx` import namespace. Do not
|
|
85
|
+
> install both distributions in the same Python environment.
|
|
86
|
+
|
|
87
|
+
`python-docx-oss` currently supports Python 3.12, 3.13, and 3.14.
|
|
88
|
+
|
|
89
|
+
## Quick Start
|
|
90
|
+
|
|
91
|
+
Create a document entirely in memory:
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
from io import BytesIO
|
|
95
|
+
|
|
96
|
+
from docx import Document
|
|
97
|
+
|
|
98
|
+
document = Document()
|
|
99
|
+
document.add_heading("Quarterly Report", level=1)
|
|
100
|
+
document.add_paragraph("Generated entirely in memory.")
|
|
101
|
+
|
|
102
|
+
output = BytesIO()
|
|
103
|
+
document.save(output)
|
|
104
|
+
|
|
105
|
+
docx_bytes = output.getvalue()
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The same APIs also accept filesystem paths:
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
document = Document("input.docx")
|
|
112
|
+
document.add_paragraph("Appended by python-docx-oss.")
|
|
113
|
+
document.save("output.docx")
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Advanced Capabilities
|
|
117
|
+
|
|
118
|
+
### Custom properties
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
document = Document()
|
|
122
|
+
document.custom_properties["workflow_status"] = "approved"
|
|
123
|
+
document.custom_properties["revision"] = 3
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Custom properties are visible in Microsoft Word and stored in
|
|
127
|
+
`/docProps/custom.xml`. See [Working with custom
|
|
128
|
+
properties](docs/user/custom-properties.rst).
|
|
129
|
+
|
|
130
|
+
### Custom XML
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
custom_xml = document.part.add_custom_xml_part(
|
|
134
|
+
'<order xmlns="urn:example:orders" id="A-001"/>',
|
|
135
|
+
)
|
|
136
|
+
custom_xml.add_item("status", "ready")
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
See [Working with Custom XML](docs/user/custom-xml.rst) for lifecycle and compatibility
|
|
140
|
+
considerations.
|
|
141
|
+
|
|
142
|
+
### East Asian fonts
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
run = document.add_paragraph().add_run("English 与中文")
|
|
146
|
+
run.font.name = "Open Sans"
|
|
147
|
+
run.font.eastAsia = "Microsoft YaHei"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
SVG and EMF streams can be passed to the standard picture APIs. Floating pictures are
|
|
151
|
+
available through `Document.add_float_picture()` and `Run.add_float_picture()`.
|
|
152
|
+
|
|
153
|
+
## Compatibility and Scope
|
|
154
|
+
|
|
155
|
+
- The project maintains broad compatibility with the public `python-docx` API while
|
|
156
|
+
following its own versioning and product roadmap.
|
|
157
|
+
- Compatibility does not extend to every private or internal `python-docx` API. Test
|
|
158
|
+
those integrations before migrating production systems.
|
|
159
|
+
- The SDK focuses exclusively on DOCX. It is not a general XLSX/PPTX Office suite.
|
|
160
|
+
- It edits document structure but does not implement Word's page-layout rendering
|
|
161
|
+
engine.
|
|
162
|
+
- CLI, MCP, web, desktop, and Agent runtimes belong in separate packages that consume
|
|
163
|
+
this SDK.
|
|
164
|
+
|
|
165
|
+
## Documentation
|
|
166
|
+
|
|
167
|
+
- [Documentation site](https://python-docx-oss.readthedocs.io/en/latest/)
|
|
168
|
+
- [Installation guide](docs/user/install.rst)
|
|
169
|
+
- [Quickstart](docs/user/quickstart.rst)
|
|
170
|
+
- [User guide](docs/index.rst)
|
|
171
|
+
- [API reference](docs/index.rst#api-documentation)
|
|
172
|
+
- [Custom properties](docs/user/custom-properties.rst)
|
|
173
|
+
- [Custom XML](docs/user/custom-xml.rst)
|
|
174
|
+
- [python-docx compatibility](docs/user/compatibility.rst)
|
|
175
|
+
- [Upstream maintenance](docs/dev/upstream-maintenance.rst)
|
|
176
|
+
- [Release history](HISTORY.md)
|
|
177
|
+
|
|
178
|
+
## Quality and Testing
|
|
179
|
+
|
|
180
|
+
The test suite combines unit and acceptance coverage with in-memory round-trip tests
|
|
181
|
+
using documents created by Microsoft Word. The integration fixtures cover floating
|
|
182
|
+
pictures, SVG fallback relationships, East Asian fonts, Custom XML parts, and core OPC
|
|
183
|
+
package preservation.
|
|
184
|
+
|
|
185
|
+
For local development:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
uv sync
|
|
189
|
+
uv run pytest
|
|
190
|
+
uv run ruff check .
|
|
191
|
+
uv run pyright
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Project Status
|
|
195
|
+
|
|
196
|
+
The current focus is stabilizing the independent SDK baseline, its in-memory workflows,
|
|
197
|
+
and its advanced OOXML capabilities before expanding document inspection, comparison,
|
|
198
|
+
sanitization, composition, and validation APIs.
|
|
199
|
+
|
|
200
|
+
## Credits
|
|
201
|
+
|
|
202
|
+
This project builds on the original work of
|
|
203
|
+
[`python-docx`](https://github.com/python-openxml/python-docx) creator Steve Canny and
|
|
204
|
+
its contributors. `python-docx-oss` is maintained by Ethan St Lee and its contributors.
|
|
205
|
+
|
|
206
|
+
## Why “OSS”?
|
|
207
|
+
|
|
208
|
+
In Brazilian jiu-jitsu, “oss” is a greeting and an expression of respect. It reflects
|
|
209
|
+
the same spirit of discipline and collaboration behind this project.
|
|
210
|
+
|
|
211
|
+
## License
|
|
212
|
+
|
|
213
|
+
`python-docx-oss` is released under the [MIT License](LICENSE).
|
|
214
|
+
|
|
215
|
+
## Support
|
|
216
|
+
|
|
217
|
+
If this project is useful to you, you can support its continued development through
|
|
218
|
+
the [donation page](https://lsaint.github.io/donation/?utm_source=github&utm_medium=readme&utm_campaign=python-docx-oss).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
docx/__init__.py,sha256=
|
|
2
|
-
docx/api.py,sha256=
|
|
1
|
+
docx/__init__.py,sha256=aw9boQn8MrzqJFVCGmYy41YRdhhw3Ym0bIhqE643gCA,2102
|
|
2
|
+
docx/api.py,sha256=jIojXW4IRDEXQqaqvmOZbzBvNeyRXv9ntHByxd-Kb0M,1518
|
|
3
3
|
docx/blkcntnr.py,sha256=_xe7Uz3RBCz4TPKXpIzRxtGg-1YPb3gAG9YvsSUyoLU,3525
|
|
4
4
|
docx/comments.py,sha256=MmaP7U9mZOUFsRhaZNIbXatqOOA8-pOC6UlqWAuTHsc,6385
|
|
5
|
-
docx/document.py,sha256=
|
|
5
|
+
docx/document.py,sha256=s9oolRg9W37W_8RG8v-rHVZtU9iBevV-NgnJ9JW2z00,12376
|
|
6
6
|
docx/exceptions.py,sha256=WWiMy3ZtsfKRS31Wv09egLZnpPkX0H66B8JkOPCC3FM,454
|
|
7
7
|
docx/package.py,sha256=Eob2q7R6jXQ3iPD0cAGHzu2RVYgU2te4zfG3oVN_-lM,4288
|
|
8
8
|
docx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -25,8 +25,8 @@ docx/enum/table.py,sha256=7PuQ--PGnSaNiE0Bu4VJ9t6LOgM-hNNmKEcl-3S2eUk,3943
|
|
|
25
25
|
docx/enum/text.py,sha256=o6bdpJot2iY40UnnBQ1uGfdE8oHFm3dtXUrmt9eMlvE,10276
|
|
26
26
|
docx/image/__init__.py,sha256=OvnRg5_DTmmrJObUBWLVcPFMRPb-u63e0EKfF_eIQlk,924
|
|
27
27
|
docx/image/bmp.py,sha256=w_Jhu6hByAckJNyKhI3zHOKsHyibHgxDIjiPI9ev704,1347
|
|
28
|
-
docx/image/constants.py,sha256=
|
|
29
|
-
docx/image/emf.py,sha256=
|
|
28
|
+
docx/image/constants.py,sha256=c6Mtsy38b0nilCcRp9vvXkV7hyLDb0sDHfJoPqH-lPk,3490
|
|
29
|
+
docx/image/emf.py,sha256=C22sBpDu6vxLqAQmycPCb6xBc8ezVpr1C8x-C8SL2GE,1180
|
|
30
30
|
docx/image/exceptions.py,sha256=_6rkjXXcbFxb_H-J0kK4Q1J9RaLx3TVQ5hoOVENvQaI,383
|
|
31
31
|
docx/image/gif.py,sha256=0R7L0r7kjf844pdpN6UKEISsEQzOPAyA3cghXXdJW2s,1118
|
|
32
32
|
docx/image/helpers.py,sha256=jy0fQBqIfstp9ExfKw3dGNKozn74RnmSA_YwmolsDqM,3089
|
|
@@ -47,7 +47,7 @@ docx/opc/part.py,sha256=15TjdwOs137LDdr-EVNeLb4iQdRyIfDZg6Vjx6_8Zdc,9606
|
|
|
47
47
|
docx/opc/phys_pkg.py,sha256=-eNZDBbLShHo3W1iglf1CwN_nkK8qnmTWp6ABg77cjA,4005
|
|
48
48
|
docx/opc/pkgreader.py,sha256=iUPZ7Ba4kNXjPB-q1mQEO44eVmbnP08po4WFH-HD2IE,9588
|
|
49
49
|
docx/opc/pkgwriter.py,sha256=shDeuBtW2BbFOTHrXx8R97PWFaH_fE37JYBfbw6QWRs,4524
|
|
50
|
-
docx/opc/rel.py,sha256=
|
|
50
|
+
docx/opc/rel.py,sha256=ziqjJ_zQZ1Ow1sNM46se8F6YZRVST-Z8Z4NYvnnOt8o,6423
|
|
51
51
|
docx/opc/shared.py,sha256=Zn2avg2g0J2fkG5YgFfCbl138gXex8stR-QwVJcuSIY,996
|
|
52
52
|
docx/opc/spec.py,sha256=GP8YEb7bSmZQ0i338M3lQCVZm6yUnkUhm3PFKVgW8bQ,638
|
|
53
53
|
docx/opc/parts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -81,8 +81,8 @@ docx/oxml/text/parfmt.py,sha256=5TYCf-QfcwlECXUkrLSYFfewFA1JieKGTtm3X01fu64,1222
|
|
|
81
81
|
docx/oxml/text/run.py,sha256=W8vwOomvk1oGzAq2BqDgyVftKsSi5LK9_vlADVcMgpg,11238
|
|
82
82
|
docx/parts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
83
83
|
docx/parts/comments.py,sha256=Dmxh_i8ADRo-wLfO9LV0Lyho5XC_76oU1NJN8itw8lc,1760
|
|
84
|
-
docx/parts/customxml.py,sha256=
|
|
85
|
-
docx/parts/document.py,sha256=
|
|
84
|
+
docx/parts/customxml.py,sha256=hbwDmPwR-1RRLOOFhmiPd0B-dNwpfZFrOxIaGU4UlG4,1920
|
|
85
|
+
docx/parts/document.py,sha256=hox7yRnsZRTF1C4ersAQUHNP58YhHxHMJnnztyp-2wM,8171
|
|
86
86
|
docx/parts/hdrftr.py,sha256=_U0PCjVkK6EWwkyZb9oTunlNb6x55rECD1xFDzwUlPM,1709
|
|
87
87
|
docx/parts/image.py,sha256=c-DF5YFvp1qVTx7Zon-xOXw0qPc_3LoeX9qMSFPs6mo,2739
|
|
88
88
|
docx/parts/numbering.py,sha256=rrVIiRoBQIy6j8eWGhWyhcJvNx6RRaItWVDhorwrVyo,1715
|
|
@@ -125,8 +125,8 @@ docx/text/paragraph.py,sha256=N3F62_JRQZYaumuoaJXKCDnRSw2DIiOwzyMPV2Jd7GI,6828
|
|
|
125
125
|
docx/text/parfmt.py,sha256=70M75HFo7ydpqmIdZjkV711muyrsBGdr4WZscF3YVJY,10339
|
|
126
126
|
docx/text/run.py,sha256=tsW8dXOE4VnqEM7cJz_uU2Vq3qgdnrMGzyDq9x5jvE4,10800
|
|
127
127
|
docx/text/tabstops.py,sha256=bJN98GWW22f4Sqg0dQbyUcnuOn65fHsNZuCGswI03_c,3896
|
|
128
|
-
python_docx_oss-0.
|
|
129
|
-
python_docx_oss-0.
|
|
130
|
-
python_docx_oss-0.
|
|
131
|
-
python_docx_oss-0.
|
|
132
|
-
python_docx_oss-0.
|
|
128
|
+
python_docx_oss-0.2.0.dist-info/licenses/LICENSE,sha256=lf2yZv-riPwFeah3IMDeG0zqI6fXcV9T9YOToeG54NM,1164
|
|
129
|
+
python_docx_oss-0.2.0.dist-info/METADATA,sha256=xgmccioh4zptF-ExSr52_7IrSCIsMQXeiovBXzT7DRk,7851
|
|
130
|
+
python_docx_oss-0.2.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
131
|
+
python_docx_oss-0.2.0.dist-info/top_level.txt,sha256=zkbrD3gmyqHpD_XhHe7lCbr2M5vT229nJ4UFqF5VjIs,5
|
|
132
|
+
python_docx_oss-0.2.0.dist-info/RECORD,,
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: python-docx-oss
|
|
3
|
-
Version: 0.1.0rc1
|
|
4
|
-
Summary: Create, read, and update Microsoft Word .docx files.
|
|
5
|
-
Author: Ethan St. Lee
|
|
6
|
-
License: MIT
|
|
7
|
-
Keywords: docx,office,openxml,word
|
|
8
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
9
|
-
Classifier: Environment :: Console
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
-
Classifier: Operating System :: OS Independent
|
|
13
|
-
Classifier: Programming Language :: Python
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
-
Classifier: Topic :: Office/Business :: Office Suites
|
|
18
|
-
Classifier: Topic :: Software Development :: Libraries
|
|
19
|
-
Requires-Python: >=3.12
|
|
20
|
-
Description-Content-Type: text/markdown
|
|
21
|
-
License-File: LICENSE
|
|
22
|
-
Requires-Dist: lxml>=3.1.0
|
|
23
|
-
Requires-Dist: typing_extensions>=4.9.0
|
|
24
|
-
Dynamic: license-file
|
|
25
|
-
|
|
26
|
-
<p align="center">
|
|
27
|
-
<img src="https://raw.githubusercontent.com/lsaint/python-docx-oss/master/docs/_static/img/oss.png" width="400" alt="oss"/>
|
|
28
|
-
</p>
|
|
29
|
-
|
|
30
|
-
_As a Brazilian jiu-jitsu player, OSS means anything and everything. It's a term used in BJJ that is a way of greeting and demonstrating respect to others._
|
|
31
|
-
|
|
32
|
-
**_python-docx-oss_** is a Python library for CRUD Microsoft Word (.docx) files. It fork from [python-docx](https://github.com/python-openxml/python-docx).
|
|
33
|
-
|
|
34
|
-
<p>
|
|
35
|
-
<a href="https://pypi.org/project/python-docx-oss/"><img alt="PyPI" src="https://img.shields.io/pypi/v/python-docx-oss"></a>
|
|
36
|
-
<a href="https://pypi.org/project/python-docx-oss"> <img src="https://img.shields.io/pypi/pyversions/python-docx-oss.svg"/></a>
|
|
37
|
-
<a href="https://github.com/astral-sh/ruff"><img alt="Code style: ruff" src="https://img.shields.io/badge/code%20style-ruff-FF6B6B.svg?logo=ruff&logoColor=white"></a>
|
|
38
|
-
<a href="https://github.com/lsaint/python-docx-oss/blob/master/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>
|
|
39
|
-
</p>
|
|
40
|
-
|
|
41
|
-
______________________________________________________________________
|
|
42
|
-
|
|
43
|
-
### FAQ
|
|
44
|
-
|
|
45
|
-
**Q: What's New?**
|
|
46
|
-
|
|
47
|
-
**A:** [HISTORY](https://github.com/lsaint/python-docx-oss/blob/master/HISTORY.md)
|
|
48
|
-
|
|
49
|
-
______________________________________________________________________
|
|
50
|
-
|
|
51
|
-
More information is available in the [python-docx-oss documentation](https://python-docx-oss.readthedocs.io/en/latest/)
|
|
52
|
-
|
|
53
|
-
This project is based on the original work by [Steve Canny](https://github.com/scanny) and has been modified by [Ethan St. Lee](https://github.com/lsaint).
|
|
54
|
-
|
|
55
|
-
### Donation
|
|
56
|
-
|
|
57
|
-
[https://lsaint.github.io/donation/](https://lsaint.github.io/donation/)
|
|
File without changes
|
|
File without changes
|