Skip to content

orgs

Accessed as client.orgs; the async client mirrors it.

Orgs

The orgs namespace.

actions

actions: OrgsActions = OrgsActions(client)

activities

activities: OrgsActivities = OrgsActivities(client)

avatar

avatar: OrgsAvatar = OrgsAvatar(client)

hooks

hooks: OrgsHooks = OrgsHooks(client)

labels

labels: OrgsLabels = OrgsLabels(client)

members

members: OrgsMembers = OrgsMembers(client)

public_members

public_members: OrgsPublicMembers = OrgsPublicMembers(client)

quota

quota: OrgsQuota = OrgsQuota(client)

repos

repos: OrgsRepos = OrgsRepos(client)

teams

teams: OrgsTeams = OrgsTeams(client)

block

block(org: str, username: str) -> None

Blocks a user from the organization.

Parameters:

Name Type Description Default
org str

name of the org

required
username str

username of the user

required

Returns:

Type Description
None

No content.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: orgBlockUser

create

create(
    *,
    description: str | None = None,
    email: str | None = None,
    full_name: str | None = None,
    location: str | None = None,
    repo_admin_change_team_access: bool | None = None,
    username: str,
    visibility: CreateOrgOptionVisibility | None = None,
    website: str | None = None,
) -> Organization

Create an organization.

Parameters:

Name Type Description Default
description str | None
None
email str | None
None
full_name str | None
None
location str | None
None
repo_admin_change_team_access bool | None
None
username str
required
visibility CreateOrgOptionVisibility | None

possible values are public (default), limited or private

None
website str | None
None

Returns:

Type Description
Organization

Organization.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: orgCreate

delete

delete(org: str) -> None

Delete an organization.

Parameters:

Name Type Description Default
org str

organization that is to be deleted

required

Returns:

Type Description
None

No content.

Raises:

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

Operation ID: orgDelete

get

get(org: str) -> Organization

Get an organization.

Parameters:

Name Type Description Default
org str

name of the organization to get

required

Returns:

Type Description
Organization

Organization.

Raises:

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

Operation ID: orgGet

list

list(*, page: int | None = None, limit: int | None = None) -> Paginated[Organization]

List all organizations.

Parameters:

Name Type Description Default
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
Paginated[Organization]

OrganizationList.

Operation ID: orgGetAll

list_blocked

list_blocked(org: str, *, page: int | None = None, limit: int | None = None) -> Paginated[BlockedUser]

List the organization's blocked users.

Parameters:

Name Type Description Default
org str

name of the org

required
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
Paginated[BlockedUser]

BlockedUserList.

Operation ID: orgListBlockedUsers

rename

rename(org: str, *, new_name: str) -> None

Rename an organization.

Parameters:

Name Type Description Default
org str

existing org name

required
new_name str

New username for this org. This name cannot be in use yet by any other user.

required

Returns:

Type Description
None

No content.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: renameOrg

unblock

unblock(org: str, username: str) -> None

Unblock a user from the organization.

Parameters:

Name Type Description Default
org str

name of the org

required
username str

username of the user

required

Returns:

Type Description
None

No content.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: orgUnblockUser

update

update(
    org: str,
    *,
    description: str | None = None,
    email: str | None = None,
    full_name: str | None = None,
    location: str | None = None,
    repo_admin_change_team_access: bool | None = None,
    visibility: EditOrgOptionVisibility | None = None,
    website: str | None = None,
) -> Organization

Edit an organization.

Parameters:

Name Type Description Default
org str

name of the organization to edit

required
description str | None
None
email str | None
None
full_name str | None
None
location str | None
None
repo_admin_change_team_access bool | None
None
visibility EditOrgOptionVisibility | None

possible values are public, limited or private

None
website str | None
None

Returns:

Type Description
Organization

Organization.

Raises:

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

Operation ID: orgEdit

AsyncOrgs

The orgs namespace.

actions

activities

avatar

avatar: AsyncOrgsAvatar = AsyncOrgsAvatar(client)

hooks

hooks: AsyncOrgsHooks = AsyncOrgsHooks(client)

labels

labels: AsyncOrgsLabels = AsyncOrgsLabels(client)

members

public_members

quota

quota: AsyncOrgsQuota = AsyncOrgsQuota(client)

repos

repos: AsyncOrgsRepos = AsyncOrgsRepos(client)

teams

teams: AsyncOrgsTeams = AsyncOrgsTeams(client)

block

block(org: str, username: str) -> None

Blocks a user from the organization.

Parameters:

Name Type Description Default
org str

name of the org

required
username str

username of the user

required

Returns:

Type Description
None

No content.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: orgBlockUser

create

create(
    *,
    description: str | None = None,
    email: str | None = None,
    full_name: str | None = None,
    location: str | None = None,
    repo_admin_change_team_access: bool | None = None,
    username: str,
    visibility: CreateOrgOptionVisibility | None = None,
    website: str | None = None,
) -> Organization

Create an organization.

Parameters:

Name Type Description Default
description str | None
None
email str | None
None
full_name str | None
None
location str | None
None
repo_admin_change_team_access bool | None
None
username str
required
visibility CreateOrgOptionVisibility | None

possible values are public (default), limited or private

None
website str | None
None

Returns:

Type Description
Organization

Organization.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: orgCreate

delete

delete(org: str) -> None

Delete an organization.

Parameters:

Name Type Description Default
org str

organization that is to be deleted

required

Returns:

Type Description
None

No content.

Raises:

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

Operation ID: orgDelete

get

get(org: str) -> Organization

Get an organization.

Parameters:

Name Type Description Default
org str

name of the organization to get

required

Returns:

Type Description
Organization

Organization.

Raises:

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

Operation ID: orgGet

list

list(*, page: int | None = None, limit: int | None = None) -> AsyncPaginated[Organization]

List all organizations.

Parameters:

Name Type Description Default
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
AsyncPaginated[Organization]

OrganizationList.

Operation ID: orgGetAll

list_blocked

list_blocked(org: str, *, page: int | None = None, limit: int | None = None) -> AsyncPaginated[BlockedUser]

List the organization's blocked users.

Parameters:

Name Type Description Default
org str

name of the org

required
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
AsyncPaginated[BlockedUser]

BlockedUserList.

Operation ID: orgListBlockedUsers

rename

rename(org: str, *, new_name: str) -> None

Rename an organization.

Parameters:

Name Type Description Default
org str

existing org name

required
new_name str

New username for this org. This name cannot be in use yet by any other user.

required

Returns:

Type Description
None

No content.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: renameOrg

unblock

unblock(org: str, username: str) -> None

Unblock a user from the organization.

Parameters:

Name Type Description Default
org str

name of the org

required
username str

username of the user

required

Returns:

Type Description
None

No content.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: orgUnblockUser

update

update(
    org: str,
    *,
    description: str | None = None,
    email: str | None = None,
    full_name: str | None = None,
    location: str | None = None,
    repo_admin_change_team_access: bool | None = None,
    visibility: EditOrgOptionVisibility | None = None,
    website: str | None = None,
) -> Organization

Edit an organization.

Parameters:

Name Type Description Default
org str

name of the organization to edit

required
description str | None
None
email str | None
None
full_name str | None
None
location str | None
None
repo_admin_change_team_access bool | None
None
visibility EditOrgOptionVisibility | None

possible values are public, limited or private

None
website str | None
None

Returns:

Type Description
Organization

Organization.

Raises:

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

Operation ID: orgEdit