Skip to main content

Python client for the Chromium Issue Tracker

Project description


Python client for the Chromium Issue Tracker.

Table of Contents

Installation

pip install buganise

or

pip install buganize

Usage as a library

Search issues

from buganise import Buganise

async with Buganise() as client:
    result = await client.search("status:open component:Blink", page_size=10)

print(f"{result.total_count} total matches")
for issue in result.issues:
    print(f"#{issue.id} [{issue.status.name}] {issue.title}")

if result.has_more:
    next_page = await client.next_page(result)

Get a single issue

async with Buganise() as client:
    issue = await client.issue(40060244)

print(issue.title)
print(issue.url)  # https://issues.chromium.org/issues/40060244
print(issue.status.name)  # e.g. "FIXED"
print(issue.priority.name)  # e.g. "P2"
print(issue.os)  # e.g. ["Linux", "Mac", "Windows"]
print(issue.cve)  # e.g. ["CVE-2024-1234"]

Batch get issues

async with Buganise() as client:
    issues = await client.issues([40060244, 485912774, 486077869])

for issue in issues:
    print(f"#{issue.id} - {issue.title}")

Get comments

async with Buganise() as client:
    comments = await client.comments(486077869)

for comment in comments:
    print(f"#{comment.comment_number} by {comment.author}")
    print(comment.body)

Get full updates

Updates include both comments and field changes (status changes, priority changes, etc.):

async with Buganise() as client:
    result = await client.issue_updates(486077869)

print(f"{result.total_count} total updates")

# Just the comments, in chronological order
for comment in result.comments:
    print(f"#{comment.comment_number}: {comment.body[:80]}")

# All updates (newest first), including field changes
for update in result.updates:
    if update.field_changes:
        changed = ", ".join(fc.field for fc in update.field_changes)
        print(f"  Fields changed: {changed}")
    if update.comment:
        print(f"  Comment: {update.comment.body[:80]}")

CLI usage

Run with python -m buganise <command> or just buganise <command>.

Search

# Search for open issues
buganise search "status:open"

# Combined filters
buganise search "status:open component:Blink"

# Results per page (choices: 25, 50, 100, 250)
buganise search "type:bug" -n 100

# Fetch a total of 200 results, paginating as needed
buganise search "status:open" -l 200

Issue

buganise issue 486077869

Issues (batch)

buganise issues 40060244 485912774 486077869

Comments

buganise comments 486077869

Extra fields

By default, the table output only shows ID, Status, Priority, and Title. You can show additional columns:

# Show specific extra fields
buganise search "status:open" -f owner os milestone

# Show all available fields
buganise search "status:open" -F

# Works with issue and issues too
buganise issue 486077869 --fields cve tags labels
buganise issue 486077869 --all-fields

Available extra field names: owner, reporter, verifier, type, component, tags, ancestor_tags, labels, os, milestone, ccs, hotlists, blocking, cve, cwe, build, introduced_in, merge, merge_request, release_block, notice, flaky_test, est_days, next_action, vrp_reward, irm_link, sec_release, fixed_by, created, modified, verified, comments, stars, last_modifier.

Export

All commands support -e/--export for exporting to CSV, JSON, or HTML. You can specify multiple formats at once:

buganise -e csv search "status:open" -n 50
buganise -e json issue 486077869
buganise -e html comments 486077869

# Multiple formats in one command
buganise -e csv json search "status:open"

Debug logging

Use -d/--debug to see HTTP request/response details:

buganise --debug search "status:open"

Timeout

Use -t/--timeout to set the HTTP request timeout in seconds (default: 30):

buganise -t 60 search "status:open"

[!Tip] American English spelling buganize, will also work.

How it works

The Chromium issue tracker at issues.chromium.org doesn't have a documented public API. But the web frontend talks to a set of POST endpoints under https://issues.chromium.org/action/ using JSON arrays as request/response bodies. This library speaks that same protocol.

Every response from the API starts with )]}'\n (an anti-XSSI prefix) followed by a JSON array. Issue data comes back as 48-element positional arrays, no keys, just indexes. The parser maps those indexes to fields on the Issue dataclass. Custom fields (things like OS, milestone, CVE, component tags) are embedded inside the issue array at a specific offset and have their own internal structure.

No cookies or tokens are needed for reading public issues. The only headers required are Content-Type, Origin, Referer, and a browser-like User-Agent.

Limitations

  • This uses an undocumented API. It could break if Google changes the response format.
  • Only works with public issues. Private/restricted issues need authentication cookies that this client doesn't handle.
  • The parser is entirely index-based. If the API adds or removes fields from the arrays, the parsing will silently return wrong data.
  • Pagination for updates (comments) is not fully wired up, currently fetches the first page only.
  • The batch endpoint may not return issues in the same order as the input IDs.

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

buganise-0.2.0.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

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

buganise-0.2.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file buganise-0.2.0.tar.gz.

File metadata

  • Download URL: buganise-0.2.0.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for buganise-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f6ee9caa19dcb093be08bcdc6d159bbb55a1c91a0f3b850f6365e5fb1afcb49a
MD5 d1cccd22b8fe9434c1c14242924b1aa1
BLAKE2b-256 8454cb62b6e330509aa3e9bc603064bbb0f12ca26dbda7f1de6d9ad1893bf10c

See more details on using hashes here.

Provenance

The following attestation bundles were made for buganise-0.2.0.tar.gz:

Publisher: publish-python.yml on rly0nheart/buganise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file buganise-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: buganise-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for buganise-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89a9662e058ccdeb284290446017e0b65702f784b55c5e7d260958eff1cd3678
MD5 d084aee1ac71abdae8aca78f52e80a15
BLAKE2b-256 8370afb908a4b0827f6a71502046ea39a7c2bd233902e9a9db9107083b14e725

See more details on using hashes here.

Provenance

The following attestation bundles were made for buganise-0.2.0-py3-none-any.whl:

Publisher: publish-python.yml on rly0nheart/buganise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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