EnterpriseConsumedLicenses

class github.EnterpriseConsumedLicenses.EnterpriseConsumedLicenses

This class represents license consumed by enterprises.

The reference can be found here https://docs.github.com/en/enterprise-cloud@latest/rest/enterprise-admin/license#list-enterprise-consumed-licenses

This class has a paginated property. For details, see EnterpriseConsumedLicenses.users() or EnterpriseConsumedLicenses.get_users().

A CompletableGithubObject can be partially initialised (completed=False). Accessing attributes that are not initialized will then trigger a request to complete all attributes.

A partially initialized CompletableGithubObject (completed=False) can be completed via complete(). This requires the url to be given via parameter url or attributes.

With a requester where Requester.is_lazy == True, this CompletableGithubObjects is partially initialized. This requires the url to be given via parameter url or attributes. Any CompletableGithubObject created from this lazy object will be lazy itself if created with parameter url or attributes.

Parameters:
  • requester – requester

  • headers – response headers

  • attributes – attributes to initialize

  • completed – do not update non-initialized attributes when True

  • url – url of this instance, overrides attributes[‘url’]

  • accept – use this accept header when completing this instance

property users: PaginatedList[NamedEnterpriseUser]

This is a paginated property.

Iterating over this paginated list may fetch multiple pages. The size of these pages can be controlled via the …_per_page parameter of github.Enterprise.Enterprise.get_consumed_licenses(), github.EnterpriseConsumedLicenses.EnterpriseConsumedLicenses.get_users(), or github.Github().

If no per_page is given, the default page size is 30. The maximum is 100.

get_users(licence_users_per_page: int | None = None) PaginatedList[NamedEnterpriseUser]
Calls:

GET /enterprises/{enterprise}/consumed-licenses

Identical to calling github.EnterpriseConsumedLicenses.EnterpriseConsumedLicenses.users(), except that this uses the given per_page value.

For more details, see github.EnterpriseConsumedLicenses.EnterpriseConsumedLicenses.users().

Parameters:

licence_users_per_page – int Number of users retrieved per page. Iterating over the users will fetch pages of this size. The default page size is 30, the maximum is 100.