adobepy 0.1.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 (41) hide show
  1. adobepy-0.1.0/LICENSE-APACHE +146 -0
  2. adobepy-0.1.0/LICENSE-MIT +21 -0
  3. adobepy-0.1.0/PKG-INFO +104 -0
  4. adobepy-0.1.0/README.md +76 -0
  5. adobepy-0.1.0/pyproject.toml +57 -0
  6. adobepy-0.1.0/python/adobe/__init__.py +3 -0
  7. adobepy-0.1.0/python/adobe/after_effects/__init__.py +5 -0
  8. adobepy-0.1.0/python/adobe/after_effects/py.typed +1 -0
  9. adobepy-0.1.0/python/adobe/after_effects/session.py +1701 -0
  10. adobepy-0.1.0/python/adobe/after_effects/session.pyi +604 -0
  11. adobepy-0.1.0/python/adobe/core/__init__.py +39 -0
  12. adobepy-0.1.0/python/adobe/core/capabilities.py +49 -0
  13. adobepy-0.1.0/python/adobe/core/client.py +106 -0
  14. adobepy-0.1.0/python/adobe/core/errors.py +81 -0
  15. adobepy-0.1.0/python/adobe/core/py.typed +1 -0
  16. adobepy-0.1.0/python/adobe/core/session.py +100 -0
  17. adobepy-0.1.0/python/adobe/dcc_mcp/__init__.py +251 -0
  18. adobepy-0.1.0/python/adobe/dcc_mcp/py.typed +1 -0
  19. adobepy-0.1.0/python/adobe/illustrator/__init__.py +5 -0
  20. adobepy-0.1.0/python/adobe/illustrator/py.typed +1 -0
  21. adobepy-0.1.0/python/adobe/illustrator/session.py +507 -0
  22. adobepy-0.1.0/python/adobe/illustrator/session.pyi +219 -0
  23. adobepy-0.1.0/python/adobe/indesign/__init__.py +31 -0
  24. adobepy-0.1.0/python/adobe/indesign/py.typed +1 -0
  25. adobepy-0.1.0/python/adobe/indesign/session.py +1172 -0
  26. adobepy-0.1.0/python/adobe/indesign/session.pyi +416 -0
  27. adobepy-0.1.0/python/adobe/photoshop/__init__.py +39 -0
  28. adobepy-0.1.0/python/adobe/photoshop/py.typed +1 -0
  29. adobepy-0.1.0/python/adobe/photoshop/session.py +1287 -0
  30. adobepy-0.1.0/python/adobe/photoshop/session.pyi +333 -0
  31. adobepy-0.1.0/python/adobe/premiere/__init__.py +5 -0
  32. adobepy-0.1.0/python/adobe/premiere/py.typed +1 -0
  33. adobepy-0.1.0/python/adobe/premiere/session.py +1278 -0
  34. adobepy-0.1.0/python/adobe/premiere/session.pyi +347 -0
  35. adobepy-0.1.0/python/adobe/raw/__init__.py +144 -0
  36. adobepy-0.1.0/python/adobe/raw/py.typed +1 -0
  37. adobepy-0.1.0/python/adobepy.egg-info/PKG-INFO +104 -0
  38. adobepy-0.1.0/python/adobepy.egg-info/SOURCES.txt +39 -0
  39. adobepy-0.1.0/python/adobepy.egg-info/dependency_links.txt +1 -0
  40. adobepy-0.1.0/python/adobepy.egg-info/top_level.txt +1 -0
  41. adobepy-0.1.0/setup.cfg +4 -0
