Responses

class copr.client.responses.CoprResponse(client, method, data, request_kwargs=None, parsers=None)[source]

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)[source]

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)[source]

Handle to deal with a single Copr project

get_project_details()[source]

Shortcut to get_project_details()

modify_project(**kwargs)[source]

Shortcut to modify_project()

delete_project()[source]

Shortcut to delete_project()

create_new_build(src_pkgs, chroots=None)[source]

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

class copr.client.responses.BuildHandle(client, build_id, *args, **kwargs)[source]

Handle to deal with a single build

project_handle

Shortcut for responses.ProjectHandle

get_build_details()[source]

Shortcut to get_build_details()

cancel_build()[source]

Shortcut to cancel_build()

class copr.client.responses.ProjectChrootHandle(client, chrootname, *args, **kwargs)[source]

Handle to deal with a single project chroot

get_project_chroot_details()[source]

Shortcut to get_project_chroot_details()

modify_project_chroot_details(pkgs=None)[source]

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)[source]

Helper class to represent project objects

__str__ overridden to produces pretty formatted representation

Variables:
class copr.client.responses.BuildWrapper(client, username, projectname, build_id, status=None)[source]

Helper class to represent build objects

Variables:
  • handleresponses.BuildHandle
  • username – project owner
  • projectname – project names
  • build_id (int) – build identifier
class copr.client.responses.ProjectChrootWrapper(client, username, projectname, chrootname, repo_url=None)[source]

Helper class to represent project chroot objects

Variables: