BlobRef (blobstore/ref.py)

autocontext · autocontext/src/autocontext/blobstore/ref.py · python · Apache-2.0
database, tag:embed-classified

Stores references to artifact blobs with metadata and serialization helpers for easy integration.

# Source: https://github.com/greyhaven-ai/autocontext | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""BlobRef — structured artifact locator (AC-518)."""

from __future__ import annotations

from dataclasses import dataclass
from pathlib import Path
from typing import Any


@dataclass(slots=True)
class BlobRef:
    """Reference to a blob artifact with optional local and remote locations."""

    kind: str  # "trace", "checkpoint", "report", "model", "export", ...
    digest: str  # "sha256:<hex>"
    size_bytes: int
    local_path: str = ""
    remote_uri: str = ""  # e.g. "hf://org/repo/blobs/key"
    content_type: str = ""
    created_at: str = ""
    retention_class: str = "" 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key