(source: str)
| 75 | |
| 76 | |
| 77 | def load_text(source: str) -> str: |
| 78 | if source.startswith("http://") or source.startswith("https://"): |
| 79 | with urlopen(source, timeout=30) as response: |
| 80 | return response.read().decode("utf-8") |
| 81 | return Path(source).read_text(encoding="utf-8") |
| 82 | |
| 83 | |
| 84 | def schema_signature(schema: Any) -> Optional[str]: |