Bitbucket Server API Wrapper

Overview

Bitbucket Server API Wrapper

A simple wrapper for the Atlassian's Bitbucket Server / Bitbucket Datacenter (formerly Stash) REST API, written in Python.

Usage

Instantiating

Basic Auth:

import bitbucketserver
bb = bitbucketserver.BitbucketServer(
    url="http://mybitbucket.company.com",
    basic_auth=('username', 'password))

Personal Tokens:

bb = bitbucketserver.BitbucketServer(
    url="http://mybitbucket.company.com",
    bearer_token="...")

Examples

myrepo = bb.repo('project-key', 'my-repo')
commits = myrepo.commits()
new_repo = bb.create_new_repo('PROJ', "New Repo Name")
new_repo.set_group_permission("dev-team", "REPO_WRITE")

Installation

Install the library using pip:

pip install bitbucketserver

You may also clone the repository and run setup.py manually.

Requirements

Requirements for the module should be installed automatically if installed via pip or setup.py.

Requests

This module uses the Python library Requests for communication. Install it with:

pip install requests

Version 2.4.2 or greater is required.

Comments
  • Add Method to Create New Comment on Pull Request

    Add Method to Create New Comment on Pull Request

    I've only addressed the method itself, and some little README formatting stuff. I'm not sure exactly how I should "plug into" the testing framework, or what needs to be done there. Could you provide some recommendations on how I can add to it?

    Thank you!

    opened by JoeStanleySEL 3
  • Additional parameter description allowed in create_repo api request

    Additional parameter description allowed in create_repo api request

    Hello, For create_repo (and I guess for some other), the bitbucket API allow an additional field description which you can add in your payload dict in the file bitbucketserver/bitbucketserver.py

    BR Pierrick

    enhancement 
    opened by tradjincal 3
  • Feature/build and pr comment methods

    Feature/build and pr comment methods

    Made the following changes:

    • Breaking change: changed existing post_build_status method to post_build_status_legacy.
    • Replaced existing post_build_status method with a new one that supports the new build status endpoint. This changed the function arguments.
    • Added several new methods for interacting with PR Comments and and Tasks.
    • Removed BuildStatisticResource object. The related methods now just return the direct dictionary.
    • Added PullRequestCommentResource and changed TaskResource to inherit from that object.
    • Coverage Unit Test changes to support those changes.
    opened by JasonKempSEL 2
  • Need help for use SettingsResource object

    Need help for use SettingsResource object

    Hello, I try to use the repo_branch_permissionsmethod which return a SettingsResource object but I did not understand how to use it. SettingsResource is just derivated from BitbucketObject but I am not sure which attribute should I access. Any suggestion?

    BR

    question 
    opened by tradjincal 2
  • Add Github Actions Workflow to Run `unittest` and Generate Coverage Badge

    Add Github Actions Workflow to Run `unittest` and Generate Coverage Badge

    Not sure how terribly important this is, but I find these sorts of automated workflows to be helpful in terms of general project visibility. This documents the basics of running tests manually, as well as automating the process with a Github action that also generates a code-coverage badge.

    opened by JoeStanleySEL 1
Releases(v1.2.0)
  • v1.2.0(Dec 6, 2022)

    What's Changed

    • Add Method to Create New Comment on Pull Request by @JoeStanleySEL in https://github.com/Schweitzer-Engineering-Laboratories/bitbucketserver/pull/5
    • Add Github Actions Workflow to Run unittest and Generate Coverage Badge by @JoeStanleySEL in https://github.com/Schweitzer-Engineering-Laboratories/bitbucketserver/pull/6
    • Feature/build and pr comment methods by @JasonKempSEL in https://github.com/Schweitzer-Engineering-Laboratories/bitbucketserver/pull/8
    • Breaking change: arguments for post_build_status changed to support the new REST endpoint. Old method and arguments is available under the new name post_build_status_legacy.
    • v1.2.0 release by @JasonKempSEL in https://github.com/Schweitzer-Engineering-Laboratories/bitbucketserver/pull/9

    New Contributors

    • @JoeStanleySEL made their first contribution in https://github.com/Schweitzer-Engineering-Laboratories/bitbucketserver/pull/5

    Full Changelog: https://github.com/Schweitzer-Engineering-Laboratories/bitbucketserver/compare/v1.1.0...v1.2.0

    Source code(tar.gz)
    Source code(zip)
    bitbucketserver-1.2.0-py3-none-any.whl(34.08 KB)
  • v1.1.0(Feb 1, 2022)

    What's Changed

    • Added description to repo creation/update methods. by @JasonKempSEL in https://github.com/Schweitzer-Engineering-Laboratories/bitbucketserver/pull/2
    • Added pull_request_diffs() method by @JasonKempSEL in https://github.com/Schweitzer-Engineering-Laboratories/bitbucketserver/pull/4

    Full Changelog: https://github.com/Schweitzer-Engineering-Laboratories/bitbucketserver/compare/v1.0.0...v1.1.0

    Source code(tar.gz)
    Source code(zip)
Owner
Schweitzer Engineering Laboratories
Schweitzer Engineering Laboratories
Project made to analyse movie trends

MovieTrends Project to analyse the daily movie trends from the website The Movie DataBase. The main idea is upload the results to a PostgreSQL server

Jazmín López Chacón 0 Feb 15, 2022
For specific function. For my own convenience. Remind owner to share data to another DITO user.

For specific function. For my own convenience. Remind owner to share data to another DITO user.

Meigo 1 Dec 14, 2021
Bulk NFT uploader to OpenSea!

Bulk NFT Uploader Description Simple easy peasy python script which logins to opensea account using metamask and bulk uploads NFT to your default coll

Lakshya Khera 25 May 23, 2022
An API wrapper for the file.io web service.

🗃️ File.io An API wrapper for the file.io web service. Install $ pip3 install fileio or

nkot56297 1 Dec 18, 2021
A wrapper to stream information from Twitter's Full-Archive Search Endpoint

A wrapper to stream information from Twitter's Full-Archive Search Endpoint. To exploit this library, one must have approved academic research access.

Daniela Pinto Veizaga 9 Nov 28, 2022
Best Buy purchase bot

B3 Best-Buy-Bot. Written in Python NOTICE: Don't be a disgrace to society. Don't use this for any mass buying/reselling purposes. About B3 is a bot th

Dogey11 8 Aug 15, 2022
CVE-2021-39685 Description and sample exploit for Linux USB Gadget overflow vulnerability

CVE-2021-39685 Description and sample exploit for Linux USB Gadget overflow vulnerability

8 May 25, 2022
python3.5+ hubspot client based on hapipy, but modified to use the newer endpoints and non-legacy python

A python wrapper around HubSpot's APIs, for python 3.5+. Built initially around hapipy, but heavily modified. Check out the documentation here! (thank

Jacobi Petrucciani 140 Dec 21, 2022
OAN Music - Highly advanced User Music Bot

ཧᜰ꙰ꦿ➢𝐎𝐀𝐍༒☛ 🎧 Advanced 𝐎𝐀𝐍 Music bot. 🔗 𝐏𝐨𝐰𝐞𝐫𝐞𝐝 𝐛𝐲 : ➢𝐀ttitude

Attitude king 5 Feb 25, 2022
A simple Python wrapper for the archive.is capturing service

archiveis A simple Python wrapper for the archive.is capturing service. Installation pipenv install archiveis Python Usage Import it. import archi

Ben Welsh 157 Dec 28, 2022
Host your Python Discord Bot 24/7 for free. POC

🐉 Pandore 🐉 The easiest and fastest way to host your Python3 Discord Bot 24/7 for free! 📚 Documentation 📚 If you encounter any problem while using

Billy 73 Jan 02, 2023
Create Multiple CF entry for multiple websites

AWS-CloudFront Problem: Deploy multiple CloudFront for account with multiple domains. Functionality: Running this script in loop and deploy CloudFront

Giten Mitra 5 Nov 18, 2022
Discord Voice Channel Automatic Online

Discord-Selfbot-voice Features: Discord Voice Channel Automatic Online FAQ Q: How can I obtain my token? A: 1. How to obtain your token in android 2.

Pranav Ajay 3 Oct 31, 2022
Satoshi is a discord bot template in python using discord.py that allow you to track some live crypto prices with your own discord bot.

Satoshi ~ DiscordCryptoBot Satoshi is a simple python discord bot using discord.py that allow you to track your favorites cryptos prices with your own

Théo 2 Sep 15, 2022
A tiktok mass account creator with undetected selenium and email verification, to bot an account

⚠️ STILL UNDER DEVELOPEMENT - v1.1-beta ⚠️ Adding PROXY ROTATION Adding EMAIL VERIFICATION Adding USERNAME COMPILER Tiktok Mass Bot Creator v1.1-beta

xtekky 11 Aug 01, 2022
An API or getting Optifine VersionsList/Version/Download-URL.

Optifine-API An API for getting Optifine VersionsList/Versions/Download-URL. Table of contents Get Versions List Get Specify Versions Download Optifin

2 Dec 04, 2022
Powerful Telegram Members Scraping and Adding Toolkit

🔥 Genisys V2.1 Powerful Telegram Members Scraping and Adding Toolkit 🔻 Features 🔺 ADDS IN BULK[by user id, not by username] Scrapes and adds to pub

The Cryptonian 16 Mar 01, 2022
"Nesse projeto criei uma automação para abrir as tarefas no Jira em massa pegando de uma determinada fila do Zendesk."

automacao-Zendesk "Nesse projeto criei uma automação para abrir as tarefas no Jira em massa pegando de uma determinada fila do Zendesk." en-us "In thi

tokoyamy 1 Dec 20, 2021
A Telegram Bot written in Python for mirroring files on the Internet to your Google Drive

No support is going to be provided of any kind, only maintaining this for vps user on request. This is a Telegram Bot written in Python for mirroring

Sunil Kumar 42 Oct 28, 2022
This is new discord nitro generator for discord

Hello! This is new discord nitro generator for discord. If you want use it, To generator i added checker for no seraching generator and checker. This tool maked by .

ItzBolt 1 Jan 16, 2022