CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-josepy

tessl install tessl/pypi-josepy@2.1.0

JOSE protocol implementation in Python with support for JSON Web Algorithms, Keys, and Signatures

Agent Success

Agent success rate when using this tile

73%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.16x

Baseline

Agent success rate without this tile

63%

task.mdevals/scenario-3/

Key Registry Helpers

Utilities for deduplicating asymmetric keys and exposing immutable connection settings for secure clients. Use the dependency's built-in comparable key wrappers for equality and hashing, and its immutable mapping utility for frozen configuration state.

Capabilities

Deduplicate keys by material

  • Loading the same RSA private key from PEM twice results in one stored entry after initialization; mixing with a different RSA key keeps two unique entries. @test

Public-only view

  • Requesting public keys returns unique public variants matching stored private keys and ignores duplicate material. @test

Metadata lookup by key

  • A mapping from key to label allows retrieving the label using another object representing the same underlying RSA key material. @test

Immutable connection options

  • Creating connection options with host/port/timeouts yields attribute access; calling merge returns a new instance with overrides while the original remains unchanged and both are hashable. @test

Implementation

@generates

API

from typing import Any, Iterable, Mapping, Sequence

class KeyRegistry:
    def __init__(self, keys: Sequence[Any] = ()): ...
    def add(self, key: Any, label: str = "") -> None: ...
    def keys(self) -> Iterable[Any]: ...
    def public_keys(self) -> Iterable[Any]: ...
    def key_labels(self) -> Mapping[Any, str]: ...

class ConnectionOptions:
    def __init__(self, **kwargs): ...
    def merge(self, **kwargs) -> "ConnectionOptions": ...
    def as_mapping(self) -> Mapping[str, Any]: ...

Dependencies { .dependencies }

josepy { .dependency }

Provides comparable wrappers for cryptography keys and immutable mapping utilities. @satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/josepy@2.1.x
tile.json