athena-python-pptx 0.1.77__tar.gz → 0.1.80__tar.gz
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.
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/PKG-INFO +103 -1
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/README.md +102 -0
- athena_python_pptx-0.1.80/docs/API_PARITY_EXCEPTIONS.md +748 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/__init__.py +55 -50
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/_ptc.py +32 -49
- athena_python_pptx-0.1.80/pptx/_references.py +159 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/batching.py +58 -12
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/commands.py +358 -16
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/presentation.py +262 -55
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/shapes/__init__.py +1823 -140
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/slides.py +161 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/text/__init__.py +46 -10
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pyproject.toml +1 -1
- athena_python_pptx-0.1.77/docs/API_PARITY_EXCEPTIONS.md +0 -199
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/.gitignore +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/API_PARITY_REPORT.md +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/CHANGELOG.md +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/CLAUDE.md +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/DEV-GUIDE.md +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/PARITY_QUESTIONS.md +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/PUBLISHING.md +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/docs/athena-api.json +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/docs/athena-api.md +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/action.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/__init__.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/axis.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/category.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/chart.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/data.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/datalabel.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/legend.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/marker.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/plot.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/point.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/series.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/chart/xlsx.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/client.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/decorators.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/dml/__init__.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/dml/chtfmt.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/dml/color.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/dml/effect.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/dml/fill.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/dml/line.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/docgen.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/enum/__init__.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/enum/action.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/enum/chart.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/enum/dml.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/enum/lang.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/enum/shapes.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/enum/text.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/errors.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/exc.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/media.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/package.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/parts/__init__.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/parts/_base.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/parts/chart.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/parts/coreprops.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/parts/embeddedpackage.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/parts/image.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/parts/media.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/parts/presentation.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/parts/slide.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/shapes/autoshape.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/shapes/base.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/shapes/connector.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/shapes/freeform.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/shapes/graphfrm.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/shapes/group.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/shapes/picture.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/shapes/placeholder.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/shapes/shapetree.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/shared.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/slide.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/spec.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/table.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/text/fonts.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/text/layout.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/text/text.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/types.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/typing.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/units.py +0 -0
- {athena_python_pptx-0.1.77 → athena_python_pptx-0.1.80}/pptx/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: athena-python-pptx
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.80
|
|
4
4
|
Summary: Drop-in replacement for python-pptx that connects to PPTX Studio for real-time collaboration
|
|
5
5
|
Project-URL: Homepage, https://github.com/pptx-studio/python-sdk
|
|
6
6
|
Project-URL: Documentation, https://docs.pptx-studio.com/sdk/python
|
|
@@ -57,6 +57,108 @@ from pptx.shapes.autoshape import Shape
|
|
|
57
57
|
from pptx.text.text import Font, TextFrame
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## ⚠️ Package conflict with `python-pptx`
|
|
63
|
+
|
|
64
|
+
**`athena-python-pptx` and the upstream `python-pptx` package cannot coexist
|
|
65
|
+
in the same Python environment.** Both distribute files under the top-level
|
|
66
|
+
`pptx` import. `pip install athena-python-pptx` does *not* automatically
|
|
67
|
+
uninstall `python-pptx` — instead, pip silently overwrites the conflicting
|
|
68
|
+
files. Both distributions remain registered as "installed", but the actual
|
|
69
|
+
`pptx` module on disk ends up as a corrupted mix of files from both wheels.
|
|
70
|
+
The result is an environment that imports successfully but raises
|
|
71
|
+
`AttributeError` on calls that exist in one library but not the other.
|
|
72
|
+
|
|
73
|
+
The only safe configuration is one library per environment; always use an
|
|
74
|
+
isolated virtualenv / venv to keep them apart.
|
|
75
|
+
|
|
76
|
+
### Why this happens
|
|
77
|
+
|
|
78
|
+
This SDK is designed to be a drop-in replacement for `python-pptx` — every
|
|
79
|
+
`from pptx import …` statement should resolve to a remote-aware proxy class
|
|
80
|
+
that talks to PPTX Studio instead of a local OOXML adapter. The only way to
|
|
81
|
+
preserve that contract is to shadow the `pptx` top-level package, which
|
|
82
|
+
forces a hard either/or choice at install time. There is no "use both at
|
|
83
|
+
once" mode.
|
|
84
|
+
|
|
85
|
+
### Workaround: separate virtualenvs
|
|
86
|
+
|
|
87
|
+
If you need both libraries (for example, to read a stock `.pptx` from disk
|
|
88
|
+
*and* mutate an Athena-hosted deck in the same workflow), put each in its
|
|
89
|
+
own virtualenv and shuttle data between them as bytes / JSON / inline
|
|
90
|
+
arguments — never both in the same `sys.path`.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Venv 1: stock python-pptx for local file I/O
|
|
94
|
+
python -m venv .venv-stock
|
|
95
|
+
source .venv-stock/bin/activate
|
|
96
|
+
pip install python-pptx
|
|
97
|
+
deactivate
|
|
98
|
+
|
|
99
|
+
# Venv 2: athena-python-pptx for remote authoring
|
|
100
|
+
python -m venv .venv-athena
|
|
101
|
+
source .venv-athena/bin/activate
|
|
102
|
+
pip install athena-python-pptx
|
|
103
|
+
deactivate
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Recipe: "read a stock .pptx, write to Athena"
|
|
107
|
+
|
|
108
|
+
The most common cross-venv pipeline is to extract content from a local
|
|
109
|
+
`.pptx` with the stock library, then push it into an Athena deck through
|
|
110
|
+
this SDK. Two patterns work:
|
|
111
|
+
|
|
112
|
+
**Pattern A — upload the file directly.** If the local PPTX is already in
|
|
113
|
+
the shape you want, skip stock python-pptx entirely:
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
# In the .venv-athena venv:
|
|
117
|
+
from pptx import Presentation
|
|
118
|
+
prs = Presentation.upload("local_deck.pptx") # ingests through Athena
|
|
119
|
+
# …mutate via the SDK, then prs.save("out.pptx") to download.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Pattern B — extract with stock, author with Athena.** When you need to
|
|
123
|
+
read structure (e.g., pull bullet text out of an existing deck) before
|
|
124
|
+
rewriting it, run two scripts:
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
# extract.py — runs in .venv-stock
|
|
128
|
+
from pptx import Presentation
|
|
129
|
+
import json
|
|
130
|
+
|
|
131
|
+
prs = Presentation("local_deck.pptx")
|
|
132
|
+
payload = [
|
|
133
|
+
{"slide": i, "title": (s.shapes.title.text if s.shapes.title else None)}
|
|
134
|
+
for i, s in enumerate(prs.slides)
|
|
135
|
+
]
|
|
136
|
+
with open("/tmp/extract.json", "w") as f:
|
|
137
|
+
json.dump(payload, f)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
# author.py — runs in .venv-athena
|
|
142
|
+
from pptx import Presentation
|
|
143
|
+
import json
|
|
144
|
+
|
|
145
|
+
with open("/tmp/extract.json") as f:
|
|
146
|
+
payload = json.load(f)
|
|
147
|
+
|
|
148
|
+
prs = Presentation.create(name="Imported deck")
|
|
149
|
+
for entry in payload:
|
|
150
|
+
slide = prs.slides.add_slide()
|
|
151
|
+
if entry["title"] and slide.shapes.title is not None:
|
|
152
|
+
slide.shapes.title.text = entry["title"]
|
|
153
|
+
prs.close()
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Invoke them from a shell wrapper that activates the right venv for each
|
|
157
|
+
step. Cross-venv state must always travel through a serialized intermediate
|
|
158
|
+
(JSON, pickled bytes, a shared file) — never via shared Python imports.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
60
162
|
### Parity status (v0.1.74)
|
|
61
163
|
|
|
62
164
|
| Dimension | Coverage |
|
|
@@ -17,6 +17,108 @@ from pptx.shapes.autoshape import Shape
|
|
|
17
17
|
from pptx.text.text import Font, TextFrame
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ⚠️ Package conflict with `python-pptx`
|
|
23
|
+
|
|
24
|
+
**`athena-python-pptx` and the upstream `python-pptx` package cannot coexist
|
|
25
|
+
in the same Python environment.** Both distribute files under the top-level
|
|
26
|
+
`pptx` import. `pip install athena-python-pptx` does *not* automatically
|
|
27
|
+
uninstall `python-pptx` — instead, pip silently overwrites the conflicting
|
|
28
|
+
files. Both distributions remain registered as "installed", but the actual
|
|
29
|
+
`pptx` module on disk ends up as a corrupted mix of files from both wheels.
|
|
30
|
+
The result is an environment that imports successfully but raises
|
|
31
|
+
`AttributeError` on calls that exist in one library but not the other.
|
|
32
|
+
|
|
33
|
+
The only safe configuration is one library per environment; always use an
|
|
34
|
+
isolated virtualenv / venv to keep them apart.
|
|
35
|
+
|
|
36
|
+
### Why this happens
|
|
37
|
+
|
|
38
|
+
This SDK is designed to be a drop-in replacement for `python-pptx` — every
|
|
39
|
+
`from pptx import …` statement should resolve to a remote-aware proxy class
|
|
40
|
+
that talks to PPTX Studio instead of a local OOXML adapter. The only way to
|
|
41
|
+
preserve that contract is to shadow the `pptx` top-level package, which
|
|
42
|
+
forces a hard either/or choice at install time. There is no "use both at
|
|
43
|
+
once" mode.
|
|
44
|
+
|
|
45
|
+
### Workaround: separate virtualenvs
|
|
46
|
+
|
|
47
|
+
If you need both libraries (for example, to read a stock `.pptx` from disk
|
|
48
|
+
*and* mutate an Athena-hosted deck in the same workflow), put each in its
|
|
49
|
+
own virtualenv and shuttle data between them as bytes / JSON / inline
|
|
50
|
+
arguments — never both in the same `sys.path`.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Venv 1: stock python-pptx for local file I/O
|
|
54
|
+
python -m venv .venv-stock
|
|
55
|
+
source .venv-stock/bin/activate
|
|
56
|
+
pip install python-pptx
|
|
57
|
+
deactivate
|
|
58
|
+
|
|
59
|
+
# Venv 2: athena-python-pptx for remote authoring
|
|
60
|
+
python -m venv .venv-athena
|
|
61
|
+
source .venv-athena/bin/activate
|
|
62
|
+
pip install athena-python-pptx
|
|
63
|
+
deactivate
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Recipe: "read a stock .pptx, write to Athena"
|
|
67
|
+
|
|
68
|
+
The most common cross-venv pipeline is to extract content from a local
|
|
69
|
+
`.pptx` with the stock library, then push it into an Athena deck through
|
|
70
|
+
this SDK. Two patterns work:
|
|
71
|
+
|
|
72
|
+
**Pattern A — upload the file directly.** If the local PPTX is already in
|
|
73
|
+
the shape you want, skip stock python-pptx entirely:
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
# In the .venv-athena venv:
|
|
77
|
+
from pptx import Presentation
|
|
78
|
+
prs = Presentation.upload("local_deck.pptx") # ingests through Athena
|
|
79
|
+
# …mutate via the SDK, then prs.save("out.pptx") to download.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Pattern B — extract with stock, author with Athena.** When you need to
|
|
83
|
+
read structure (e.g., pull bullet text out of an existing deck) before
|
|
84
|
+
rewriting it, run two scripts:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
# extract.py — runs in .venv-stock
|
|
88
|
+
from pptx import Presentation
|
|
89
|
+
import json
|
|
90
|
+
|
|
91
|
+
prs = Presentation("local_deck.pptx")
|
|
92
|
+
payload = [
|
|
93
|
+
{"slide": i, "title": (s.shapes.title.text if s.shapes.title else None)}
|
|
94
|
+
for i, s in enumerate(prs.slides)
|
|
95
|
+
]
|
|
96
|
+
with open("/tmp/extract.json", "w") as f:
|
|
97
|
+
json.dump(payload, f)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
# author.py — runs in .venv-athena
|
|
102
|
+
from pptx import Presentation
|
|
103
|
+
import json
|
|
104
|
+
|
|
105
|
+
with open("/tmp/extract.json") as f:
|
|
106
|
+
payload = json.load(f)
|
|
107
|
+
|
|
108
|
+
prs = Presentation.create(name="Imported deck")
|
|
109
|
+
for entry in payload:
|
|
110
|
+
slide = prs.slides.add_slide()
|
|
111
|
+
if entry["title"] and slide.shapes.title is not None:
|
|
112
|
+
slide.shapes.title.text = entry["title"]
|
|
113
|
+
prs.close()
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Invoke them from a shell wrapper that activates the right venv for each
|
|
117
|
+
step. Cross-venv state must always travel through a serialized intermediate
|
|
118
|
+
(JSON, pickled bytes, a shared file) — never via shared Python imports.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
20
122
|
### Parity status (v0.1.74)
|
|
21
123
|
|
|
22
124
|
| Dimension | Coverage |
|