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.1.tar.gz (33.3 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.1-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ezgb-0.1.1.tar.gz
  • Upload date:
  • Size: 33.3 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.1.tar.gz
Algorithm Hash digest
SHA256 c7b9619d82b4579c0fa6aca5c6273371c37ea1fd657cc5c8b05ca7447518ac65
MD5 212a4285fe9397bfc1235a2936a02161
BLAKE2b-256 ad1cbaa729c8b7ba6c8f0b6ddcfecdfaf552226079b6d38d8eea7da7b2601954

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ezgb-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d350fa0a14aa2a5b0fa1f3fd703867c1258b0b82d8cc880f25435ef50b0b1fce
MD5 243a4f1bbbc82e23ba131a1313ef9b9f
BLAKE2b-256 6bdc9e57312d502e7158e7da330f450de38c6fa0cece1421bfe6cd7b68888192

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