1 месяц назад
История
README.md
pygitflic
Python SDK for GitFlic API.
Installation
pip install gitflic
# or
poetry add gitflic
Quick Start
from gitflic import GitFlic
client = GitFlic(token='your_token')
# Projects
projects = client.projects()
for p in projects.items:
print(p.title)
# Issues
project = client.project('owner', 'my-project')
issues = project.issues()
for issue in issues.items:
print(f'#{issue.localId}: {issue.title}')
# Create issue
issue = project.create_issue(title='Bug', description='Fix me')
# Merge Requests
mrs = project.merge_requests()
for mr in mrs.items:
print(f'!{mr.localId}: {mr.title}')
# Pipelines
pipelines = project.pipelines()
for pipe in pipelines.items:
print(f'Pipeline #{pipe.localId}: {pipe.status}')
Features
| Area | Models | Methods |
|---|---|---|
| Projects | Project |
CRUD, members, settings, archive, mirror |
| Branches | Branch |
List, create, get by name, compare, protect |
| Commits | Commit |
Get, diff, files, cherry-pick |
| Issues | Issue, IssueComment |
CRUD, comments, relations, files |
| Merge Requests | MergeRequest, ApprovalRule, MergeRequestSettings |
CRUD, approve, merge, discussions, settings |
| Releases | Release, ReleaseFile |
CRUD, files |
| WebHooks | WebHook |
CRUD |
| CI/CD | Pipeline, Job, Artifact, CICDVariable |
Pipelines, jobs, artifacts, variables |
| Runners | Runner |
CRUD, registration, jobs |
| Tags | Tag |
CRUD, diff, protection |
| Environment Protection | EnvironmentProtection |
CRUD (Team/Company) |
| Tag Protection | TagProtection |
CRUD (Team/Company) |
| Branch Protection | BranchProtection |
CRUD (Project/Team/Company) |
| Packages | Package, PackageVersion, PackageFile |
CRUD (Project/Company/Global) |
| Registry | RegistryRepository |
CRUD (Project/Company/Global) |
| Companies | Company |
Members, settings, pipeline, protection |
| Teams | Team |
Members, settings, pipeline, protection |
| Users | User |
Profile, projects, followers |
| Admin | AdminSettings, AdminUser |
Users, SSH keys, runners |
| User Settings | SshKey, AccessToken, OAuthApp |
SSH, tokens, OAuth |
| Deploy Tokens | DeployToken |
Create |
50+ model classes, 370+ methods, 100% API coverage.
Documentation
SDK reference (Russian): see docs/.
Development
# Install
poetry install
# Run tests
poetry run pytest -v tests/
# Run with tox
poetry run tox
License
GNU General Public License v3.0. See LICENSE.
Описание
Python wrapper around GitFlic API
Конвейеры
0
успешных
0
с ошибкой