Now there are several other libraries that do this thing, but at the time (python3.5 and 3.6) it was the only option.
So you can do like a = typedload.load(json_data, int) and then "a" is considered to be an int and at runtime will be an int.
Of course your static checker should prevent you from doing a + "string" later on because that would fail.
However, if you mean annotating a local variable with a type, then no, nothing will stop it at runtime. If you use a type checker, though, it will tell you that statically.
The ecosystem also offers other runtime validation options, such as beartype [3]. For example, you can annotate a function such that it always checks the data types of input parameters when called. You can even apply this to a whole module if you want, but I don't think that's commonly done.
[1] https://docs.pydantic.dev/latest/api/config/#pydantic.config...
[2] https://docs.pydantic.dev/latest/api/config/#pydantic.config...