fifbucket-0.9
توضیحات
Bitbucket Api Library
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | fifbucket-0.9 |
| نام | fifbucket |
| نسخه کتابخانه | 0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Mario Faundez |
| ایمیل نویسنده | mariofaundez@hotmail.com |
| آدرس صفحه اصلی | https://github.com/fiftech/fifbucket |
| آدرس اینترنتی | https://pypi.org/project/fifbucket/ |
| مجوز | MIT |
# fifbucket
[](https://travis-ci.com/fiftech/fifbucket) [](https://coveralls.io/github/fiftech/fifbucket) [](https://pypi.python.org/pypi/fifbucket/) [](https://pypi.python.org/pypi/fifbucket/) [](https://pypi.python.org/pypi/fifbucket/)
**fifbucket** is a python library for call Bitbucket api:
> Bitbucket Api Documentation: https://developer.atlassian.com/bitbucket/api/2/reference/resource/
## Configuration
Obligatory arguments
| Argument |Description |
|----------------|-----------------------------------------|
|owner |`Bitbucket repository owner` |
|username |`Bitbucket username` |
|password |`Bitbucket user password or app password`|
## Basic usage
**How install**
```bash
pip install fifbucket
```
**How load the class:**
```python
# -*- coding: utf-8 -*-
OWNER="owner"
BITBUCKET_USER="username"
BUTBUCKET_PASSWORD="password"
from fifbucket.client import Bitbucket
bitbucket = Bitbucket(owner=OWNER, username=BITBUCKET_USER, password=BUTBUCKET_PASSWORD)
```
**get_repos(query) example:** list all repository from a project
* API info: [`https://api.bitbucket.org/2.0/repositories/{username}`](https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D)
```python
PROJECT = 'PROJ'
QUERY = 'project.key="{}"'.format(PROJECT)
bitbucket.get_repos(query=QUERY)
```
**get_pr example(repo_slug, query) example:** list pull request info from a repo
* API info: [`https://api.bitbucket.org/2.0/repositories/{username}/{repository}/pullrequests`](https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pullrequests)
```python
REPOSITORY = 'repository_slug'
bitbucket.get_pr_info(REPOSITORY)
```
**get_permissions_repo(repo_slug, query) example:** list info of all admins in a repository
* API info: [`https://api.bitbucket.org/2.0/teams/{username}/permissions/repositories`](https://developer.atlassian.com/bitbucket/api/2/reference/resource/teams/%7Busername%7D/repositories)
```python
REPOSITORY = 'repository_slug'
QUERY = 'permission="admin"'
bitbucket.get_permissions_repo(REPOSITORY, query=QUERY)
```
نیازمندی
| مقدار | نام |
|---|---|
| ==2.21.0 | requests |
نحوه نصب
نصب پکیج whl fifbucket-0.9:
pip install fifbucket-0.9.whl
نصب پکیج tar.gz fifbucket-0.9:
pip install fifbucket-0.9.tar.gz