Documentation for stashy¶
Python API client for the Atlassian Stash REST API
Installation¶
pip install stashy
Usage¶
import stashy
stash = stashy.connect("http://localhost:7990/stash", "admin", "admin")
Examples¶
Retrieve all groups:
stash.admin.groups.list()
Retrieve all users that match a given filter:
stash.admin.users.list(filter="admin")
Add a user to a group:
stash.admin.groups.add_user('stash-users', 'admin')
Iterate over all projects (that you have access to):
stash.projects.list()
List all the repositories in a given project:
stash.projects[PROJECT].repos.list()
List all the commits in a pull request:
list(stash.projects[PROJECT].repos[REPO].pull_requests.commits())