Skip to content

Provider Model

swiftshadow.models.Provider dataclass

Class repersenting a Provider.

Attributes:

Name Type Description
providerFunction Callable[[list[str], Literal['http', 'https']], Coroutine[Any, Any, list[Proxy]]]

Callable function for this provider.

countryFilter bool

Whether the provider supports country based filters.

protocols list[Literal['http', 'https']]

Protocols supported by the provider.

Source code in swiftshadow/models.py
@dataclass
class Provider:
    """
    Class repersenting a Provider.

    Attributes:
        providerFunction: Callable function for this provider.
        countryFilter: Whether the provider supports country based filters.
        protocols: Protocols supported by the provider.
    """

    providerFunction: Callable[
        [list[str], Literal["http", "https"]], Coroutine[Any, Any, list[Proxy]]
    ]
    countryFilter: bool
    protocols: list[Literal["http", "https"]]