From 69bcc9822c82ee6d726c98deafbdd0a20527a55a Mon Sep 17 00:00:00 2001 From: A Farzat Date: Thu, 21 Aug 2025 09:41:56 +0300 Subject: Move components to root directory Some components might be shared with other applications such as the data analyser later on. --- components/users/typing.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 components/users/typing.py (limited to 'components/users/typing.py') diff --git a/components/users/typing.py b/components/users/typing.py new file mode 100644 index 0000000..f03eecb --- /dev/null +++ b/components/users/typing.py @@ -0,0 +1,13 @@ +from datetime import datetime +from typing import TypedDict, NamedTuple, List, Tuple +from bson.objectid import ObjectId + +class SubscriptionItem(NamedTuple): + id: str + time_between_fetches: int + last_viewed: datetime + +class UserDict(TypedDict): + id: ObjectId + name: str + subscriptions: List[SubscriptionItem] -- cgit v1.2.3-70-g09d2