"""Base pastebin provider interface.""" from abc import ABC, abstractmethod from typing import Optional class PastebinProvider(ABC): """Abstract base class for pastebin service providers.""" @abstractmethod def paste(self, content: bytes, **kwargs) -> str: """ Upload content to the pastebin service. Args: content: Raw bytes to upload **kwargs: Provider-specific options (e.g., expiration, syntax) Returns: The paste ID or URL (without fragment) """ pass @abstractmethod def fetch(self, paste_id: str) -> bytes: """ Fetch content from the pastebin service. Args: paste_id: The paste identifier or URL Returns: Raw bytes of the paste content """ pass @abstractmethod def get_name(self) -> str: """Return the name of this provider.""" pass @abstractmethod def get_base_url(self) -> str: """Return the base URL for this provider.""" pass