You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I need a way to get a list of all repositories, via Python, that my account can access. Is there a way to do something like this?
Hi @lpetrinsak ,
You can use stashy
bitbucket = stashy.connect(host, user, password)
projects = bitbucket.projects.list()
for project in projects:
for repo in bitbucket.projects["%s" %(project["key"])].repos.list():
print(repo)
Ah great! Thank you very much! Is it possible to acquire a list of "items" that are located in a particular repository?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there @edwin @lpetrinsak !
I wanted to ask, is this stashy solution only for Bitbucket Server? Because i need to use same thing in Bitbucket Cloud
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can only guess that same applies for Cloud...you can try it and see if it works though...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@lpetrinsak thanks for fast reply!
I already tried. And first problem, that stuck with is what URL(host in example above) should be for connection to API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Valeriy Yakovenko ,
Stashy is a client for Bitbucket Server.
The host above represents the Bitbucket base URL
bitbucket = stashy.connect("http://localhost:7990", "admin", "admin")
or
bitbucket = stashy.connect("http://localhost:7990/stash", "admin", "admin")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @edwin !
Thank you for your fast reply, and sorry for my late reply.
I will be really happy if you can give some advise about what to use for BitBucket Cloud API in python?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Open source and actively maintained as of Dec 2022: https://pypi.org/project/atlassian-python-api/ (note that this project is not maintained by Atlassian)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.