Metadata-Version: 2.4
Name: quantjourney-common-sdk
Version: 0.1.1
Summary: Shared transport and contract mechanics for QuantJourney SDKs.
Author: QuantJourney
License-Expression: LicenseRef-Proprietary
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Provides-Extra: frames
Requires-Dist: pandas>=2.0.0; extra == "frames"

# quantjourney-common-sdk

Shared Python mechanics for QJ SDKs.

This package owns only transport-level concerns: auth/token exchange, HTTP
request handling, response envelopes, pagination helpers, bounded retry, and
small typed models. Domain clients live in SDK-specific packages such as
`qj.data` and `qj.api`.

Canonical package metadata:

| Field | Value |
| --- | --- |
| Repository | `_repo_qj_common_sdk` |
| Distribution | `quantjourney-common-sdk` |
| Python import | `qj.common` |
| Version | `0.1.1` |
| Git tag | `v0.1.1` |
| Namespace style | PEP 420 namespace package |

`quantjourney-common-sdk` must not ship `qj/__init__.py`. It is designed to
co-install with `quantjourney-data` and `quantjourney-api`.

Install from PyPI:

```bash
pip install quantjourney-common-sdk==0.1.1
```

No private Python package registry is required. Consumers should pin a compatible
release range in application dependencies.

Auth model:

- `QJ_*_TOKEN` is sent as a Bearer token directly.
- `QJ_*_API_KEY=QJ_live_*` is exchanged through `qj-auth /auth/token`.
- `QJ_*_CLIENT_ID` + `QJ_*_CLIENT_SECRET=QJ_svc_*` use `client_credentials`.
- exchanged JWTs are cached in memory until shortly before `exp`.

Transport model:

- idempotent reads retry `429/502/503/504` with bounded backoff;
- each request gets `X-QJ-Request-ID`;
- response envelopes are parsed into `QJResponse`.
