Responses — python-copr 1.63 documentation

# Responses

class `copr.client.responses.` `CoprResponse`(client, method, data, request_kwargs=None, parsers=None)

  Wrapper for Copr api responses

  Variables: | handle – handle object which provide shortcuts based on request and/or response data (`BaseHandle` and its derivatives) data (dict) – json structure from Copr api

class `copr.client.responses.` `BaseHandle`(client, username=None, response=None, **kwargs)

  Handles provide convenient shortcut methods. Useful methods provided by derived classes.

  Example:

      response = client.create_project("copr")
      response.handle # <-- ProjectHandle object
      print(response.handle.get_project_details().data)

class `copr.client.responses.` `ProjectHandle`(client, projectname, *args, **kwargs)

  Handle to deal with a single Copr project

  `get_project_details`()

    Shortcut to `get_project_details()`

  `modify_project`(**kwargs)

    Shortcut to `modify_project()`

  `delete_project`()

    Shortcut to `delete_project()`

  `create_new_build`(src_pkgs, chroots=None)

    Shortcut to :meth”`~.client.CoprClient.create_new_build’

class `copr.client.responses.` `BuildHandle`(client, build_id, *args, **kwargs)

  Handle to deal with a single build

  `project_handle`

    Shortcut for `responses.ProjectHandle`

  `get_build_details`()

    Shortcut to `get_build_details()`

  `cancel_build`()

    Shortcut to `cancel_build()`

class `copr.client.responses.` `ProjectChrootHandle`(client, chrootname, *args, **kwargs)

  Handle to deal with a single project chroot

  `get_project_chroot_details`()

    Shortcut to `get_project_chroot_details()`

  `modify_project_chroot_details`(pkgs=None)

    Shortcut to `modify_project_chroot_details()`

# Data wrappers

class `copr.client.responses.` `ProjectWrapper`(client, username, projectname, description=None, instructions=None, yum_repos=None, additional_repos=None)

  Helper class to represent project objects

  `__str__` overridden to produces pretty formatted representation

  Variables: | handle – `responses.ProjectHandle` username – project owner projectname – project names

class `copr.client.responses.` `BuildWrapper`(client, username, projectname, build_id, status=None)

  Helper class to represent build objects

  Variables: | handle – `responses.BuildHandle` username – project owner projectname – project names build_id (int) – build identifier

class `copr.client.responses.` `ProjectChrootWrapper`(client, username, projectname, chrootname, repo_url=None)

  Helper class to represent project chroot objects

  Variables: | handle – `responses.ProjectChrootHandle` username – project owner projectname – project names chrootname – chroot name