BitBucket¶
-
class
bitbucket.BitBucket(username, password=None)¶ Create a BitBucket service.
Variables: - username (str) – The username for the authenticated user.
- password (str) – The password for the authenticated user.
Email¶
-
BitBucket.email(email_id)¶ Return the resource corresponding to a single email
-
Email.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Email.delete()¶ Delete this email address from the user account
-
Email.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
Email.primary()¶ Set this email as de primary email.
-
Email.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
Emails¶
-
BitBucket.emails()¶ Return the resource corresponding to all the emails
-
Emails.add(address)¶ Add an email to the user account.
-
Emails.delete()¶ Delete this resource.
-
Emails.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
Emails.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
Changeset¶
-
Repo.changeset(changeset_md5)¶ Return a resource corresponding to a changeset for this repo.
-
Changeset.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Changeset.delete()¶ Delete this resource.
-
Changeset.diffstat()¶ Return the diffstat for this changeset
-
Changeset.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
Changeset.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
Changesets¶
-
Repo.changesets()¶ Return a resource corresponding to all the changesets for this repo.
-
Changesets.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Changesets.delete()¶ Delete this resource.
-
Changesets.get(start='tip', limit=15)¶ Fetch changesets
Variables: - start – Changesets start default is ‘tip’
- limit – Limit of changesets, default is 15
-
Changesets.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueComment¶
-
RepoIssue.comment(comment_id)¶ Return the resource corresponding to a single comment of this issue.
-
IssueComment.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
IssueComment.delete()¶ Delete this resource.
-
IssueComment.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
IssueComment.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueComments¶
-
RepoIssue.comments()¶ Return the resource corresponding to the comments of this issue.
-
IssueComments.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
IssueComments.delete()¶ Delete this resource.
-
IssueComments.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
IssueComments.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
RepoIssue.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
RepoIssue.delete()¶ Delete this resource.
-
RepoIssue.followers()¶ Fetch the followers of this issue.
-
RepoIssue.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
RepoIssue.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueComment¶
-
RepoIssues.component(component_id)¶ Return the resources corresponding to one component of this issue.
-
IssueComment.create(obj) Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
IssueComment.delete() Delete this resource.
-
IssueComment.get() For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
IssueComment.update(obj) Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueComponents¶
-
RepoIssues.components()¶ Return the resource corresponding to the components of this issue.
-
IssueComponents.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
IssueComponents.delete()¶ Delete this resource.
-
IssueComponents.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
IssueComponents.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueMilestone¶
-
RepoIssues.milestone(milestone_id)¶ Return the resource corresponding to one milestone of this issue.
-
IssueMilestone.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
IssueMilestone.delete()¶ Delete this resource.
-
IssueMilestone.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
IssueMilestone.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueMilestones¶
-
RepoIssues.milestones()¶ Return the resources corresponding to the milestones of this issue.
-
IssueMilestones.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
IssueMilestones.delete()¶ Delete this resource.
-
IssueMilestones.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
IssueMilestones.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueVersion¶
-
RepoIssues.version(version_id)¶ Return the resource corresponding to one version of this issue.
-
IssueVersion.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
IssueVersion.delete()¶ Delete this resource.
-
IssueVersion.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
IssueVersion.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueVersions¶
-
RepoIssues.versions()¶ Return the resource corresponding to the versions of this issue.
-
IssueVersions.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
IssueVersions.delete()¶ Delete this resource.
-
IssueVersions.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
IssueVersions.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
RepoIssues.create(obj)¶ Create a new Issue.
Variables: obj – a Python object with the needed params that can be: title: The title of the new issue content: The content of the new issue component: The componen associated with the issue milestone: The milestone associated with the issue version: The version associated with the issue responsible: The username of the person responsible for the issue priority: The priority of the issue. Valid priorities are:
- trivial
- minor
- major
- critical
- blocker
status: The status of the issue. Val statuses are:
- new
- open
- resolved
- on hold
- invalid
- duplicate
- wontfix
kind: The kind of the issue. Valid kinds are:
- bug
- enhancement
- proposal
- task
-
RepoIssues.delete()¶ Delete this resource.
-
RepoIssues.filter(filters)¶ Search through the issues applying filters.
Look at https://confluence.atlassian.com/display/BITBUCKET/Issues to get a complete list of possible filters.
Variables: filters (dict of str to str or tuple of str) – A dictionary of filters. Keys are strings corresponding to the filter names and values are ether string filter values or tuples, in which case their conditions are implicitly ORed. For example, {“title”: (“~one”, “~two”)} would mean issues with the title containing either “one” or “two”
-
RepoIssues.get(search=None, start=None, limit=None)¶ Fetch issues for this repository based on the filter parameters.
-
RepoIssues.search(search=None)¶ Search through issues.
Variables: search – the query string parameter.
-
RepoIssues.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoLink¶
-
Repo.link(id)¶ Reurn a resource corresponding to a link from this repo.
-
RepoLink.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
RepoLink.delete()¶ Delete this resource.
-
RepoLink.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
RepoLink.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoLinks¶
-
Repo.links()¶ Return a resouce corresponding to all the links from this repo.
-
RepoLinks.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
RepoLinks.delete()¶ Delete this resource.
-
RepoLinks.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
RepoLinks.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoPrivileges¶
-
Repo.privileges(specific_user=None)¶ Return a resource corresponding to all privileges from this repo, either for everyone or for a specific user.
-
RepoPrivileges.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
RepoPrivileges.delete()¶ Delete this resource.
-
RepoPrivileges.get(filter=None)¶
-
RepoPrivileges.grant(privilege)¶ Grant a privilege on the repo.
Variables: privilege (str) – The privilege to grant.
-
RepoPrivileges.revoke()¶ Revoke privileges on the repo from the user.
-
RepoPrivileges.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
Service¶
-
Repo.service(service_id)¶ Return a resource corresponding to one service for this repo.
-
Service.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Service.delete()¶ Delete this resource.
-
Service.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
Service.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
Services¶
-
Repo.services()¶ Return a resource corresponding to all the services for this repo.
-
Services.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Services.delete()¶ Delete this resource.
-
Services.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
Services.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Repo.branches()¶ Fetch the repository branches.
-
Repo.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Repo.delete()¶ Delete this resource.
-
Repo.events(start=0, limit=15, etype=None)¶ Fetch events for this repository.
Variables: - start – Event start, default is 0.
- limit – Event result limit, default is 15.
- type – Event type, for example ‘issue_comment’.
-
Repo.followers()¶ Fetch the followers of this repo.
-
Repo.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
Repo.invite(user, permission)¶ Invite a user to participate in the repository, with the given permissions.
Variables: - user (str) – The email of the user to invite.
- permission (str) – The permission to grant (either read or write)
Fetch the repository tags.
-
Repo.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
Repos¶
-
BitBucket.repos()¶ Return the resource corresponding to all the repositories
-
Repos.create(name, scm=None, is_private=False)¶ Create a new repository.
Variables: - name – the repository name.
- scm – the type of repository you want to create, can be: git: for git repository hg: for mercurial repository
-
Repos.delete()¶ Delete a repository.
-
Repos.get(*args, **kwargs)¶ Fetch all repositories you have access to.
-
Repos.search(name=None)¶ Search for repositories with the given name.
-
Repos.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
Group¶
-
User.group(group_name)¶ Return a resource corresponding a single user’s groups.
This resource only exists for User resources that specify a concrete username.
GroupMember¶
-
Group.member(member)¶ Return the resource corresponding to a member of the group.
-
GroupMember.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
GroupMember.delete()¶ Delete this resource.
-
GroupMember.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
GroupMember.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
GroupMembers¶
-
Group.members()¶ Return the resource corresponding to all members of the group.
-
GroupMembers.create(username)¶
-
GroupMembers.delete()¶ Delete this resource.
-
GroupMembers.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
GroupMembers.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Group.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Group.delete()¶ Delete this resource.
-
Group.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
Group.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
GroupPrivileges¶
-
User.group_privileges(group=None, repo=None)¶ Return a resource corresponding to the group privileges for a user.
This resource only exists for User resources that specify a concrete username.
-
GroupPrivileges.get(filter=None, private=None)¶ Fetch the group privileges.
Variables:
-
GroupPrivileges.grant(group, repo, privilege)¶ Grant a privilege for a repository to a group.
-
GroupPrivileges.revoke(group, repo)¶ Revoke privileges for a repository from a group.
Groups¶
-
User.groups()¶ Return a resource corresponding to all of the user’s groups.
This resource only exists for User resources that specify a concrete username.
-
Groups.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Groups.delete()¶ Delete this resource.
-
Groups.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
Groups.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
User.create(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
User.delete()¶ Delete this resource.
-
User.events(start=0, limit=15, etype=None)¶ Fetch events for this user.
Variables: - start – Event start, default is 0.
- limit – Event result limit, default is 15.
- type – Event type, for example ‘issue_comment’.
-
User.followers()¶ Fetch the followers of this user.
-
User.follows()¶ Fetch the list of repositories the authenticated user follows.
-
User.get()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
User.update(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.