Skip to content

BaseOwner

Sub classes

Name Children Inherits
Owner
githarbor.core.user_proxy
Proxy class that forwards all method calls to an owner instance.
    AioGitHubOwner
    githarbor.providers.aiogithubapi_provider.owner
    Owner implementation using aiogithubapi.
      GitHubOwner
      githarbor.providers.github_provider.owner
        GitHubKitOwner
        githarbor.providers.githubkit_provider.owner
        Owner implementation using GitHubKit.

          🛈 DocStrings

          Base class for repository owners.

          Source code in src/githarbor/core/base.py
          class BaseOwner:
              """Base class for repository owners."""
          
              is_async: ClassVar[bool] = False
              url_patterns: ClassVar[list[str]] = []
              _name: str = ""
          
              def list_repositories(self) -> list[BaseRepository]:
                  msg = f"{self.__class__.__name__} does not implement list_repositories"
                  raise FeatureNotSupportedError(msg)
          
              @property
              def name(self) -> str:
                  """The name of the repository."""
                  return self._name
          
              def create_repository(
                  self,
                  name: str,
                  description: str = "",
                  private: bool = False,
              ) -> BaseRepository:
                  msg = f"{self.__class__.__name__} does not implement create_repository"
                  raise FeatureNotSupportedError(msg)
          
              def get_user(self) -> User:
                  msg = f"{self.__class__.__name__} does not implement get_user"
                  raise FeatureNotSupportedError(msg)
          
              def delete_repository(self, name: str) -> None:
                  msg = f"{self.__class__.__name__} does not implement delete_repository"
                  raise FeatureNotSupportedError(msg)
          
              async def list_repositories_async(self) -> list[BaseRepository]:
                  """List repositories asynchronously."""
                  msg = f"{self.__class__.__name__} does not implement list_repositories_async"
                  raise FeatureNotSupportedError(msg)
          
              async def create_repository_async(
                  self,
                  name: str,
                  description: str = "",
                  private: bool = False,
              ) -> BaseRepository:
                  """Create repository asynchronously."""
                  msg = f"{self.__class__.__name__} does not implement create_repository_async"
                  raise FeatureNotSupportedError(msg)
          
              async def get_user_async(self) -> User:
                  """Get user information asynchronously."""
                  msg = f"{self.__class__.__name__} does not implement get_user_async"
                  raise FeatureNotSupportedError(msg)
          
              async def delete_repository_async(self, name: str) -> None:
                  """Delete repository asynchronously."""
                  msg = f"{self.__class__.__name__} does not implement delete_repository_async"
                  raise FeatureNotSupportedError(msg)
          
              @classmethod
              def supports_url(cls, url: str) -> bool:
                  return any(pattern in url for pattern in cls.url_patterns)
          
              @classmethod
              def from_url(cls, url: str, **kwargs: Any) -> BaseOwner:
                  msg = f"{cls.__name__} does not implement from_url"
                  raise FeatureNotSupportedError(msg)
          

          name property

          name: str
          

          The name of the repository.

          create_repository_async async

          create_repository_async(name: str, description: str = '', private: bool = False) -> BaseRepository
          

          Create repository asynchronously.

          Source code in src/githarbor/core/base.py
          async def create_repository_async(
              self,
              name: str,
              description: str = "",
              private: bool = False,
          ) -> BaseRepository:
              """Create repository asynchronously."""
              msg = f"{self.__class__.__name__} does not implement create_repository_async"
              raise FeatureNotSupportedError(msg)
          

          delete_repository_async async

          delete_repository_async(name: str) -> None
          

          Delete repository asynchronously.

          Source code in src/githarbor/core/base.py
          async def delete_repository_async(self, name: str) -> None:
              """Delete repository asynchronously."""
              msg = f"{self.__class__.__name__} does not implement delete_repository_async"
              raise FeatureNotSupportedError(msg)
          

          get_user_async async

          get_user_async() -> User
          

          Get user information asynchronously.

          Source code in src/githarbor/core/base.py
          async def get_user_async(self) -> User:
              """Get user information asynchronously."""
              msg = f"{self.__class__.__name__} does not implement get_user_async"
              raise FeatureNotSupportedError(msg)
          

          list_repositories_async async

          list_repositories_async() -> list[BaseRepository]
          

          List repositories asynchronously.

          Source code in src/githarbor/core/base.py
          async def list_repositories_async(self) -> list[BaseRepository]:
              """List repositories asynchronously."""
              msg = f"{self.__class__.__name__} does not implement list_repositories_async"
              raise FeatureNotSupportedError(msg)
          

          :fa-brands-github: Show source on GitHub