How austinmh12/pybeamer works
Purpose and Entry Points
pybeamer is a Python client library wrapping the codeBeamer Swagger v3 REST API. Consumers instantiate the public Codebeamer façade, then navigate or retrieve domain objects for projects, trackers, items, users, and fields. The package root and main client are __init__.py and client.py.
Client Façade and API Navigation
Codebeamer is the primary orchestration boundary. It owns server URL and credentials, exposes lookup/list methods such as projects, trackers, items, and users, and converts API responses into domain objects. It supports convenience lookup by numeric ID or names/keys rather than requiring callers to use raw REST paths.
Paths: client.py, projects.py, user.py.
HTTP Transport Boundary
A dedicated REST client separates HTTP request execution from domain-facing methods. This is the boundary to the external codeBeamer deployment, including authentication, URL construction, request/response handling, and likely pagination request mechanics.
Paths: rest_client.py, client.py.
Project and Tracker Domain Hierarchy
The library models codeBeamer’s navigable hierarchy: client → projects → trackers → tracker items. Project retrieves and resolves trackers; Tracker retrieves its schema/fields and paginated items. This object graph lets callers explore unknown IDs through parent collections.
Paths: projects.py, tracker.py, client.py.
Tracker Item and Mutation Model
TrackerItem represents an individual work item, including retrieval of child items and item fields. Item-level operations are expressed through object methods rather than raw endpoint calls. The README’s primary mutation workflow is updating a field’s value, which is expected to persist through the REST layer.
Paths: tracker_item.py, fields.py, rest_client.py.
Field Abstractions
Field objects encapsulate item/tracker field metadata and values. Specialized field behavior, notably choice-field option retrieval, belongs behind this layer so callers interact with typed domain concepts instead of endpoint payloads.
Paths: fields.py, tracker.py, tracker_item.py.
Pagination and Collection Flow
Collection APIs accept page and page-size inputs; absent an explicit page, they greedily retrieve all available pages. Page size is constrained to the codeBeamer-supported range of 1–500, minimizing calls when requested. This behavior affects users, projects, trackers, and items and is a material control-flow concern for large installations.
Paths: client.py, projects.py, tracker.py.
Runtime and External Dependencies
The runtime is Python, installed through requirements.txt. Its sole external system is a reachable codeBeamer REST API server (example URL: http://localhost), authenticated with username/password and governed by that server’s permissions and endpoint availability.
Paths: requirements.txt, rest_client.py.
Main entry points: client.py Codebeamer façade · tracker_item.py Tracker item · tracker.py Tracker · rest_client.py REST client
Components 12
Public client
- Package root
__init__.py - Codebeamer façade · Public lookup, navigation, and response-to-domain orchestration.
client.py - Pagination flow · Fetches all pages when no page is specified; page sizes are 1–500.
client.py
Domain model
- Project · Resolves and retrieves project trackers.
projects.py - Tracker · Loads field schema and paginated tracker items.
tracker.py - Tracker item · Exposes child items and item-level operations.
tracker_item.py - Fields · Encapsulates metadata, values, and choice options.
fields.py - User
user.py
Transport
- REST client · Builds authenticated requests and handles API responses.
rest_client.py
Other components
- Library consumer
- codeBeamer REST API · Server permissions and endpoint availability govern access.
- Python dependencies
requirements.txt
Connections 19
- Library consumer → Package root: imports
- Package root → Codebeamer façade: exports
- Codebeamer façade → Project: lists and resolves
- Codebeamer façade → Tracker: retrieves
- Codebeamer façade → Tracker item: retrieves
- Codebeamer façade → User: lists and resolves
- Codebeamer façade → Pagination flow: collection requests
- Pagination flow → Project: pages projects
- Pagination flow → Tracker: pages trackers and items
- Project → Tracker: contains
- Tracker → Tracker item: contains
- Tracker → Fields: loads schema
- Tracker item → Tracker item: retrieves children
- Tracker item → Fields: reads and updates values
- Codebeamer façade → REST client: delegates requests
- Tracker item → REST client: persists field updates
- Fields → REST client: retrieves choice options
- REST client → codeBeamer REST API: authenticated HTTP
- Python dependencies → REST client: installs runtime support