This package enables you receive use the bitbucket REST-api uing a simplified API
Project description
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)[https://github.com/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 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
data = {..DATA..}
response = client.create_issue('REPOSITORY_SLUG', data)
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pygitbucket-2020.8.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b06bc09fd7bf818941d8745e674dfbf18c5ebb5c4452f148728dede553f3d9e9 |
|
MD5 | 2185ff931be6609f7f1bd67c821f86c4 |
|
BLAKE2b-256 | f0995bd04b05b6a6ca73945b67f3d7b9728632f57d49d848b7886cc8b257f92c |