tessl install tessl/pypi-josepy@2.1.0JOSE 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%
A lightweight audit record model that must support partial and full JSON conversion for nested objects, plus robust string serialization for storage and transport.
Alice viewing /systems/1 yields a mapping where resource, action, and details are plain types while actor remains a library-aware object instead of a dict; the details map contains {"ip": "127.0.0.1"} @testname, role, claims, and an ISO-8601 issued_at string; details keeps the ip entry @test@generates
from dataclasses import dataclass, field
from datetime import datetime
from typing import Any, Dict, Union
@dataclass
class ActorProfile:
name: str
role: str
issued_at: datetime
claims: Dict[str, Any] = field(default_factory=dict)
def to_partial_json(self) -> Any: ...
def to_json(self) -> Any: ...
@classmethod
def from_json(cls, jobj: Any) -> "ActorProfile": ...
@dataclass
class AuditRecord:
actor: ActorProfile
resource: str
action: str
details: Dict[str, Any] = field(default_factory=dict)
def to_partial_json(self) -> Any: ...
def to_json(self) -> Any: ...
def dumps(self, pretty: bool = False) -> str: ...
@classmethod
def loads(cls, data: Union[str, bytes]) -> "AuditRecord": ...Use the package's JSON serialization helpers to implement partial vs full conversion, safe loading from JSON strings, and pretty output.