From 13f50c59f0e04c035766c4c4ba46f36b3cc177fc Mon Sep 17 00:00:00 2001 From: Gavin Sharp Date: Wed, 4 Mar 2026 16:35:35 -0500 Subject: [PATCH 1/3] Update README for v8 OAuth 2.0 migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update code examples to reflect the v8 breaking changes: - Client/AsyncClient/phenoml → PhenomlClient/AsyncPhenomlClient - username/password auth → OAuth 2.0 client credentials (client_id/client_secret) - Remove initialize() call from async example (no longer needed with built-in OAuth) - Update base_url examples to use new domain format Co-Authored-By: Claude Opus 4.6 --- README.md | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index ee9c77f..5e930fb 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,12 @@ A full reference for this library is available [here](https://github.com/phenoml Instantiate and use the client with the following: ```python -from phenoml import Client +from phenoml import PhenomlClient -client = Client( - username="your_username", - password="your_password", - base_url="https://your-phenoml-instance.com" +client = PhenomlClient( + client_id="YOUR_CLIENT_ID", + client_secret="YOUR_CLIENT_SECRET", + base_url="https://yourinstance.app.pheno.ml", ) client.agent.create( @@ -42,17 +42,16 @@ The SDK also exports an `async` client so that you can make non-blocking calls t ```python import asyncio -from phenoml import AsyncClient +from phenoml import AsyncPhenomlClient -client = AsyncClient( - username="your_username", - password="your_password", - base_url="https://your-phenoml-instance.com" +client = AsyncPhenomlClient( + client_id="YOUR_CLIENT_ID", + client_secret="YOUR_CLIENT_SECRET", + base_url="https://yourinstance.app.pheno.ml", ) async def main() -> None: - await client.initialize() # Generate token from username/password await client.agent.create( name="name", prompts=["prompt_123", "prompt_456"], @@ -86,10 +85,12 @@ The SDK provides access to raw response data, including headers, through the `.w The `.with_raw_response` property returns a "raw" client that can be used to access the `.headers` and `.data` attributes. ```python -from phenoml import phenoml +from phenoml import PhenomlClient -client = phenoml( - ..., +client = PhenomlClient( + client_id="YOUR_CLIENT_ID", + client_secret="YOUR_CLIENT_SECRET", + base_url="https://yourinstance.app.pheno.ml", ) response = client.agent.with_raw_response.create(...) print(response.headers) # access the response headers @@ -121,11 +122,12 @@ client.agent.create(..., request_options={ The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level. ```python +from phenoml import PhenomlClient -from phenoml import phenoml - -client = phenoml( - ..., +client = PhenomlClient( + client_id="YOUR_CLIENT_ID", + client_secret="YOUR_CLIENT_SECRET", + base_url="https://yourinstance.app.pheno.ml", timeout=20.0, ) @@ -143,10 +145,12 @@ and transports. ```python import httpx -from phenoml import phenoml +from phenoml import PhenomlClient -client = phenoml( - ..., +client = PhenomlClient( + client_id="YOUR_CLIENT_ID", + client_secret="YOUR_CLIENT_SECRET", + base_url="https://yourinstance.app.pheno.ml", httpx_client=httpx.Client( proxies="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0"), From 7d14d5269c7eced3f1d5d5b2be6ee7dc01312bfb Mon Sep 17 00:00:00 2001 From: Gavin Sharp Date: Wed, 4 Mar 2026 16:40:56 -0500 Subject: [PATCH 2/3] chore: bump version to 8.0.1 for README update Co-Authored-By: Claude Opus 4.6 --- .fern/metadata.json | 2 +- pyproject.toml | 2 +- src/phenoml/core/client_wrapper.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.fern/metadata.json b/.fern/metadata.json index a1c6702..3c97467 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -5,5 +5,5 @@ "generatorConfig": { "client_class_name": "PhenomlClient" }, - "sdkVersion": "8.0.0" + "sdkVersion": "8.0.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index be0c282..1311071 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ dynamic = ["version"] [tool.poetry] name = "phenoml" -version = "8.0.0" +version = "8.0.1" description = "" readme = "README.md" authors = [] diff --git a/src/phenoml/core/client_wrapper.py b/src/phenoml/core/client_wrapper.py index 5341ea9..ca2bdb3 100644 --- a/src/phenoml/core/client_wrapper.py +++ b/src/phenoml/core/client_wrapper.py @@ -27,12 +27,12 @@ def get_headers(self) -> typing.Dict[str, str]: import platform headers: typing.Dict[str, str] = { - "User-Agent": "phenoml/8.0.0", + "User-Agent": "phenoml/8.0.1", "X-Fern-Language": "Python", "X-Fern-Runtime": f"python/{platform.python_version()}", "X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}", "X-Fern-SDK-Name": "phenoml", - "X-Fern-SDK-Version": "8.0.0", + "X-Fern-SDK-Version": "8.0.1", **(self.get_custom_headers() or {}), } token = self._get_token() From f036f48e5e5df104b5a34342a1c083deed7223f0 Mon Sep 17 00:00:00 2001 From: Gavin Sharp Date: Wed, 4 Mar 2026 16:51:31 -0500 Subject: [PATCH 3/3] fix: correct agent.create() examples in README Co-Authored-By: Claude Opus 4.6 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e930fb..ffa6d80 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ client = PhenomlClient( client.agent.create( name="name", + provider="provider_id", prompts=["prompt_123", "prompt_456"], - is_active=True, ) ``` @@ -54,8 +54,8 @@ client = AsyncPhenomlClient( async def main() -> None: await client.agent.create( name="name", + provider="provider_id", prompts=["prompt_123", "prompt_456"], - is_active=True, )