Download app/models/source.py from oyi77/1proxy: direct link, hf CLI and curl.
- Browser
- Download file 501 Bytes
-
https://huggingface.co/spaces/oyi77/1proxy/resolve/1998928f9152e05df87515ea77d6c4bbcc7e59b2/app/models/source.py
- Command line
-
hf download hf://spaces/oyi77/1proxy@1998928f9152e05df87515ea77d6c4bbcc7e59b2/app/models/source.py
-
curl -L -o source.py https://huggingface.co/spaces/oyi77/1proxy/resolve/1998928f9152e05df87515ea77d6c4bbcc7e59b2/app/models/source.py
501 Bytes
| from pydantic import BaseModel, Field, HttpUrl, ConfigDict | |
| from typing import Optional | |
| from enum import Enum | |
| class SourceType(str, Enum): | |
| GITHUB_RAW = "github_raw" | |
| SUBSCRIPTION_BASE64 = "subscription_base64" | |
| GENERIC_TEXT = "generic_text" | |
| class SourceConfig(BaseModel): | |
| model_config = ConfigDict(use_enum_values=True) | |
| url: HttpUrl | |
| type: SourceType | |
| enabled: bool = True | |
| selector: Optional[str] = None | |
| interval: int = Field(default=3600, gt=0) | |