@@ -0,0 +1,146 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ https://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form,
34
+ made available under the License, as indicated by a copyright notice that is
35
+ included in or attached to the work.
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
38
+ is based on (or derived from) the Work and for which the editorial revisions,
39
+ annotations, elaborations, or other modifications represent, as a whole, an
40
+ original work of authorship. For the purposes of this License, Derivative Works
41
+ shall not include works that remain separable from, or merely link (or bind by
42
+ name) to the interfaces of, the Work and Derivative Works thereof.
43
+
44
+ "Contribution" shall mean any work of authorship, including the original
45
+ version of the Work and any modifications or additions to that Work or
46
+ Derivative Works thereof, that is intentionally submitted to Licensor for
47
+ inclusion in the Work by the copyright owner or by an individual or Legal Entity
48
+ authorized to submit on behalf of the copyright owner. For the purposes of this
49
+ definition, "submitted" means any form of electronic, verbal, or written
50
+ communication sent to the Licensor or its representatives, including but not
51
+ limited to communication on electronic mailing lists, source code control
52
+ systems, and issue tracking systems that are managed by, or on behalf of, the
53
+ Licensor for the purpose of discussing and improving the Work, but excluding
54
+ communication that is conspicuously marked or otherwise designated in writing by
55
+ the copyright owner as "Not a Contribution."
56
+
57
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
58
+ of whom a Contribution has been received by Licensor and subsequently
59
+ incorporated within the Work.
60
+
61
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
62
+ License, each Contributor hereby grants to You a perpetual, worldwide,
63
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
64
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
65
+ sublicense, and distribute the Work and such Derivative Works in Source or
66
+ Object form.
67
+
68
+ 3. Grant of Patent License. Subject to the terms and conditions of this License,
69
+ each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
70
+ no-charge, royalty-free, irrevocable patent license to make, have made, use,
71
+ offer to sell, sell, import, and otherwise transfer the Work.
72
+
73
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
74
+ Derivative Works thereof in any medium, with or without modifications, and in
75
+ Source or Object form, provided that You meet the following conditions:
76
+
77
+ (a) You must give any other recipients of the Work or Derivative Works a copy
78
+ of this License; and
79
+
80
+ (b) You must cause any modified files to carry prominent notices stating that
81
+ You changed the files; and
82
+
83
+ (c) You must retain, in the Source form of any Derivative Works that You
84
+ distribute, all copyright, patent, trademark, and attribution notices from the
85
+ Source form of the Work, excluding those notices that do not pertain to any part
86
+ of the Derivative Works; and
87
+
88
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
89
+ any Derivative Works that You distribute must include a readable copy of the
90
+ attribution notices contained within such NOTICE file, excluding those notices
91
+ that do not pertain to any part of the Derivative Works, in at least one of the
92
+ following places: within a NOTICE text file distributed as part of the
93
+ Derivative Works; within the Source form or documentation, if provided along
94
+ with the Derivative Works; or, within a display generated by the Derivative
95
+ Works, if and wherever such third-party notices normally appear. The contents of
96
+ the NOTICE file are for informational purposes only and do not modify the
97
+ License. You may add Your own attribution notices within Derivative Works that
98
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
99
+ provided that such additional attribution notices cannot be construed as
100
+ modifying the License.
101
+
102
+ You may add Your own copyright statement to Your modifications and may provide
103
+ additional or different license terms and conditions for use, reproduction, or
104
+ distribution of Your modifications, or for any such Derivative Works as a whole,
105
+ provided Your use, reproduction, and distribution of the Work otherwise complies
106
+ with the conditions stated in this License.
107
+
108
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
109
+ Contribution intentionally submitted for inclusion in the Work by You to the
110
+ Licensor shall be under the terms and conditions of this License, without any
111
+ additional terms or conditions.
112
+
113
+ 6. Trademarks. This License does not grant permission to use the trade names,
114
+ trademarks, service marks, or product names of the Licensor, except as required
115
+ for reasonable and customary use in describing the origin of the Work and
116
+ reproducing the content of the NOTICE file.
117
+
118
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
119
+ writing, Licensor provides the Work on an "AS IS" BASIS, WITHOUT WARRANTIES OR
120
+ CONDITIONS OF ANY KIND, either express or implied, including, without
121
+ limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
122
+ MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
123
+ responsible for determining the appropriateness of using or redistributing the
124
+ Work and assume any risks associated with Your exercise of permissions under
125
+ this License.
126
+
127
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
128
+ tort (including negligence), contract, or otherwise, unless required by
129
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
130
+ writing, shall any Contributor be liable to You for damages, including any
131
+ direct, indirect, special, incidental, or consequential damages of any character
132
+ arising as a result of this License or out of the use or inability to use the
133
+ Work, even if such Contributor has been advised of the possibility of such
134
+ damages.
135
+
136
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
137
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
138
+ acceptance of support, warranty, indemnity, or other liability obligations
139
+ and/or rights consistent with this License. However, in accepting such
140
+ obligations, You may act only on Your own behalf and on Your sole
141
+ responsibility, not on behalf of any other Contributor, and only if You agree to
142
+ indemnify, defend, and hold each Contributor harmless for any liability incurred
143
+ by, or claims asserted against, such Contributor by reason of your accepting any
144
+ such warranty or additional liability.
145
+
146
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 adobepy contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
adobepy-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.4
2
+ Name: adobepy
3
+ Version: 0.1.0
4
+ Summary: Python SDK and broker contracts for controlling Adobe desktop hosts through UXP and CEP bridges.
5
+ Author: adobepy contributors
6
+ License: MIT OR Apache-2.0
7
+ Project-URL: Homepage, https://github.com/loonghao/adobepy
8
+ Project-URL: Repository, https://github.com/loonghao/adobepy
9
+ Project-URL: Bug Tracker, https://github.com/loonghao/adobepy/issues
10
+ Project-URL: Documentation, https://github.com/loonghao/adobepy/tree/main/docs
11
+ Keywords: adobe,photoshop,indesign,premiere,after-effects,illustrator,uxp,cep,python,mcp
12
+ Classifier: Development Status :: 2 - Pre-Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Typing :: Typed
21
+ Classifier: Topic :: Multimedia :: Graphics
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Python: >=3.8
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE-MIT
26
+ License-File: LICENSE-APACHE
27
+ Dynamic: license-file
28
+
29
+ # adobepy
30
+
31
+ Shared Adobe desktop communication runtime for Python tools and DCC MCP
32
+ adapters. Python talks to a local Rust broker; Adobe applications run thin UXP
33
+ or CEP/ExtendScript bridges.
34
+
35
+ `adobepy` is intended to be the common Adobe host layer for projects such as
36
+ [`dcc-mcp-photoshop`](https://github.com/loonghao/dcc-mcp-photoshop) and future
37
+ Adobe adapters. The public Python surface mirrors Adobe's JavaScript DOM where
38
+ possible, while adding Pythonic aliases for agent and script ergonomics.
39
+
40
+ Implemented pieces:
41
+
42
+ - Rust `adobepy` CLI with `broker`, `doctor`, `install-bridge`, and `repl`.
43
+ - Local JSON-RPC broker with per-session token, target, timeout, and capability gates.
44
+ - Python SDK under `adobe.core`, `adobe.raw`, `adobe.photoshop`, `adobe.indesign`, `adobe.premiere`, `adobe.after_effects`, and `adobe.illustrator`.
45
+ - Optional DCC MCP result helpers under `adobe.dcc_mcp` for adapter skill code.
46
+ - UXP bridge templates for Photoshop, InDesign, and Premiere that dispatch to host APIs and broker raw JavaScript escape hatches.
47
+ - CEP bridge templates for After Effects and Illustrator.
48
+ - IR validation, proxy-aware `.pyi` stub generation, and stub/runtime drift checks.
49
+ - `vx just package` distribution workflow.
50
+
51
+ Validate everything:
52
+
53
+ ```powershell
54
+ npm install
55
+ npm run test:all
56
+ ```
57
+
58
+ The full test suite type-checks bridge code, builds and exercises UXP/CEP
59
+ bundles with mocked host runtimes, validates IR contracts, checks Python
60
+ coverage, and runs Rust workspace tests.
61
+
62
+ Python support starts at 3.8. The current SDK wheel is pure Python; any future
63
+ native Python extension must publish `cp38-abi3-*` wheels rather than
64
+ per-minor-version wheels.
65
+
66
+ Build a redistributable Windows package:
67
+
68
+ ```powershell
69
+ vx just package
70
+ ```
71
+
72
+ The archive is written to `dist/adobepy-0.1.0-windows-x64.zip` with a sibling
73
+ SHA256 file. Usage and packaging notes are in `docs/usage.md` and
74
+ `docs/distribution.md`. Architecture boundaries and Adobe API source tracking
75
+ are documented in `docs/architecture.md`, `docs/api-sources.md`, and
76
+ `docs/dcc-mcp-integration.md`.
77
+
78
+ Python facade example:
79
+
80
+ ```python
81
+ from adobe.photoshop import Photoshop
82
+
83
+ app = Photoshop()
84
+ for layer in app.activeLayers:
85
+ print(layer.name)
86
+
87
+ doc = app.activeDocument
88
+ doc.selection.select_rectangle({"top": 10, "left": 10, "bottom": 256, "right": 256})
89
+ for channel in doc.channels:
90
+ print(channel.name)
91
+
92
+ text = app.activeText
93
+ if text:
94
+ text.set_contents("Hello from Python")
95
+ text.character_style.update(size=36, tracking=20)
96
+ text.paragraph_style.update(justification="center")
97
+
98
+ layer = app.activeLayer
99
+ if layer:
100
+ layer.filters.apply_gaussian_blur(2)
101
+ layer.smart_object.convert_to_smart_object()
102
+
103
+ doc.exports.jpg_high("C:/renders/demo.jpg")
104
+ ```
@@ -0,0 +1,76 @@
1
+ # adobepy
2
+
3
+ Shared Adobe desktop communication runtime for Python tools and DCC MCP
4
+ adapters. Python talks to a local Rust broker; Adobe applications run thin UXP
5
+ or CEP/ExtendScript bridges.
6
+
7
+ `adobepy` is intended to be the common Adobe host layer for projects such as
8
+ [`dcc-mcp-photoshop`](https://github.com/loonghao/dcc-mcp-photoshop) and future
9
+ Adobe adapters. The public Python surface mirrors Adobe's JavaScript DOM where
10
+ possible, while adding Pythonic aliases for agent and script ergonomics.
11
+
12
+ Implemented pieces:
13
+
14
+ - Rust `adobepy` CLI with `broker`, `doctor`, `install-bridge`, and `repl`.
15
+ - Local JSON-RPC broker with per-session token, target, timeout, and capability gates.
16
+ - Python SDK under `adobe.core`, `adobe.raw`, `adobe.photoshop`, `adobe.indesign`, `adobe.premiere`, `adobe.after_effects`, and `adobe.illustrator`.
17
+ - Optional DCC MCP result helpers under `adobe.dcc_mcp` for adapter skill code.
18
+ - UXP bridge templates for Photoshop, InDesign, and Premiere that dispatch to host APIs and broker raw JavaScript escape hatches.
19
+ - CEP bridge templates for After Effects and Illustrator.
20
+ - IR validation, proxy-aware `.pyi` stub generation, and stub/runtime drift checks.
21
+ - `vx just package` distribution workflow.
22
+
23
+ Validate everything:
24
+
25
+ ```powershell
26
+ npm install
27
+ npm run test:all
28
+ ```
29
+
30
+ The full test suite type-checks bridge code, builds and exercises UXP/CEP
31
+ bundles with mocked host runtimes, validates IR contracts, checks Python
32
+ coverage, and runs Rust workspace tests.
33
+
34
+ Python support starts at 3.8. The current SDK wheel is pure Python; any future
35
+ native Python extension must publish `cp38-abi3-*` wheels rather than
36
+ per-minor-version wheels.
37
+
38
+ Build a redistributable Windows package:
39
+
40
+ ```powershell
41
+ vx just package
42
+ ```
43
+
44
+ The archive is written to `dist/adobepy-0.1.0-windows-x64.zip` with a sibling
45
+ SHA256 file. Usage and packaging notes are in `docs/usage.md` and
46
+ `docs/distribution.md`. Architecture boundaries and Adobe API source tracking
47
+ are documented in `docs/architecture.md`, `docs/api-sources.md`, and
48
+ `docs/dcc-mcp-integration.md`.
49
+
50
+ Python facade example:
51
+
52
+ ```python
53
+ from adobe.photoshop import Photoshop
54
+
55
+ app = Photoshop()
56
+ for layer in app.activeLayers:
57
+ print(layer.name)
58
+
59
+ doc = app.activeDocument
60
+ doc.selection.select_rectangle({"top": 10, "left": 10, "bottom": 256, "right": 256})
61
+ for channel in doc.channels:
62
+ print(channel.name)
63
+
64
+ text = app.activeText
65
+ if text:
66
+ text.set_contents("Hello from Python")
67
+ text.character_style.update(size=36, tracking=20)
68
+ text.paragraph_style.update(justification="center")
69
+
70
+ layer = app.activeLayer
71
+ if layer:
72
+ layer.filters.apply_gaussian_blur(2)
73
+ layer.smart_object.convert_to_smart_object()
74
+
75
+ doc.exports.jpg_high("C:/renders/demo.jpg")
76
+ ```
@@ -0,0 +1,57 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools>=69,<77; python_version < '3.9'",
4
+ "setuptools>=77; python_version >= '3.9'",
5
+ ]
6
+ build-backend = "setuptools.build_meta"
7
+
8
+ [project]
9
+ name = "adobepy"
10
+ version = "0.1.0"
11
+ description = "Python SDK and broker contracts for controlling Adobe desktop hosts through UXP and CEP bridges."
12
+ readme = "README.md"
13
+ requires-python = ">=3.8"
14
+ authors = [{ name = "adobepy contributors" }]
15
+ license = { text = "MIT OR Apache-2.0" }
16
+ keywords = ["adobe", "photoshop", "indesign", "premiere", "after-effects", "illustrator", "uxp", "cep", "python", "mcp"]
17
+ classifiers = [
18
+ "Development Status :: 2 - Pre-Alpha",
19
+ "Intended Audience :: Developers",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.8",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Typing :: Typed",
27
+ "Topic :: Multimedia :: Graphics",
28
+ "Topic :: Software Development :: Libraries :: Python Modules",
29
+ ]
30
+ dependencies = []
31
+
32
+ [project.urls]
33
+ Homepage = "https://github.com/loonghao/adobepy"
34
+ Repository = "https://github.com/loonghao/adobepy"
35
+ "Bug Tracker" = "https://github.com/loonghao/adobepy/issues"
36
+ Documentation = "https://github.com/loonghao/adobepy/tree/main/docs"
37
+
38
+ [tool.setuptools]
39
+ package-dir = {"" = "python"}
40
+ license-files = ["LICENSE-MIT", "LICENSE-APACHE"]
41
+
42
+ [tool.setuptools.packages.find]
43
+ where = ["python"]
44
+ exclude = ["tests", "tests.*"]
45
+ namespaces = false
46
+
47
+ [tool.setuptools.package-data]
48
+ "*" = ["py.typed", "*.pyi"]
49
+
50
+ [tool.coverage.run]
51
+ branch = true
52
+ source = ["python/adobe", "generators"]
53
+
54
+ [tool.coverage.report]
55
+ fail_under = 90
56
+ show_missing = true
57
+ skip_covered = true
@@ -0,0 +1,3 @@
1
+ from __future__ import annotations
2
+
3
+ __all__ = ["after_effects", "core", "dcc_mcp", "illustrator", "indesign", "photoshop", "premiere", "raw"]
@@ -0,0 +1,5 @@
1
+ from __future__ import annotations
2
+
3
+ from .session import AfterEffects, AfterEffectsSession, ProjectProxy, connect, connect_async
4
+
5
+ __all__ = ["AfterEffects", "AfterEffectsSession", "ProjectProxy", "connect", "connect_async"]