Skip to main content

MediaSigner

Swarmauri SDK

MediaSigner

Swarmauri signing facade plugin that aggregates registered SigningBase providers.

pypi: MediaSigner Source version: 0.11.0 Python: >=3.10,<3.15 Layer: plugins Lifecycle: active License: Apache-2.0 Notice: attribution

Monthly PyPI downloads: MediaSigner README hits: MediaSigner

README standards: CI gate Tests: example source Certification: not certified Governance: repository policy Evidence: source and CI

Overview · Installation · Quick Start · Usage · API · Contributing · Governance · License


Overview

Summary

MediaSigner packages the asynchronous Signer facade that orchestrates registered SigningBase providers. Moving the facade into a standalone plugin keeps the core standards library lightweight while still enabling drop-in discovery of specialised signers such as CMS, JWS, OpenPGP, PDF, and XMLDSig providers.

Why This Package

  • Separation of concerns ? standards remain focused on common abstractions while the plugin encapsulates optional dependencies.
  • Explicit opt-in ? downstream projects can install only the signing stacks they need via the curated extras.
  • Consistent ergonomics ? usage matches the historical swarmauri_standard.signing.Signer import, preserving existing tutorials and code samples.

When to Use

Choose MediaSigner when your integration needs swarmauri signing facade plugin that aggregates registered SigningBase providers. Match the imports below to your application boundary and install its declared dependencies before using the example.

Features

  • Unified signing façade ? talk to every installed SigningBase through a single async API that automatically discovers entry-point contributions.
  • Format-aware routing ? delegates signing and verification to the provider registered for a format token such as jws, pdf, or xmld.
  • Optional plugin bundles ? install curated extras (e.g. [plugins]) to bring in all available signer backends in one step.
  • Key-provider integration ? share Swarmauri key providers with the facade so opaque key references resolve before signature creation.
  • Production-ready CLI ? inspect capabilities, sign payloads, and verify results directly from the command line for fast automation.

Non-Goals

MediaSigner owns swarmauri signing facade plugin that aggregates registered SigningBase providers. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.


Getting Started

Prerequisites

Python >=3.10,<3.15 is required. The manifest declares runtime dependencies including swarmauri-core, swarmauri-base, swarmauri-keyprovider-inmemory, cryptography, swarmauri-signing-cms, swarmauri-signing-jws, swarmauri-signing-openpgp, swarmauri-signing-pdf, swarmauri-signing-xmld. Read the example’s inputs and service requirements before execution.

Installation

Using uv

uv add MediaSigner

# install every optional backend
uv add "MediaSigner[plugins]"

The [plugins] extra pulls in CMS, JWS, OpenPGP, PDF, and XMLDSig signers.

Using pip

pip install MediaSigner

# with every optional backend
pip install "MediaSigner[plugins]"

uv

uv add MediaSigner

pip

python -m pip install MediaSigner

Poetry

poetry add MediaSigner

Quick Start

Example

Source: docs/readme/quick_start.py.

import asyncio

from MediaSigner import MediaSigner
from swarmauri_core.key_providers.IKeyProvider import IKeyProvider

# Optionally pass a key provider so plugins receive a shared source for
# retrieving signing material.
key_provider: IKeyProvider | None = None
signer = MediaSigner(key_provider=key_provider)


async def sign_payload(payload: bytes) -> None:
    signatures = await signer.sign_bytes("jws", key="my-key", payload=payload)
    assert signatures, "At least one signature should be returned"
    print(signer.supports("jws"))


asyncio.run(sign_payload(b"payload"))

Expected Result

The example demonstrates the documented MediaSigner source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.


Usage

Common Workflows

Source: docs/readme/usage.py.

import asyncio

from MediaSigner import MediaSigner
from swarmauri_core.key_providers.IKeyProvider import IKeyProvider

# Optionally pass a key provider so plugins receive a shared source for
# retrieving signing material.
key_provider: IKeyProvider | None = None
signer = MediaSigner(key_provider=key_provider)


async def sign_payload(payload: bytes) -> None:
    signatures = await signer.sign_bytes("jws", key="my-key", payload=payload)
    assert signatures, "At least one signature should be returned"
    print(signer.supports("jws"))


asyncio.run(sign_payload(b"payload"))

Integrating a key provider

Any Swarmauri key provider can be shared with the facade so backends receive ready-to-use key material:

import asyncio

from MediaSigner import MediaSigner
from swarmauri_keyprovider_inmemory import InMemoryKeyProvider

provider = InMemoryKeyProvider(keys={"local://demo": b"secret"})
signer = MediaSigner(key_provider=provider)


async def main() -> None:
    signatures = await signer.sign_bytes(
        "jws",
        key="local://demo",
        payload=b"demo",
        alg="HS256",
        opts={"kid": "demo"},
    )
    print(signatures[0].mode)


asyncio.run(main())

Discover installed plugins

Use the facade to list installed signers and inspect their capabilities:

for format_name in signer.supported_formats():
    capabilities = signer.supports(format_name)
    print(format_name, list(capabilities))

Configuration

Configure MediaSigner through the APIs in package source; its manifest describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.

Error Handling

The inspected MediaSigner source raises SystemExit, ValueError. Handle these at the calling boundary and consult the implementation for the triggering conditions.

Best Practices

