Method
parse_file
(
cls: Type['Model'],
path: Union[str, Path],
*,
content_type: str = None,
encoding: str = 'utf8',
proto: Protocol = None,
allow_pickle: bool = False,
)
Source from the content-addressed store, hash-verified
| 573 | |
| 574 | @classmethod |
| 575 | def parse_file( |
| 576 | cls: Type['Model'], |
| 577 | path: Union[str, Path], |
| 578 | *, |
| 579 | content_type: str = None, |
| 580 | encoding: str = 'utf8', |
| 581 | proto: Protocol = None, |
| 582 | allow_pickle: bool = False, |
| 583 | ) -> 'Model': |
| 584 | obj = load_file( |
| 585 | path, |
| 586 | proto=proto, |
| 587 | content_type=content_type, |
| 588 | encoding=encoding, |
| 589 | allow_pickle=allow_pickle, |
| 590 | json_loads=cls.__config__.json_loads, |
| 591 | ) |
| 592 | return cls.parse_obj(obj) |
| 593 | |
| 594 | @classmethod |
| 595 | def from_orm(cls: Type['Model'], obj: Any) -> 'Model': |
Callers
nothing calls this directly
Tested by
no test coverage detected