harp_apps.http_cache.adapters

Inheritance diagram of harp_apps.http_cache.adapters

class AsyncStorageAdapter[source]

Bases: object

Adapter that serializes/deserializes Entry objects to/from HARP blob storage.

This maintains backward compatibility with the YAML serialization format while adapting to hishel 1.0’s Entry-based model.

__init__(storage)[source]
Parameters:

storage (IBlobStorage)

async retrieve_entry(key)[source]

Retrieve an Entry object from blob storage.

Args:

key: The cache key

Returns:

The Entry if found, None otherwise

Parameters:

key (str)

Return type:

Entry | None

async store_entry(key, entry)[source]

Store an Entry object in blob storage.

Args:

key: The cache key entry: The Entry to store

Returns:

The stored Blob

Parameters:
  • key (str)

  • entry (Entry)

Return type:

Blob

class SerializedRequest[source]

Bases: TypedDict

extensions: dict[str, str]
headers: str
method: str
url: str
varying: dict[str, str]
class SerializedResponse[source]

Bases: TypedDict

body: str
extensions: dict[str, str]
headers: str
status: int
varying: dict[str, str]