General — python-copr 1.63 documentation

# General

`copr.` `create_client2_from_params`(root_url=None, login=None, token=None)

  Create client instance using the given parameters

  Parameters: | root_url (str) – Url to the Copr service, default: “http://copr.fedoraproject.org” login (str) – api login token (str) – api token
  Return type: | `client_v2.client.CoprClient`

`copr.` `create_client2_from_file_config`(filepath=None, ignore_error=False)

  Creates Copr client using the information from the config file.

  Parameters: | filepath (`str`) – specifies config location, default: “~/.config/copr” ignore_error (bool) – When true and config is missing, creates default Client without credentionals
  Return type: | `client_v2.client.CoprClient`

# CoprClient

class `copr.client_v2.client.` `CoprClient`(net_client, root_url=None, no_config=False)

  Main interface to the copr service

  Parameters: | net_client (NetClient) – wrapper for http requests root_url (unicode) – used as copr projects root no_config (bool) – helper flag to indicate that no config was provided

  Could be created:
    - using static method `create_from_file_config()`
    - using static method `create_from_params()`

  If you create Client directly call `CoprClient.post_init()` method after the creation.

  `projects`

    Return type: | `ProjectHandle`

  `project_chroots`

    Return type: | `ProjectChrootHandle`

  `builds`

    Return type: | `BuildHandle`

  `build_tasks`

    Return type: | `BuildTaskHandle`

  `mock_chroots`

    Return type: | `MockChrootHandle`

  classmethod `create_from_params`(root_url=None, login=None, token=None)

    Create client instance using the given parameters

    Parameters: | root_url (str) – Url to the Copr service, default: “http://copr.fedoraproject.org” login (str) – api login token (str) – api token
    Return type: | `client_v2.client.CoprClient`

  classmethod `create_from_file_config`(filepath=None, ignore_error=False)

    Creates Copr client using the information from the config file.

    Parameters: | filepath (`str`) – specifies config location, default: “~/.config/copr” ignore_error (bool) – When true and config is missing, creates default Client without credentionals
    Return type: | `client_v2.client.CoprClient`

  `post_init`()

    Finalizes client initialization by querying API root info