Skip to content

raw

Accessed as client.repos.raw; the async client mirrors it.

ReposRaw

The repos.raw namespace.

get

get(owner: str, repo: str, filepath: str, *, ref: str | None = None) -> bytes

Get a file from a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
filepath str

filepath of the file to get

required
ref str | None

The name of the commit/branch/tag. Default the repository's default branch (usually master)

None

Returns:

Type Description
bytes

Returns raw file content.

Raises:

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

Operation ID: repoGetRawFile

AsyncReposRaw

The repos.raw namespace.

get

get(owner: str, repo: str, filepath: str, *, ref: str | None = None) -> bytes

Get a file from a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
filepath str

filepath of the file to get

required
ref str | None

The name of the commit/branch/tag. Default the repository's default branch (usually master)

None

Returns:

Type Description
bytes

Returns raw file content.

Raises:

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

Operation ID: repoGetRawFile