Skip to main content

Python 3.6+ Code style: black

gitbucket is an API wrapper for Bitbucket written in Python with added features like Bitbucket pipelines while maintaining the simplicity of the source-repo. It was forked from GearPlug/bitbucket-python

Installing

pip install pygitbucket

New Features added

  • Added Bitbucket Pipelines support

Usage

from pygitbucket.client import Client

client = Client('EMAIL', 'PASSWORD') 

# Or to specify owner URL to find repo own by other user
client = Client('EMAIL', 'PASSWORD', 'Owner')

Get user information

response = client.get_user()

Get account privileges for repositories

response = client.get_privileges()

Get repositories

response = client.get_repositories()

Get repository

response = client.get_repository('REPOSITORY_SLUG')

Get branches for repository

response = client.get_repository_branches('REPOSITORY_SLUG')

Get tags for repository

response = client.get_repository_tags('REPOSITORY_SLUG')

Get pipelines for repository

response = client.get_repository_pipelines('REPOSITORY_SLUG')

Get last 10 pipelines for repository

response = client.get_latest_pipelines('REPOSITORY_SLUG')

Get components for repository

response = client.get_repository_components('REPOSITORY_SLUG')

Get milestones for repository

response = client.get_repository_milestones('REPOSITORY_SLUG')

Get versions for repository

response = client.get_repository_versions('REPOSITORY_SLUG')

Create issue

response = client.create_issue(repository_slug, title, description)

trigger pipeline deployment for branch

response = client.trigger_pipeline(repository_slug, branch_name)

Get all issues

response = client.get_issues('REPOSITORY_SLUG')

Get issue

response = client.get_issue('REPOSITORY_SLUG', 'ISSUE_ID')

Delete issue

response = client.delete_issue('REPOSITORY_SLUG', 'ISSUE_ID')

Webhooks

Create webhook

data = {
    "description": "Webhook",
    "url": "http://mywebsite.com",
    "active": True,
    "events": [
        "repo:push",
        "issue:created",
        "issue:updated"
    ]
}
response = client.create_webhook('REPOSITORY_SLUG', data)

Get all webhooks

response = client.get_webhooks('REPOSITORY_SLUG')

Get webhook

response = client.get_webhook('REPOSITORY_SLUG', 'WEBHOOK_ID')

Delete webhook

response = client.delete_webhook('REPOSITORY_SLUG', 'WEBHOOK_ID')

Requirements

  • requests

Metadata

Release files for pygitbucket 2021.7.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygitbucket 2021.7.4
File Size Uploaded Provenance Actions
pygitbucket-2021.7.4.tar.gz 6.2 kB Without provenance Details for pygitbucket-2021.7.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pygitbucket 2021.7.4
File Interpreter ABI Platform Actions
pygitbucket-2021.7.4-py3-none-any.whl Python 3 none any Details for pygitbucket-2021.7.4-py3-none-any.whl

Total release size: 12.3 kB

Release files / pygitbucket-2021.7.4.tar.gz

Download URL pygitbucket-2021.7.4.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4e28a128c37e97d37f27ccbd115520c82cbd7ff838d8303e99d1c7ea2fb11964
BLAKE2b-256 checksum
How to use checksums
b93eabb4c21fe1ad6136873561e9af7ecacf6e4521ac5d9d5a1abdf5a65e6da0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release files / pygitbucket-2021.7.4-py3-none-any.whl

Download URL pygitbucket-2021.7.4-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55987bc43014f5dff5373635b871f1447483315412d5d9a1d5c68295cd0905a4
BLAKE2b-256 checksum
How to use checksums
b06f51ed81f0f9e1fd0c3cfad194550b4cb917a2bd83040e0e549975761f61aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Security for pygitbucket 2021.7.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page