20 lines
351 B
Python
20 lines
351 B
Python
import json
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass
|
|
class IAItem:
|
|
title: str
|
|
description: str
|
|
subject: str
|
|
creator: str
|
|
date: str
|
|
collection: str
|
|
mediatype: str
|
|
|
|
@classmethod
|
|
def from_json(cls, json_data):
|
|
return cls(**json_data)
|
|
|
|
def __call__(self, *args, **kwargs):
|
|
return self.__dict__ |