athena-python-pptx 0.1.77__tar.gz → 0.2.0__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.
Files changed (88) hide show
  1. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/PKG-INFO +103 -1
  2. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/README.md +102 -0
  3. athena_python_pptx-0.2.0/docs/API_PARITY_EXCEPTIONS.md +827 -0
  4. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/__init__.py +55 -50
  5. athena_python_pptx-0.2.0/pptx/_athena_extension.py +374 -0
  6. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/_ptc.py +38 -49
  7. athena_python_pptx-0.2.0/pptx/_references.py +165 -0
  8. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/batching.py +65 -12
  9. athena_python_pptx-0.2.0/pptx/chart/category.py +200 -0
  10. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/client.py +7 -0
  11. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/commands.py +467 -17
  12. athena_python_pptx-0.2.0/pptx/decorators.py +136 -0
  13. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/docgen.py +6 -0
  14. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/enum/chart.py +59 -0
  15. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/presentation.py +416 -56
  16. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/shapes/__init__.py +2535 -217
  17. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/slides.py +161 -0
  18. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/text/__init__.py +97 -11
  19. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/typing.py +15 -0
  20. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pyproject.toml +1 -1
  21. athena_python_pptx-0.1.77/docs/API_PARITY_EXCEPTIONS.md +0 -199
  22. athena_python_pptx-0.1.77/pptx/chart/category.py +0 -96
  23. athena_python_pptx-0.1.77/pptx/decorators.py +0 -94
  24. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/.gitignore +0 -0
  25. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/API_PARITY_REPORT.md +0 -0
  26. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/CHANGELOG.md +0 -0
  27. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/CLAUDE.md +0 -0
  28. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/DEV-GUIDE.md +0 -0
  29. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/PARITY_QUESTIONS.md +0 -0
  30. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/PUBLISHING.md +0 -0
  31. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/docs/athena-api.json +0 -0
  32. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/docs/athena-api.md +0 -0
  33. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/action.py +0 -0
  34. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/chart/__init__.py +0 -0
  35. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/chart/axis.py +0 -0
  36. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/chart/chart.py +0 -0
  37. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/chart/data.py +0 -0
  38. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/chart/datalabel.py +0 -0
  39. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/chart/legend.py +0 -0
  40. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/chart/marker.py +0 -0
  41. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/chart/plot.py +0 -0
  42. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/chart/point.py +0 -0
  43. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/chart/series.py +0 -0
  44. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/chart/xlsx.py +0 -0
  45. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/dml/__init__.py +0 -0
  46. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/dml/chtfmt.py +0 -0
  47. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/dml/color.py +0 -0
  48. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/dml/effect.py +0 -0
  49. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/dml/fill.py +0 -0
  50. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/dml/line.py +0 -0
  51. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/enum/__init__.py +0 -0
  52. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/enum/action.py +0 -0
  53. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/enum/dml.py +0 -0
  54. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/enum/lang.py +0 -0
  55. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/enum/shapes.py +0 -0
  56. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/enum/text.py +0 -0
  57. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/errors.py +0 -0
  58. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/exc.py +0 -0
  59. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/media.py +0 -0
  60. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/package.py +0 -0
  61. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/parts/__init__.py +0 -0
  62. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/parts/_base.py +0 -0
  63. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/parts/chart.py +0 -0
  64. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/parts/coreprops.py +0 -0
  65. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/parts/embeddedpackage.py +0 -0
  66. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/parts/image.py +0 -0
  67. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/parts/media.py +0 -0
  68. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/parts/presentation.py +0 -0
  69. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/parts/slide.py +0 -0
  70. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/shapes/autoshape.py +0 -0
  71. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/shapes/base.py +0 -0
  72. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/shapes/connector.py +0 -0
  73. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/shapes/freeform.py +0 -0
  74. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/shapes/graphfrm.py +0 -0
  75. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/shapes/group.py +0 -0
  76. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/shapes/picture.py +0 -0
  77. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/shapes/placeholder.py +0 -0
  78. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/shapes/shapetree.py +0 -0
  79. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/shared.py +0 -0
  80. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/slide.py +0 -0
  81. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/spec.py +0 -0
  82. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/table.py +0 -0
  83. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/text/fonts.py +0 -0
  84. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/text/layout.py +0 -0
  85. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/text/text.py +0 -0
  86. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/types.py +0 -0
  87. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/pptx/units.py +0 -0
  88. {athena_python_pptx-0.1.77 → athena_python_pptx-0.2.0}/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.77
3
+ Version: 0.2.0
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 |