# datamonger.CacheEntry

Datamonger for Python · 0.4.0

[Source](<https://github.com/jolars/datamonger/blob/fbf4417f4d75b63acbb7eb39975add7aedbff2f6/packages/python/src/datamonger/_models.py>)

<a id="constructor"></a>

```python
CacheEntry(
    kind: CacheEntryKind,
    sha256: str,
    size: int,
    modified_at: datetime.datetime,
    path: pathlib.Path,
    valid: bool,
    datasets: tuple[str, ...],
    registry_release: str | None
)
```

One content-addressed object found in the Python client cache.

<a id="kind"></a>

## `kind`

```python
kind: CacheEntryKind = dataclasses.field(init=True)
```

[Source](<https://github.com/jolars/datamonger/blob/fbf4417f4d75b63acbb7eb39975add7aedbff2f6/packages/python/src/datamonger/_models.py>)

a dataset `"artifact"` or a `"registry"` index.

### Type

`Object category`

<a id="sha256"></a>

## `sha256`

```python
sha256: str = dataclasses.field(init=True)
```

[Source](<https://github.com/jolars/datamonger/blob/fbf4417f4d75b63acbb7eb39975add7aedbff2f6/packages/python/src/datamonger/_models.py>)

Expected SHA-256 digest encoded in the object’s cache filename.

<a id="size"></a>

## `size`

```python
size: int = dataclasses.field(init=True)
```

[Source](<https://github.com/jolars/datamonger/blob/fbf4417f4d75b63acbb7eb39975add7aedbff2f6/packages/python/src/datamonger/_models.py>)

Size of the cached file in bytes at inspection time.

<a id="modified_at"></a>

## `modified_at`

```python
modified_at: datetime.datetime = dataclasses.field(init=True)
```

[Source](<https://github.com/jolars/datamonger/blob/fbf4417f4d75b63acbb7eb39975add7aedbff2f6/packages/python/src/datamonger/_models.py>)

File modification time as a timezone-aware UTC datetime.

<a id="path"></a>

## `path`

```python
path: pathlib.Path = dataclasses.field(init=True)
```

[Source](<https://github.com/jolars/datamonger/blob/fbf4417f4d75b63acbb7eb39975add7aedbff2f6/packages/python/src/datamonger/_models.py>)

Local path to the content-addressed cached file.

<a id="valid"></a>

## `valid`

```python
valid: bool = dataclasses.field(init=True)
```

[Source](<https://github.com/jolars/datamonger/blob/fbf4417f4d75b63acbb7eb39975add7aedbff2f6/packages/python/src/datamonger/_models.py>)

Whether the inspected file’s SHA-256 matches the digest in its filename.

<a id="datasets"></a>

## `datasets`

```python
datasets: tuple[str, ...] = dataclasses.field(init=True)
```

[Source](<https://github.com/jolars/datamonger/blob/fbf4417f4d75b63acbb7eb39975add7aedbff2f6/packages/python/src/datamonger/_models.py>)

Sorted dataset identifiers referencing this artifact in known registry indexes.

Registry entries and artifacts with no known references have an empty tuple.
References come from the bundled index and valid cached indexes.

<a id="registry_release"></a>

## `registry_release`

```python
registry_release: str | None = dataclasses.field(init=True)
```

[Source](<https://github.com/jolars/datamonger/blob/fbf4417f4d75b63acbb7eb39975add7aedbff2f6/packages/python/src/datamonger/_models.py>)

Release read from a valid cached registry index, or `None` if unavailable.

Artifact entries always use `None`.
