# Quickstart

This example checks a dataset description using F-UJI 3.5.1.

## Install

Requires Python 3.12+ and access to the repository. Add the library to your
[uv](https://docs.astral.sh/uv/) project:

```sh
uv add git+https://github.com/Dans-labs/local-offline-assessor-for-fair-loaf.git
```

## Assess metadata

Save this as `assess.py`:

```python
from fair_offline_assessor import Assessor

result = Assessor("FUJI", version="3.5.1").assess(
    metadata={
        "@context": "https://schema.org",
        "@type": "Dataset",
        "@id": "https://example.org/datasets/1",
        "name": "Example dataset",
        "license": "https://creativecommons.org/licenses/by/4.0/",
    }
)

print(result.model_dump_json(indent=2))
```

Run it from your project:

```sh
uv run python assess.py
```

This description uses JSON-LD, a JSON format that gives field names agreed
meanings. Here, `@context` says to use Schema.org's meanings for `Dataset`, `name`
and `license`. The library includes that context, so it needs no network request.

## Read the result

* `tests`: what each check found and the points awarded.
* `diagnostics`: problems with the supplied metadata.

This small example does not meet every requirement. Missing information can
cause a check to fail or leave it `indeterminate`, depending on the check.
`indeterminate` means the library cannot decide; it receives no score.

Omit `version` to use the selected assessor's default. See [F-UJI](/local-offline-assessor-for-fair-loaf/assessors/fuji)
for its requirements and other formats, and [Results](/local-offline-assessor-for-fair-loaf/results) for the response.

## Use FAIR Champion

Choose `Assessor("FAIR_CHAMPION", version="0.5.12")` and pass the identifier being
assessed as `target_identifier` alongside the JSON-LD metadata. It returns check
outcomes without numerical scores. The version refers to FAIR Core Tests.
See the [Champion example](/local-offline-assessor-for-fair-loaf/assessors/champion#assess-metadata) and its input requirements.
