From 5168786dc9d1179810b5e975d0d1ec7ee8351f68 Mon Sep 17 00:00:00 2001 From: Michelle Tran Date: Thu, 22 Aug 2024 20:20:37 -0400 Subject: [PATCH] Add pydantic --- play_with_pydantic.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 play_with_pydantic.py diff --git a/play_with_pydantic.py b/play_with_pydantic.py new file mode 100644 index 0000000..cb1a979 --- /dev/null +++ b/play_with_pydantic.py @@ -0,0 +1,10 @@ +from pydantic.dataclasses import dataclass + +@dataclass +class Foo: + bar: str + + +if __name__ == "__main__": + print(Foo(bar="hello")) + print(Foo(bar="hello", not_valid="huh"))