How shijl0925/python-gerrit-api works
python-gerrit-api is a Python client for Gerrit’s REST API. A client caller selects a resource operation; resource collections retrieve or create domain objects, which expose project, change, account, and group operations. The client builds authenticated HTTP requests through a shared requester and decodes Gerrit responses. The README documents broad project, change, and account workflows; sampled code confirms several resource compositions. Some subsystem links rely on the SOURCE INDEX or README rather than complete excerpts, so uncertain relationships are omitted.
Main entry points: base.py Gerrit client · project.py Project operations · change.py Change operations · requester.py HTTP requester
Components 25
Client and transport
- Gerrit client
gerrit/base.py - HTTP requester
gerrit/utils/requester.py - Response decoding
gerrit/utils/common.py - API errors
gerrit/utils/exceptions.py - Server configuration
gerrit/config/config.py - Plugin operations
gerrit/plugins/plugins.py - Gitiles client
gitiles/base.py
Project management
- Project collection
gerrit/projects/projects.py - Project operations
gerrit/projects/project.py - Branches, tags, labels
gerrit/projects - Project extensions
gerrit/projects - Access rights
gerrit/access.py
Change review
- Change collection
gerrit/changes/changes.py - Change operations
gerrit/changes/change.py - Reviewers
gerrit/changes/reviewers.py - Revision and files
gerrit/changes/revision.py - Comments and drafts
gerrit/changes
Accounts and groups
- Account collection
gerrit/accounts/accounts.py - Account operations
gerrit/accounts/account.py - Email and keys
gerrit/accounts - Group collection
gerrit/groups/groups.py - Group operations
gerrit/groups/group.py - Group membership
gerrit/groups
Other components
- Python caller
- Gerrit server
Connections 28
- Python caller → Gerrit client: creates client
- Python caller → Project collection: requests projects
- Python caller → Change collection: requests changes
- Python caller → Account collection: requests accounts
- Python caller → Group collection: requests groups
- Gerrit client → HTTP requester: sends requests
gerrit/base.py - Gerrit client → Response decoding: decodes responses
gerrit/base.py - HTTP requester → Gerrit server: sends HTTP
gerrit/utils/requester.py - HTTP requester → API errors: raises errors
gerrit/utils/requester.py - Gerrit client → Project collection: exposes collection
gerrit/base.py - Gerrit client → Change collection: exposes collection
gerrit/base.py - Gerrit client → Account collection: exposes collection
gerrit/base.py - Gerrit client → Group collection: exposes collection
gerrit/base.py - Gerrit client → Server configuration: exposes configuration
gerrit/base.py - Gerrit client → Plugin operations: exposes plugins
gerrit/base.py - Project collection → Project operations: returns projects
gerrit/projects/projects.py - Project operations → Branches, tags, labels: provides ref operations
gerrit/projects/project.py - Project operations → Project extensions: provides extensions
gerrit/projects/project.py - Project operations → Access rights: manages access
gerrit/projects/project.py - Change collection → Change operations: returns changes
gerrit/changes/changes.py - Change operations → Reviewers: provides reviewers
gerrit/changes/change.py - Change operations → Revision and files: provides revisions
gerrit/changes/change.py - Change operations → Comments and drafts: provides details
gerrit/changes/change.py - Account collection → Account operations: returns accounts
gerrit/accounts/accounts.py - Account operations → Email and keys: provides account keys
gerrit/accounts/account.py - Group collection → Group operations: returns groups
gerrit/groups/groups.py - Group operations → Group membership: provides membership
gerrit/groups/group.py - Gerrit client → Gitiles client: shares requester
gitiles/base.py