Feature-routing certificate service for Swarmauri
Project description
Swarmauri Certs Composite
Routing certificate service delegating to child providers based on requested features.
Installation
pip install swarmauri_certs_composite
Usage
The composite accepts a sequence of certificate service implementations and routes each call to the first provider that advertises a matching capability. Below is a minimal example using two toy providers:
from swarmauri_certs_composite import CompositeCertService
from swarmauri_base.certs.CertServiceBase import CertServiceBase
class SelfSignedOnly(CertServiceBase):
def supports(self):
return {"features": ("self_signed",)}
async def create_self_signed(self, key, subject, **kw):
return b"self-signed-cert"
class CsrOnly(CertServiceBase):
def supports(self):
return {"features": ("csr",)}
async def create_csr(self, key, subject, **kw):
return b"csr-data"
svc = CompositeCertService([SelfSignedOnly(), CsrOnly()])
# create a self-signed certificate - routed to SelfSignedOnly
cert = await svc.create_self_signed("key", {"CN": "example"})
# create a CSR and explicitly route to the second provider by class name
csr = await svc.create_csr("key", {"CN": "example"}, opts={"backend": "CsrOnly"})
supports() aggregates the advertised features of all child providers,
allowing callers to inspect available capabilities before invoking them.
Entry point
The provider is registered under the swarmauri.certs entry-point as CompositeCertService.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmauri_certs_composite-0.3.0.dev4.tar.gz.
File metadata
- Download URL: swarmauri_certs_composite-0.3.0.dev4.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56b80fec4b062bd5d3452263ec44c12c40ecc99be094545e53eb6c22052b1ecd
|
|
| MD5 |
6e7513aacba9c56e20e0487606a7c528
|
|
| BLAKE2b-256 |
354d5f963dbec73e336f11c4c361d410819c84447d2c2680d39391026e7d1d06
|
File details
Details for the file swarmauri_certs_composite-0.3.0.dev4-py3-none-any.whl.
File metadata
- Download URL: swarmauri_certs_composite-0.3.0.dev4-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe558ea9a723cd1cfdda1f43211c613f74bdad30d118a9cb59525c5602dc35c3
|
|
| MD5 |
ee549763e676da713c3d610009d64cf5
|
|
| BLAKE2b-256 |
5e0ade90f90fc3fcf0066cc6ef489c22342962099817c3bec91d2d92dca54334
|