Use the explicit MediaSigner imports documented below and keep collaborator configuration with the caller. Run the package’s relevant tests after changing MediaSigner; an import or successful installation alone does not establish its runtime guarantees.


Package Boundary

What It Owns

MediaSigner is located in plugins and owns swarmauri signing facade plugin that aggregates registered SigningBase providers. Source-declared APIs include MediaSigner. The manifest records its direct dependency boundary.

Public API and Import Surfaces

Import namespace: MediaSigner.

Source-declared exports or types: MediaSigner.

Inspect package source for exact signatures; this inventory does not designate every internal module as stable.

Entry Points

  • console_scripts → media-signer → MediaSigner.cli:main

Injected Dependencies

The direct installation dependencies of MediaSigner are swarmauri-core, swarmauri-base, swarmauri-keyprovider-inmemory, cryptography, swarmauri-signing-cms, swarmauri-signing-jws, swarmauri-signing-openpgp, swarmauri-signing-pdf, swarmauri-signing-xmld. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in package source.

Protocol Consumers

Direct consumers in this checkout’s package manifests include EmbeddedSigner. These edges describe declared dependencies, not protocol-conformance evidence.

Extensions

For MediaSigner, use the source-declared public interfaces (MediaSigner) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.


Operations and Readiness

Operational Requirements

Operate MediaSigner according to its actual entry points and collaborators. The dependency and Python requirements in the manifest are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.

Health and Observability

This README does not establish a standalone health endpoint for MediaSigner. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.

Security and Resource Limits

Apply the input, credential, and resource constraints implemented in package source. The MediaSigner README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.

Compatibility

This source version of MediaSigner declares Python >=3.10,<3.15. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.


Verification

Tests

Run python -m pytest tests/unit/test_readme_sources.py from the MediaSigner package directory for the maintained example source checks (Python compilation and non-Python file presence). Existing package tests include:

The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.

Certification Status

No external certification is asserted for MediaSigner by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.

Evidence

The README standards CI records mechanical documentation results for its tested commit. The package source and example sources support the package-boundary description; external runtime behavior requires its own test evidence.


FAQ

Why

Why select this package? MediaSigner provides swarmauri signing facade plugin that aggregates registered SigningBase providers; use its own API boundary rather than assuming neighboring packages are bundled or configured automatically.

How

How do I start? Install or synchronize the environment under Getting Started, follow the maintained example for MediaSigner, and consult package source for the exact types and signatures involved.

When

When should I validate an upgrade? Recheck MediaSigner whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.


More Documentation

The repository contribution guide, package source, and manifest provide the supporting context for MediaSigner. The README policy defines the common document structure.


Contributing

How to Contribute

Follow the contribution guide and include a focused example or regression for changes to MediaSigner. Keep package behavior, its documented boundary, and its tests aligned.

Development Setup

Work from the pkgs/60-plugins/media_signer checkout. Synchronize its declared development environment with uv, then run the relevant package tests and python -m pytest tests/unit/test_readme_sources.py. The repository’s dedicated README job installs readme-standards==0.1.3 without resolving unrelated runtime packages.

Notes for Maintainers

Command line utility

MediaSigner ships a small CLI for quick inspection and automation:

media-signer list                 # List available formats
media-signer supports jws         # Show capability metadata
media-signer sign-bytes jws \
  --alg HS256 \
  --key key.json \
  --input payload.bin \
  --output signatures.json

media-signer verify-bytes jws \
  --input payload.bin \
  --sigs signatures.json \
  --opts verify-keys.json

The CLI expects JSON files describing KeyRef objects and verification materials matching the selected plugin.


Governance

Ownership and Decision Making

Changes to MediaSigner follow the maintainer review process of swarmauri/swarmauri-sdk and its contribution guide. Author attribution remains in the manifest; this README does not assign new publishing or administrative authority.

Standards and Policies

MediaSigner follows the versioned package-guide-v1 outline. All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.

Lifecycle and Migration

The MediaSigner source version is 0.11.0.


License and Attribution

License

Licensed under Apache-2.0. See LICENSE.

Notices

See NOTICE for attribution.

Metadata

Release files for MediaSigner 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for MediaSigner 0.11.0
File Size Uploaded Provenance Actions
mediasigner-0.11.0.tar.gz 19.7 kB Without provenance Details for mediasigner-0.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for MediaSigner 0.11.0
File Interpreter ABI Platform Actions
mediasigner-0.11.0-py3-none-any.whl Python 3 none any Details for mediasigner-0.11.0-py3-none-any.whl

Total release size: 35.9 kB

Release files / mediasigner-0.11.0.tar.gz

Download URL mediasigner-0.11.0.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8cf67265776af24410a7a81a015bb289d96805814f706ec140e233427acbfeb3
BLAKE2b-256 checksum
How to use checksums
958cc18a818844de9b200d00d4078223cf239a6995816b191b07a6f8f574495f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.11 {"installer":{"name":"uv","version":"0.13.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mediasigner-0.11.0-py3-none-any.whl

Download URL mediasigner-0.11.0-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1690714d3f31619cb71d54146b9da8c13f3e005455a12eb2fd44be6398848ac8
BLAKE2b-256 checksum
How to use checksums
a7b8176337b71eea77c8d82c68c15ec90086073616c0dbc7094552703296cd54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.11 {"installer":{"name":"uv","version":"0.13.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for MediaSigner 0.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.11.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page