From 5569f20b8bf877edbdac3240144835f5e1495e13 Mon Sep 17 00:00:00 2001 From: 0xWheatyz Date: Thu, 27 Nov 2025 19:22:43 -0500 Subject: [PATCH] refactor: dataclasses are now defined as types in types.py --- SPARC/__init__.py | 6 ++++++ SPARC/types.py | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 SPARC/types.py diff --git a/SPARC/__init__.py b/SPARC/__init__.py index e69de29..d2a6334 100644 --- a/SPARC/__init__.py +++ b/SPARC/__init__.py @@ -0,0 +1,6 @@ +from .types import Patents, Patent + +all = [ + "Patents", + "Patent" +] diff --git a/SPARC/types.py b/SPARC/types.py new file mode 100644 index 0000000..fa9fa61 --- /dev/null +++ b/SPARC/types.py @@ -0,0 +1,11 @@ +from dataclass import dataclass + +@dataclass +class Patent: + patent_id: int + pdf_link: str + summary: dict + +@dataclass +class Patents: + patents: list[Patent]