from pydantic import BaseModel
class Test(BaseModel):
val1 = str
val2 = str
test = {
"val1": "1010101",
"val2": "1010101",
}
test_value= Test(**test)
print(test_value) # this doesn't display anything
print(test_value.val1) # this only display `<class 'str'>`
I have this simple structure of using pydantic. But when I try to print the value, it doesn't display anything.
Am I missing something here?