EmbeddedSigner 0.1.4.dev19__py3-none-any.whl → 0.1.5.dev1__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.
@@ -1,28 +1,30 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: EmbeddedSigner
3
- Version: 0.1.4.dev19
3
+ Version: 0.1.5.dev1
4
4
  Summary: Embed XMP metadata and sign media assets using Swarmauri plugins.
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
7
7
  Keywords: xmp,signing,swarmauri,metadata,security,digital-rights-management,drm,license-rights,embedded-licensing,tamper-proofing,tamper-evidence,content-protection,png,gif,jpeg,svg,webp,tiff,pdf,mp4,digital-asset-security,metadata-signing,workflow-automation,plugin-orchestration,asyncio,plugin,digital-asset-workflows,cms,pkcs7,cades,jws,openpgp,pdf-signatures,xmldsig
8
8
  Author: Jacob Stewart
9
9
  Author-email: jacob@swarmauri.com
10
- Requires-Python: >=3.10,<3.13
10
+ Requires-Python: >=3.10,<3.15
11
11
  Classifier: Development Status :: 1 - Planning
12
12
  Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Natural Language :: English
14
- Classifier: Programming Language :: Python
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3 :: Only
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
- Classifier: Programming Language :: Python :: 3.12
20
14
  Classifier: Framework :: AsyncIO
21
15
  Classifier: Topic :: Security :: Cryptography
22
16
  Classifier: Operating System :: OS Independent
23
17
  Classifier: Topic :: Multimedia :: Graphics
24
18
  Classifier: Topic :: Multimedia :: Video
25
19
  Classifier: Intended Audience :: Developers
20
+ Classifier: Programming Language :: Python
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3 :: Only
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Programming Language :: Python :: 3.14
26
28
  Provides-Extra: full
27
29
  Provides-Extra: local
28
30
  Provides-Extra: memory
@@ -96,161 +98,21 @@ Project-URL: Issues, https://github.com/swarmauri/swarmauri-sdk/issues
96
98
  Project-URL: Source, https://github.com/swarmauri/swarmauri-sdk/tree/main/pkgs/plugins/embedded_signer
97
99
  Description-Content-Type: text/markdown
98
100
 
99
- <p align="center">
100
- <img src="../../../assets/swarmauri.brand.theme.svg" alt="Swarmauri logotype" width="420" />
101
- </p>
102
-
103
- <h1 align="center">EmbeddedSigner</h1>
101
+ ![Swarmauri Logo](https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri_sdk_brand.png)
104
102
 
105
103
  <p align="center">
106
- <a href="https://img.shields.io/pypi/dm/EmbeddedSigner?style=for-the-badge"><img src="https://img.shields.io/pypi/dm/EmbeddedSigner?style=for-the-badge" alt="PyPI - Downloads" /></a>
107
- <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/main/pkgs/plugins/embedded_signer/"><img src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/main/pkgs/plugins/embedded_signer.svg?style=for-the-badge" alt="Repo views" /></a>
108
- <a href="https://img.shields.io/pypi/pyversions/EmbeddedSigner?style=for-the-badge"><img src="https://img.shields.io/pypi/pyversions/EmbeddedSigner?style=for-the-badge" alt="Supported Python versions" /></a>
109
- <a href="https://img.shields.io/pypi/l/EmbeddedSigner?style=for-the-badge"><img src="https://img.shields.io/pypi/l/EmbeddedSigner?style=for-the-badge" alt="License" /></a>
110
- <a href="https://img.shields.io/pypi/v/EmbeddedSigner?style=for-the-badge"><img src="https://img.shields.io/pypi/v/EmbeddedSigner?style=for-the-badge" alt="Latest release" /></a>
104
+ <a href="https://pepy.tech/project/EmbeddedSigner/">
105
+ <img src="https://static.pepy.tech/badge/EmbeddedSigner/month" alt="PyPI - Downloads"/></a>
106
+ <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/plugins/embedded_signer/">
107
+ <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/plugins/embedded_signer.svg"/></a>
108
+ <a href="https://pypi.org/project/EmbeddedSigner/">
109
+ <img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
110
+ <a href="https://pypi.org/project/EmbeddedSigner/">
111
+ <img src="https://img.shields.io/pypi/l/EmbeddedSigner" alt="PyPI - License"/></a>
112
+ <a href="https://pypi.org/project/EmbeddedSigner/">
113
+ <img src="https://img.shields.io/pypi/v/EmbeddedSigner?label=EmbeddedSigner&color=green" alt="PyPI - EmbeddedSigner"/></a>
111
114
  </p>
112
115
 
