diff options
| author | A Farzat <a@farzat.xyz> | 2025-08-19 19:48:03 +0300 |
|---|---|---|
| committer | A Farzat <a@farzat.xyz> | 2025-08-19 19:48:03 +0300 |
| commit | 4b14119c651e3a7ce9425d015ccde26765b93e91 (patch) | |
| tree | 51d8dca8a1212f9692dc5100f5b86278a7d65298 /data-collection/components/users/typing.py | |
| parent | 9af9e9031a460fe6e26f61cbae84c23c88606bcc (diff) | |
| download | csca5028-4b14119c651e3a7ce9425d015ccde26765b93e91.tar.gz csca5028-4b14119c651e3a7ce9425d015ccde26765b93e91.zip | |
Create a TypedDict for users
Diffstat (limited to 'data-collection/components/users/typing.py')
| -rw-r--r-- | data-collection/components/users/typing.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/data-collection/components/users/typing.py b/data-collection/components/users/typing.py new file mode 100644 index 0000000..f03eecb --- /dev/null +++ b/data-collection/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] |
