py-jama-rest-client

raw JSON →
1.17.1 verified Fri May 01 auth: no python

A Python client for the Jama Connect REST API. Current version 1.17.1. Released irregularly.

pip install py-jama-rest-client
error ModuleNotFoundError: No module named 'jama'
cause Package not installed or wrong import path.
fix
Run pip install py-jama-rest-client and import as from jama.client import Client.
error AttributeError: module 'jama' has no attribute 'JamaClient'
cause Old import pattern used; JamaClient was removed in v1.0.
fix
Use from jama.client import Client instead.
error TypeError: __init__() got an unexpected keyword argument 'access_token'
cause Using OAuth parameter without setting oauth=True.
fix
Client(base_url, oauth=True, access_token='...')
gotcha The Client constructor expects password for basic auth; for oauth, pass oauth=True and use access_token parameter. Mixing these may cause silent auth failures.
fix For OAuth: Client(base_url, oauth=True, access_token='...'). For basic auth: Client(base_url, username='...', password='...', oauth=False).
deprecated In v1.0+, the old import path `from jama import JamaClient` is removed. Use `from jama.client import Client`.
fix Replace `from jama import JamaClient` with `from jama.client import Client`.
gotcha Methods may return paginated results. Forgetting to handle pagination can lead to incomplete data. Use `client.get(endpoint, params={'maxResults': ...})` and check for links.next.
fix Loop through pages using the 'links' key in response, e.g., while response.get('links', {}).get('next'): response = client.get(response['links']['next'])

Authenticate and list projects.

from jama.client import Client

client = Client(
    base_url='https://myinstance.jamacloud.com',
    username='user@domain.com',
    password='password',
    oauth=False
)
projects = client.get_projects()
print(projects)