initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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__
|
||||
Reference in New Issue
Block a user