Skip to main content

A standalone Python library for working with git-bug repositories

Project description

ezgb: easy git-bug for Python

A standalone Python library for working with git-bug repositories. It lets you list, create, query, and update bugs that are stored as native git objects -- no external database required.

Features

  • Fast reads -- bug data is read directly from git objects via pygit2 (libgit2 bindings). Listing uses the git-bug CLI cache when available (~100ms for hundreds of bugs).
  • Safe writes -- all mutations go through the git bug CLI, which keeps Lamport clocks and the operation DAG consistent.
  • Simple API -- one main class (GitBugRepo) with plain Python dataclasses for bugs, comments, and identities.

Quick example

from ezgb import GitBugRepo, Status

repo = GitBugRepo('/path/to/repo')

# List open bugs
for bug in repo.list_bugs(status=Status.OPEN):
    print(bug.title)

# Create a new bug
bug = repo.create_bug('Login page is broken', 'Steps to reproduce...')

# Add a comment
repo.add_comment(bug.id, 'I can reproduce this on Firefox 130.')

Requirements

  • Python 3.9 or later
  • pygit2 (libgit2 Python bindings)
  • git-bug v0.10+ on your $PATH (needed for write operations and fast cached listing)

Installation

git clone https://git.kernel.org/pub/scm/utils/ezgb/ezgb.git
cd ezgb
pip install -e .

Documentation

Full documentation is in the docs/ directory. Build it with:

pip install sphinx sphinx-rtd-theme
make -C docs html

Then open docs/_build/html/index.html in your browser.

Running tests

pip install -e '.[dev]'
python -m pytest

The test suite includes unit tests (using real git objects in temporary repos via pygit2) and integration tests that exercise the full stack including the git-bug binary.

Contributing

See CONTRIBUTING.md for details on submitting patches, coding style, and the Developer Certificate of Origin.

License

GPLv2 or later. See COPYING for the full text.

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

ezgb-0.1.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ezgb-0.1-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file ezgb-0.1.tar.gz.

File metadata

  • Download URL: ezgb-0.1.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ezgb-0.1.tar.gz
Algorithm Hash digest
SHA256 2555c9230b1c3909e96a785b91cdfad127a7dc4ae77caa989a0f24e077e20372
MD5 5852f25965d9ed062ea1c466e02de1b3
BLAKE2b-256 5ec27c225491205818d27642fa5b4586c29dd05b0f3e8ec0ef653a39faf93e9f

See more details on using hashes here.

File details

Details for the file ezgb-0.1-py3-none-any.whl.

File metadata

  • Download URL: ezgb-0.1-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ezgb-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f49af2773afc03918613e6d7c30f1afac8b15e313d79ec8b77faf7c53259d34
MD5 c33b0c7d0bd3f6b4f8e942ea453e363f
BLAKE2b-256 e4c02d481951037d582e65dced86df148e94d2017835f59e3b6479b7ef8c09b8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page