Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /fief-dev_fief /fief /services /localhost.py
| import ipaddress | |
| import re | |
| LOCALHOST_HOST_PATTERN = re.compile(r"([^\.]+\.)?localhost(\d+)?", flags=re.IGNORECASE) | |
| def is_localhost(host: str) -> bool: | |
| try: | |
| return ipaddress.IPv4Address(host).is_private | |
| except ValueError: | |
| return LOCALHOST_HOST_PATTERN.match(host) is not None | |
| __all__ = ["is_localhost"] | |
Xet Storage Details
- Size:
- 332 Bytes
- Xet hash:
- 34420eb7dee3e2caf22ad0300c5bfd41380d3c5365d96022f365fdaff913e104
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.