Skip to content

Asset

🛈 DocStrings

Model representing a release asset.

Source code in src/githarbor/core/models.py
@dataclass
class Asset:
    """Model representing a release asset."""

    name: str
    """Name of the asset."""
    url: str
    """Download URL for the asset."""
    size: int
    """Size of the asset in bytes."""
    download_count: int = 0
    """Number of times the asset has been downloaded."""
    created_at: datetime | None = None
    """Date and time when the asset was created."""
    updated_at: datetime | None = None
    """Date and time when the asset was last updated."""

created_at class-attribute instance-attribute

created_at: datetime | None = None

Date and time when the asset was created.

download_count class-attribute instance-attribute

download_count: int = 0

Number of times the asset has been downloaded.

name instance-attribute

name: str

Name of the asset.

size instance-attribute

size: int

Size of the asset in bytes.

updated_at class-attribute instance-attribute

updated_at: datetime | None = None

Date and time when the asset was last updated.

url instance-attribute

url: str

Download URL for the asset.

:fa-brands-github: Show source on GitHub