113
- EmbeddedSigner composes the dynamic XMP embedding utilities from
114
- [`EmbedXMP`](../EmbedXMP) with the signing facade exposed by
115
- [`MediaSigner`](../media_signer). It embeds metadata into media assets and then
116
- routes signing requests to the appropriate media-aware signer in either
117
- attached or detached mode. The class orchestrates key provider plugins so that
118
- opaque key references can be resolved automatically before signatures are
119
- produced.
120
-
121
- ## Features
122
-
123
- - **One-shot embed & sign** – inject XMP metadata and produce signatures with a
124
- single call.
125
- - **Media-aware detection** – delegates to all registered `EmbedXmpBase`
126
- handlers so PNG, GIF, JPEG, SVG, WEBP, TIFF, PDF, and MP4 assets are
127
- processed consistently.
128
- - **Pluggable signers** – forwards signing requests to every
129
- `SigningBase` registered with `MediaSigner`, including CMS, JWS, OpenPGP, PDF,
130
- and XMLDSig providers.
131
- - **Key provider integration** – loads providers from the
132
- `swarmauri.key_providers` entry point group and resolves opaque key reference
133
- strings (e.g. `local://kid@2`) before invoking a signer.
134
- - **Attached or detached output** – toggle between embedded signatures or
135
- detached artifacts via a simple flag.
136
- - **File and byte workflows** – operate on in-memory payloads or update files
137
- on disk with helpers for embedding, reading, removing, and signing.
138
- - **Command line tooling** – bundle a ready-to-use `embedded-signer` CLI for
139
- ad-hoc embedding, signing, and combined workflows.
140
-
141
- ## Installation
142
-
143
- ### Using `uv`
144
-
145
- ```bash
146
- uv add EmbeddedSigner
147
- ```
148
-
149
- Optional dependencies align with the available key providers, EmbedXMP handlers,
150
- and MediaSigner backends:
151
-
152
- ```bash
153
- uv add "EmbeddedSigner[local]" # enable LocalKeyProvider resolution
154
- uv add "EmbeddedSigner[memory]" # enable InMemoryKeyProvider resolution
155
- uv add "EmbeddedSigner[xmp_png]" # add PNG embedding support
156
- uv add "EmbeddedSigner[xmp_all]" # install every EmbedXMP handler
157
- uv add "EmbeddedSigner[signing_pdf]" # enable PDF signer backend
158
- uv add "EmbeddedSigner[signing_all]" # install every MediaSigner backend
159
- uv add "EmbeddedSigner[full]" # bring in all extras and key providers
160
- ```
161
-
162
- ### Using `pip`
163
-
164
- ```bash
165
- pip install EmbeddedSigner
166
- ```
167
-
168
- Extras mirror the `uv` workflow:
169
-
170
- ```bash
171
- pip install "EmbeddedSigner[local]"
172
- pip install "EmbeddedSigner[memory]"
173
- pip install "EmbeddedSigner[xmp_png]"
174
- pip install "EmbeddedSigner[xmp_all]"
175
- pip install "EmbeddedSigner[signing_pdf]"
176
- pip install "EmbeddedSigner[signing_all]"
177
- pip install "EmbeddedSigner[full]"
178
- ```
179
-
180
- ### Extras overview
181
-
182
- | Extra name | Purpose |
183
- | --- | --- |
184
- | `local` / `memory` | Enable Swarmauri key provider resolution for local filesystem and in-memory secrets. |
185
- | `xmp_gif`, `xmp_jpeg`, `xmp_png`, `xmp_svg`, `xmp_webp`, `xmp_tiff`, `xmp_pdf`, `xmp_mp4` | Pull in the corresponding `swarmauri_xmp_*` handler so EmbedXMP can embed metadata for that media format. |
186
- | `xmp_all` | Install every EmbedXMP media handler dependency at once. |
187
- | `signing_cms`, `signing_jws`, `signing_openpgp`, `signing_pdf`, `signing_xmld` | Add the matching MediaSigner backend plugin for CMS, JWS, OpenPGP, PDF, or XMLDSig signing. |
188
- | `signing_all` | Install all MediaSigner backends together. |
189
- | `full` | Bring in every key provider, EmbedXMP handler, and MediaSigner backend for maximum coverage. |
190
-
191
- ## Usage
192
-
193
- ```python
194
- import asyncio
195
- from pathlib import Path
196
-
197
- from EmbeddedSigner import EmbedSigner
198
-
199
- xmp_xml = """
200
- <x:xmpmeta xmlns:x="adobe:ns:meta/">
201
- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
202
- <rdf:Description rdf:about=""/>
203
- </rdf:RDF>
204
- </x:xmpmeta>
205
- """.strip()
206
-
207
- async def embed_and_sign() -> None:
208
- signer = EmbedSigner()
209
- media_bytes = Path("image.png").read_bytes()
210
- embedded, signatures = await signer.embed_and_sign_bytes(
211
- media_bytes,
212
- fmt="JWSSigner",
213
- xmp_xml=xmp_xml,
214
- key={"kind": "raw", "key": b"\x00" * 32},
215
- path="image.png",
216
- attached=True,
217
- signer_opts={"alg": "HS256"},
218
- )
219
- Path("image.signed.png").write_bytes(embedded)
220
- print(signatures[0].mode) # "attached"
221
-
222
- asyncio.run(embed_and_sign())
223
- ```
224
-
225
- ### Key provider integration
226
-
227
- When you install a key provider plugin such as
228
- `swarmauri_keyprovider_local`, EmbeddedSigner can resolve string key references
229
- on the fly:
230
-
231
- ```python
232
- signer = EmbedSigner(key_provider_name="LocalKeyProvider")
233
- embedded, signatures = await signer.embed_and_sign_file(
234
- Path("report.pdf"),
235
- fmt="PDFSigner",
236
- xmp_xml=xmp_xml,
237
- key="LocalKeyProvider://a1b2c3@1",
238
- attached=False,
239
- signer_opts={"alg": "SHA256"},
240
- )
241
- ```
242
-
243
- EmbeddedSigner parses the opaque reference, looks up the provider by name, and
244
- retrieves the specified key version using the provider's asynchronous API.
245
-
246
- ### File helpers
247
-
248
- `EmbedSigner` offers mirrored helpers that operate on file paths when you need
249
- to persist updates directly on disk:
250
-
251
- ```python
252
- signer = EmbedSigner()
253
-
254
116
  # Embed metadata into a file and write it back in place.
255
117
  signer.embed_file("image.png", xmp_xml)
256
118
 
@@ -320,8 +182,8 @@ embedded-signer embed-sign example.png \
320
182
 
321
183
  ## Project Resources
322
184
 
323
- - Source: <https://github.com/swarmauri/swarmauri-sdk/tree/main/pkgs/plugins/embedded_signer>
324
- - Documentation: <https://github.com/swarmauri/swarmauri-sdk/tree/main/pkgs/plugins/embedded_signer#readme>
185
+ - Source: <https://github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/plugins/embedded_signer>
186
+ - Documentation: <https://github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/plugins/embedded_signer#readme>
325
187
  - Issues: <https://github.com/swarmauri/swarmauri-sdk/issues>
326
188
  - Releases: <https://github.com/swarmauri/swarmauri-sdk/releases>
327
189
  - Discussions: <https://github.com/orgs/swarmauri/discussions>
@@ -0,0 +1,8 @@
1
+ EmbeddedSigner/__init__.py,sha256=PTcO_55bD8K70SqZmI0KzgYjkqmhI7rLpHdQTwvOCbU,119
2
+ EmbeddedSigner/_embed_signer.py,sha256=rorOvU5Bp9u6chWmRvOYxNinpXmMWpaOuXJcmwGyjb4,12547
3
+ EmbeddedSigner/cli.py,sha256=3xRzdMkrjA5NQ1QAutwxTSWWGMxsSrsBYAJ2aOn913k,10537
4
+ embeddedsigner-0.1.5.dev1.dist-info/METADATA,sha256=gXkOmVdvPTWvSKBiRMn9rDRTjKrK87_LTo0mQkaF7RI,8349
5
+ embeddedsigner-0.1.5.dev1.dist-info/WHEEL,sha256=EGEvSphFYqXKs23-kQBeyNoJP1nrT8ZJKQoi5p5DYL8,88
6
+ embeddedsigner-0.1.5.dev1.dist-info/entry_points.txt,sha256=EwpGp4nYOLoLHwGiNMGvCjOb6RmHd3kOnKcV40Ce6kM,59
7
+ embeddedsigner-0.1.5.dev1.dist-info/licenses/LICENSE,sha256=djUXOlCxLVszShEpZXshZ7v33G-2qIC_j9KXpWKZSzQ,11359
8
+ embeddedsigner-0.1.5.dev1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.3.1
2
+ Generator: poetry-core 2.4.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,8 +0,0 @@
1
- EmbeddedSigner/__init__.py,sha256=PTcO_55bD8K70SqZmI0KzgYjkqmhI7rLpHdQTwvOCbU,119
2
- EmbeddedSigner/_embed_signer.py,sha256=rorOvU5Bp9u6chWmRvOYxNinpXmMWpaOuXJcmwGyjb4,12547
3
- EmbeddedSigner/cli.py,sha256=3xRzdMkrjA5NQ1QAutwxTSWWGMxsSrsBYAJ2aOn913k,10537
4
- embeddedsigner-0.1.4.dev19.dist-info/METADATA,sha256=ogb5u_-6k1GAshdkb5_WpXxzMEAIuVR9sYynQKnlJ3w,13295
5
- embeddedsigner-0.1.4.dev19.dist-info/WHEEL,sha256=kJCRJT_g0adfAJzTx2GUMmS80rTJIVHRCfG0DQgLq3o,88
6
- embeddedsigner-0.1.4.dev19.dist-info/entry_points.txt,sha256=EwpGp4nYOLoLHwGiNMGvCjOb6RmHd3kOnKcV40Ce6kM,59
7
- embeddedsigner-0.1.4.dev19.dist-info/licenses/LICENSE,sha256=djUXOlCxLVszShEpZXshZ7v33G-2qIC_j9KXpWKZSzQ,11359
8
- embeddedsigner-0.1.4.dev19.dist-info/RECORD,,