Metadata-Version: 2.5
Name: open-repair-record
Version: 1.0.0
Summary: Read, validate and check Open Repair Record 1.0 files: what a completed repair actually means.
Project-URL: Homepage, https://openrepairrecord.com/tools/
Project-URL: Source, https://github.com/DmytroRybka/open-repair-record
Project-URL: Issues, https://github.com/DmytroRybka/open-repair-record/issues
Author: Dmytro Rybka
License-Expression: MIT
License-File: LICENSE
Keywords: facility-management,json-schema,maintenance,property-management,repair,work-order
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# open-repair-record (Python)

Read, validate and check [Open Repair Record](https://openrepairrecord.com) 1.0 files: what a completed repair actually
means. No dependencies; Python 3.9+.

The same rules, codes and messages as the editor at openrepairrecord.com, the TypeScript package and the .NET library:
all of them pass the same shared test vectors.

```bash
pip install open-repair-record
```

```python
from open_repair_record import parse, check, resident_request

result = parse(open("Q-1204.orr.json", encoding="utf-8").read())
if result.record is None:
    print("Not a valid record:", result.errors)          # plain words, e.g. 'resident.status: must be one of ...'
else:
    for f in check(result.record):                        # contradictions, missing parts, tips
        print(f["level"], f["section"], f.get("index"), f["message"])
    print(resident_request(result.record))                # a neutral yes/no question for the resident
```

Also: `validate(data)` for parsed JSON, `clean(record)` (drops what nobody wrote, stable key order), `empty_record()`,
`contractor_request(record)`, the labels for every code, `format_date`, `ORR_VERSION`, `SCHEMA_URL`, and `SCHEMA`
(the JSON Schema itself, shipped in the package). Records are plain `dict`s, exactly as parsed from JSON.

Findings look like `{"code": "confirmed-without-yes", "level": "contradiction", "section": "closure", "message": "..."}`;
`index` is added for entries in a list (`work`, `checks`, `evidence`, `open_items`, `history`), counted from 0.

No reply stays no reply; a closure "confirmed by the resident" needs the resident's yes; a temporary fix needs an open
item; a photo is never required. The rules: [openrepairrecord.com/format/](https://openrepairrecord.com/format/).

MIT. Initiated by the [PMFriend](https://pmfriend.com/) team.
