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
A free, minimal, lightweight, cross-platform, easily expandable Twitch IRC/API bot.

parky's twitch bot A free, minimal, lightweight, cross-platform, easily expandable Twitch IRC/API bot. Features 🔌 Connect to Twitch IRC chat! 🔌 Conn

Andreas Schneider 10 Dec 30, 2022
The official Python client library for the Kite Connect trading APIs

The Kite Connect API Python client - v3 The official Python client for communicating with the Kite Connect API. Kite Connect is a set of REST-like API

Zerodha Technology 756 Jan 06, 2023
Telegram Google Translater Bot Can Translate Any Language To Your Selected Language

🔰 TELEGRAM GOOGLE TRANSLATER 🔰 • ⚡ INSTALLING ⚡ • • ✅ OFFICIAL SUPPORTS ✅ •

⚝ANKIT KUMAR⚝ 2 Jan 16, 2022
Discord Webhook Proxy for Roblox payloads.

RoProxy A Discord webhook proxy passthrough for roblox. Setup Your port and endpoint are in the config.json, make sure both app.py and config.json are

PythonSerious 2 Nov 05, 2021
This is simple maker for level card in discord bot.

mariocard This is simple maker for level card in discord bot in discord.py or pycord. Installing Python 3.8 or higher is required # Linux/macOS pip3 i

3 Jan 29, 2022
Python wrapper for WhatsApp web-based on selenium

alright Python wrapper for WhatsApp web made with selenium inspired by PyWhatsApp Why alright ? I was looking for a way to control and automate WhatsA

Jordan Kalebu 193 Jan 06, 2023
An API-driven solution for Makerspaces, Tinkerers, and Hackers.

Mventory is an API-driven inventory solution for Makers, Makerspaces, Hackspaces, and just about anyone else who needs to keep track of "stuff".

Matthew Macdonald-Wallace 107 Dec 21, 2022
The Official Twilio SendGrid Led, Community Driven Python API Library

The default branch name for this repository has been changed to main as of 07/27/2020. This library allows you to quickly and easily use the SendGrid

Twilio SendGrid 1.4k Jan 07, 2023
Python API Client for Twitter API v2

🐍 Python Client For Twitter API v2 🚀 Why Twitter Stream ? Twitter-Stream.py a python API client for Twitter API v2 now supports FilteredStream, Samp

Twitivity 31 Nov 19, 2022
Os-Remoter with Python (Telegram Bot)

Remote-Os Os-Remoter with Python (Telegram Bot) [1] First install "python -m pip install --upgrade pip" [2] Second install the modules inside file ins

Alisa Alikhani 2 Nov 09, 2022
A simple google translator telegram bot

Translator-Bot A simple google translator telegram bot Please fork this repository don't import code Made with Python3 (C) @FayasNoushad Copyright per

Fayas Noushad 14 Nov 12, 2022
Python bindings for LibreTranslate

Python bindings for LibreTranslate

Argos Open Tech 42 Jan 03, 2023
fair-test is a library to build and deploy FAIR metrics tests APIs supporting the specifications used by the FAIRMetrics working group.

☑️ FAIR test fair-test is a library to build and deploy FAIR metrics tests APIs supporting the specifications used by the FAIRMetrics working group. I

Maastricht University IDS 6 Oct 30, 2022
Python SDK for Thepeer

Python SDK for Thepeer

Oluwafemi Tairu 2 Dec 22, 2021
⚡ ʑɠ ცơɬ Is One Of The Fastest & Smoothest Bot On Telegram Based on Telethon ⚡

『ʑɠ ცơɬ』 ⚡ ʑɠ ცơɬ Is One Of The Fastest & Smoothest Bot On Telegram Based on Telethon ⚡ Status Of Bot Telegram 🏪 Dєρℓογ το нєяοκυ Variables APP_ID =

ʑɑʑɓɦɑɪ 0 Feb 12, 2022
Dodo - A graphical, hackable email client based on notmuch

Dodo Dodo is a graphical email client written in Python/PyQt5, based on the comm

Aleks Kissinger 44 Nov 12, 2022
Wechat based auto reply with pyautogui

Python-微信 自动回复 练手~ 一直想做个给微信发个消息,就可以跑Python程序,并将结果发送给我的东西,之前看了 B站@不高兴就喝水 的视频,终于有了灵感~ 使用的是模拟点击方案,请求期间是不能操作了。 库 pyautogui 用于模拟鼠标键盘操作和定位操作位置 pyperclip 剪贴板

Vito Song 1 Oct 22, 2022
Running Performance Calculator

Running Performance Calculator 👉 Have you ever wondered if you ran 10km at 2000

Davide Liu 6 Oct 26, 2022
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources.

A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.

Donne Martin 11.1k Jan 04, 2023
BlueMoonVampireBot - A Telegram Antispam Based Bot

Blue Moon Vampire Bot An Telegram Antispam Based Bot A Pyogram Bot to make banne

13 Nov 24, 2022