Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"cliVersion": "4.1.1",
"cliVersion": "4.3.3",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "4.35.4",
"generatorVersion": "4.61.4",
"generatorConfig": {
"client_class_name": "phenoml"
}
"client_class_name": "PhenomlClient"
},
"sdkVersion": "8.0.0"
}
59 changes: 59 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
## 8.0.0 - 2026-03-04

### Breaking Changes

- **Authentication**: Replaced username/password authentication with OAuth 2.0 client credentials. The client now accepts `client_id` and `client_secret` parameters (defaulting to `PHENOML_CLIENT_ID` and `PHENOML_CLIENT_SECRET` environment variables). Tokens are automatically obtained and refreshed via the `/v2/auth/token` endpoint. A `token` callable is also supported for pre-existing tokens.
- **Client renamed**: The main client class is now `PhenomlClient` (was `PhenoMLClient` wrapper / `phenoml` base class).
- **Wrapper client removed**: The custom `wrapper_client.py` has been removed. Use `PhenomlClient` directly.

### Migration Guide

**Authentication** — replace username/password with client credentials:

```python
# Before
from phenoml import PhenoMLClient
client = PhenoMLClient(
username="user",
password="pass",
base_url="https://yourinstance.app.pheno.ml",
)

# After (option 1: env vars PHENOML_CLIENT_ID and PHENOML_CLIENT_SECRET)
from phenoml import PhenomlClient
client = PhenomlClient(base_url="https://yourinstance.app.pheno.ml")

# After (option 2: explicit credentials)
from phenoml import PhenomlClient
client = PhenomlClient(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
base_url="https://yourinstance.app.pheno.ml",
)

# After (option 3: pre-existing token)
from phenoml import PhenomlClient
client = PhenomlClient(
token=lambda: "YOUR_TOKEN",
base_url="https://yourinstance.app.pheno.ml",
)
```

**Import updates:**

```python
# Before
from phenoml import PhenoMLClient

# After
from phenoml import PhenomlClient
```

### Added

- New `/v2/auth/token` OAuth 2.0 client credentials endpoint with `TokenResponse`, `OAuthError`, and `OAuthErrorError` types.
- `OAuthTokenProvider` and `AsyncOAuthTokenProvider` for automatic token acquisition and refresh.
- Structured logging support via new `logging` module.
- `datetime_utils` module for date/time handling.
- Python 3.13, 3.14, and 3.15 support.

## 7.3.0 - 2026-03-03
* feat: add document multi-resource extraction endpoint
* Add comprehensive support for extracting multiple FHIR resources from documents through a new API endpoint. This enhancement combines document text extraction with multi-resource detection capabilities.
Expand Down
36 changes: 35 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[project]
name = "phenoml"
dynamic = ["version"]

[tool.poetry]
name = "phenoml"
version = "7.3.0"
version = "8.0.0"
description = ""
readme = "README.md"
authors = []
Expand All @@ -18,6 +19,9 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
Expand All @@ -44,6 +48,7 @@ typing_extensions = ">= 4.0.0"
mypy = "==1.13.0"
pytest = "^7.4.0"
pytest-asyncio = "^0.23.5"
pytest-xdist = "^3.6.1"
python-dateutil = "^2.9.0"
types-python-dateutil = "^2.9.0.20240316"
ruff = "==0.11.5"
Expand Down
Loading
Loading