Skip to content

Commit

Permalink
missing file from track tree
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalGawor committed Oct 3, 2024
1 parent 6ff440a commit c35a92a
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions doglib/dogdataclasses.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
from dataclasses import dataclass
from typing import List, Union


@dataclass
class ReferencedResource:
pid: str
data_type: str


@dataclass
class ReferencedResources:
"""
Referenced resources by resource type
"""
resource_type: str
ref_resources: List[ReferencedResource]


@dataclass
class FetchResult(dict):
"""
Parser's fetch result serialisation
{
"description": str
"license": str
"ref_files": [ReferencedResource]
"title": str
}
"""
description: Union[str, List[str]]
license: Union[str, List[str]]
ref_files: List[ReferencedResources]
title: Union[str, List[str]]


@dataclass
class IdentifyResult(dict):
"""
Parser's identify result serialisation
{
"description": str
"item_title": str
"reverse_pid": str
}
"""
description: Union[str, List[str]]
item_title: str
reverse_pid: str

0 comments on commit c35a92a

Please sign in to comment.