Skip to content

gitea.client.async_gitea

async_gitea

Asynchronous Gitea API client implementation.

Classes

gitea.client.async_gitea.AsyncGitea

AsyncGitea(token: str | None = None, base_url: str = 'https://gitea.com')

Bases: Client

Asynchronous Gitea API client.

Initialize the asynchronous Gitea client.

Parameters:

Name Type Description Default
token str | None

The API token for authentication.

None
base_url str

The base URL of the Gitea instance.

'https://gitea.com'
Source code in src/gitea/client/async_gitea.py
def __init__(self, token: str | None = None, base_url: str = "https://gitea.com") -> None:
    """Initialize the asynchronous Gitea client.

    Args:
        token: The API token for authentication.
        base_url: The base URL of the Gitea instance.

    """
    super().__init__(token=token, base_url=base_url)
    self.session: ClientSession | None = None

    # Resource handlers
    self.issue = AsyncIssue(client=self)
    self.pull_request = AsyncPullRequest(client=self)
    self.repository = AsyncRepository(client=self)
    self.user = AsyncUser(client=self)