From 5718aabb9bf1ec05a6e6cd4335332f7da38766cc Mon Sep 17 00:00:00 2001 From: S2D2 Date: Tue, 10 Nov 2026 20:28:07 +0000 Subject: [PATCH 1/2] fix(packaging): declare the Apache 2.0 licence and use absolute README links The classifier said MIT while LICENSE and the README say Apache 2.0, so PyPI showed the wrong licence. The README is the PyPI long description, where relative links to examples/ and MIGRATION.md resolve to nothing. Co-Authored-By: Claude Opus 5.5 Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com> --- README.md | 20 ++++++++++---------- pyproject.toml | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index e3d41a0..471c835 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ model can call itself. Every block below runs as written against any linked account — the `*_list_*` filter discovers whatever your key can reach rather than assuming a provider. -Each has a matching runnable script in [examples/](examples/). +Each has a matching runnable script in [examples/](https://github.com/StackOneHQ/stackone-ai-python/tree/main/examples).
OpenAI @@ -137,7 +137,7 @@ messages.extend(tools.execute_openai_tool_calls(message.tool_calls)) messages to send back. A failed call becomes an error message the model can read and retry from, rather than an exception. Chat Completions accepts at most **128 tools**, so filter before binding. See -[examples/openai_integration.py](examples/openai_integration.py) for the full +[examples/openai_integration.py](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/openai_integration.py) for the full round trip, including feeding results back for a final answer.
@@ -315,7 +315,7 @@ The SDK exposes the same actions through two surfaces. Both execute over MCP your arguments as given, except header arguments: each is forwarded only if the tool's schema declares it, and `Authorization`, `x-account-id`, `User-Agent` and `x-end-user-id` never are (see -[the migration guide](MIGRATION.md#tool-arguments-and-headers)). They take **different +[the migration guide](https://github.com/StackOneHQ/stackone-ai-python/blob/main/MIGRATION.md#tool-arguments-and-headers)). They take **different argument shapes**, because each mirrors the schema the server served for it. Both return the server's result exactly as it wrote it: `{"isError": false, "result": ..., "defenderMetadata"?, "policyMetadata"?}`. @@ -376,14 +376,14 @@ Falls back to the `STACKONE_BASE_URL` environment variable, then to ## Examples -For more examples, check out the [examples/](examples/) directory: +For more examples, check out the [examples/](https://github.com/StackOneHQ/stackone-ai-python/tree/main/examples) directory: -- [OpenAI Integration](examples/openai_integration.py) — OpenAI function calling -- [Search and Execute](examples/search_and_execute.py) — the recommended flow -- [LangChain Integration](examples/langchain_integration.py) — LangChain tools -- [LangGraph Integration](examples/langgraph_integration.py) — LangGraph agent -- [Pydantic AI Integration](examples/pydantic_ai_integration.py) — Pydantic AI agent -- [Auth Management](examples/auth_management.py) — API key and account ID patterns +- [OpenAI Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/openai_integration.py) — OpenAI function calling +- [Search and Execute](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/search_and_execute.py) — the recommended flow +- [LangChain Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/langchain_integration.py) — LangChain tools +- [LangGraph Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/langgraph_integration.py) — LangGraph agent +- [Pydantic AI Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/pydantic_ai_integration.py) — Pydantic AI agent +- [Auth Management](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/auth_management.py) — API key and account ID patterns ## Development diff --git a/pyproject.toml b/pyproject.toml index 9defced4..56c7a6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ authors = [{ name = "StackOne", email = "support@stackone.com" }] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", From e66be800516f59c75c0999a6ce0b55e28317d338 Mon Sep 17 00:00:00 2001 From: S2D2 Date: Wed, 11 Nov 2026 00:55:33 +0000 Subject: [PATCH 2/2] fix(packaging): declare the licence as a PEP 639 expression The classifier alone left the wheel without a License-Expression, so licence scanners that read the metadata field report it as unknown. hatchling 1.27 is the first release that writes it. The last same-page README anchor becomes an absolute link, since PyPI does not render heading ids. Co-Authored-By: Claude Opus 5.5 Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com> --- README.md | 16 ++++++++-------- pyproject.toml | 5 +++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 471c835..189c10a 100644 --- a/README.md +++ b/README.md @@ -233,8 +233,8 @@ toolset.fetch_tools(account_ids=["acc-123", "acc-456"]) - **`account_ids`** — restrict to these accounts. Omit it and the SDK discovers your active shared accounts (non-shared ones too with `include_non_shared=True`). An empty list means "no filter", not "no accounts". A - single failing account is logged and skipped, not fatal — unless it is rate - limited (see [Rate limits](#rate-limits)) — and left out of the cached catalog for + single failing account is logged and skipped, not fatal (unless it is rate limited, see + [Rate limits](https://github.com/StackOneHQ/stackone-ai-python#rate-limits)), and left out of the cached catalog for 30 seconds, after which the next call lists it again. If every account fails with the same HTTP status (a revoked key's 401, say), that `StackOneAPIError` is raised; otherwise a `ToolsetLoadError` whose `failures` holds each account's error. @@ -378,12 +378,12 @@ Falls back to the `STACKONE_BASE_URL` environment variable, then to For more examples, check out the [examples/](https://github.com/StackOneHQ/stackone-ai-python/tree/main/examples) directory: -- [OpenAI Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/openai_integration.py) — OpenAI function calling -- [Search and Execute](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/search_and_execute.py) — the recommended flow -- [LangChain Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/langchain_integration.py) — LangChain tools -- [LangGraph Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/langgraph_integration.py) — LangGraph agent -- [Pydantic AI Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/pydantic_ai_integration.py) — Pydantic AI agent -- [Auth Management](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/auth_management.py) — API key and account ID patterns +- [OpenAI Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/openai_integration.py): OpenAI function calling +- [Search and Execute](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/search_and_execute.py): the recommended flow +- [LangChain Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/langchain_integration.py): LangChain tools +- [LangGraph Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/langgraph_integration.py): LangGraph agent +- [Pydantic AI Integration](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/pydantic_ai_integration.py): Pydantic AI agent +- [Auth Management](https://github.com/StackOneHQ/stackone-ai-python/blob/main/examples/auth_management.py): API key and account ID patterns ## Development diff --git a/pyproject.toml b/pyproject.toml index 56c7a6c..860d2f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,11 +4,12 @@ version = "3.0.0" description = "agents performing actions on your SaaS" readme = "README.md" requires-python = ">=3.11" +license = "Apache-2.0" +license-files = ["LICENSE"] authors = [{ name = "StackOne", email = "support@stackone.com" }] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -24,7 +25,7 @@ dependencies = [ ] [build-system] -requires = ["hatchling"] +requires = ["hatchling>=1.27"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel]