Skip to content

blobs

Accessed as client.repos.git.blobs; the async client mirrors it.

ReposGitBlobs

The repos.git.blobs namespace.

get

get(owner: str, repo: str, sha: str) -> GitBlob

Gets the blob of a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
sha str

sha of the blob to retrieve

required

Returns:

Type Description
GitBlob

GitBlob.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: GetBlob

list

list(owner: str, repo: str, *, shas: str) -> list[GitBlob]

Gets multiple blobs of a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
shas str

a comma separated list of blob-sha (mind the overall URL-length limit of ~2,083 chars)

required

Returns:

Type Description
list[GitBlob]

GitBlobList.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.

Operation ID: GetBlobs

AsyncReposGitBlobs

The repos.git.blobs namespace.

get

get(owner: str, repo: str, sha: str) -> GitBlob

Gets the blob of a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
sha str

sha of the blob to retrieve

required

Returns:

Type Description
GitBlob

GitBlob.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: GetBlob

list

list(owner: str, repo: str, *, shas: str) -> list[GitBlob]

Gets multiple blobs of a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
shas str

a comma separated list of blob-sha (mind the overall URL-length limit of ~2,083 chars)

required

Returns:

Type Description
list[GitBlob]

GitBlobList.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.

Operation ID: GetBlobs