refactor: replace py_jama_rest_client with async httpx client#1
Merged
Conversation
Bug fixes: - create_item: pass all 5 required args to post_item (was missing location + child_item_type_id) - get_item_children: fix method name from get_items_children to get_item_children - get_pick_lists: remove incorrect project_id param (API is global) - get_project: implement via get_projects() filter (method doesn't exist in client) - get_relationships: rename to get_relationship_types (matched wrong method) - get_item_relationships: replace with upstream/downstream variants (was passing item_id to project-scoped get_relationships) New features: - create_test_plan: direct REST call to POST /testplans (not in py_jama_rest_client) - create_test_cycle, get_test_cycle, get_test_runs, update_test_run - create_relationship: expose post_relationship for traceability links - get_item_upstream_relationships, get_item_downstream_relationships
- New jama_cli/core/http_client.py: async HTTP client with auth (basic, API key, OAuth), pagination (page size 50 vs old 20), retry on 429, typed exceptions - New jama_cli/core/api.py: ~60 typed async API methods including create_test_plan (no longer needs __core bypass) - New jama_cli/core/sync_wrapper.py: background-thread sync facade for CLI - New jama_cli/core/exceptions.py: clean exception hierarchy preserving class names for backward compatibility Updated consumers: - jama_cli/core/client.py: uses SyncJamaApi instead of PyJamaClient, eliminates _JamaClient__core hack - jama_mcp_server/core/stdio_server.py: uses async JamaApi directly, removes all run_in_executor boilerplate Dependency change: py-jama-rest-client -> httpx in pyproject.toml Note: jama_mcp_server/core/server.py (HTTP MCP) still uses py_jama_rest_client — will be updated in a follow-up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
py-jama-rest-clientdependency with a native asynchttpx-based clientNew files
jama_cli/core/http_client.py— async HTTP client (auth, pagination at 50/page vs old 20, 429 retry)jama_cli/core/api.py— ~60 typed async API methodsjama_cli/core/sync_wrapper.py— background-thread sync facade for CLIjama_cli/core/exceptions.py— clean exception hierarchyKey improvements
run_in_executorwrapping)create_test_planworks natively (no more_JamaClient__corebypass hack)Note
jama_mcp_server/core/server.py(HTTP MCP) still uses py_jama_rest_client — will be updated in a follow-up PR.Test plan