Skip to content

gpg_keys

Accessed as client.user.gpg_keys; the async client mirrors it.

UserGpgKeys

The user.gpg_keys namespace.

create

create(*, armored_public_key: str, armored_signature: str | None = None) -> GPGKey

Add a GPG public key to current user's account.

Parameters:

Name Type Description Default
armored_public_key str

An armored GPG key to add

required
armored_signature str | None
None

Returns:

Type Description
GPGKey

GPGKey.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: userCurrentPostGPGKey

delete

delete(id: int) -> None

Remove a GPG public key from current user's account.

Parameters:

Name Type Description Default
id int

id of key to delete

required

Returns:

Type Description
None

No content.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userCurrentDeleteGPGKey

get

get(id: int) -> GPGKey

Get a GPG key.

Parameters:

Name Type Description Default
id int

id of key to get

required

Returns:

Type Description
GPGKey

GPGKey.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userCurrentGetGPGKey

list

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

List the authenticated user's GPG keys.

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[GPGKey]

GPGKeyList.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.

Operation ID: userCurrentListGPGKeys

AsyncUserGpgKeys

The user.gpg_keys namespace.

create

create(*, armored_public_key: str, armored_signature: str | None = None) -> GPGKey

Add a GPG public key to current user's account.

Parameters:

Name Type Description Default
armored_public_key str

An armored GPG key to add

required
armored_signature str | None
None

Returns:

Type Description
GPGKey

GPGKey.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: userCurrentPostGPGKey

delete

delete(id: int) -> None

Remove a GPG public key from current user's account.

Parameters:

Name Type Description Default
id int

id of key to delete

required

Returns:

Type Description
None

No content.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userCurrentDeleteGPGKey

get

get(id: int) -> GPGKey

Get a GPG key.

Parameters:

Name Type Description Default
id int

id of key to get

required

Returns:

Type Description
GPGKey

GPGKey.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userCurrentGetGPGKey

list

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

List the authenticated user's GPG keys.

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[GPGKey]

GPGKeyList.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.

Operation ID: userCurrentListGPGKeys