poelis-sdk 0.1.6__tar.gz → 0.1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of poelis-sdk might be problematic. Click here for more details.
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/PKG-INFO +1 -1
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/notebooks/try_poelis_sdk.ipynb +44 -4
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/pyproject.toml +1 -1
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/models.py +3 -1
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/org_validation.py +0 -4
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/products.py +6 -4
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/uv.lock +1 -1
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/.github/workflows/ci.yml +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/.github/workflows/codeql.yml +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/.github/workflows/publish-on-push.yml +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/.gitignore +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/LICENSE +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/README.md +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/__init__.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/_transport.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/auth0.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/browser.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/client.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/exceptions.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/items.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/logging.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/search.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/poelis_sdk/workspaces.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/tests/test_client_basic.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/tests/test_errors_and_backoff.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/tests/test_items_client.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/tests/test_search_client.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/src/tests/test_transport_and_products.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/tests/__init__.py +0 -0
- {poelis_sdk-0.1.6 → poelis_sdk-0.1.8}/tests/test_integration_smoke.py +0 -0
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"First, let's install the Poelis Python SDK. The SDK requires Python 3.11 or higher.\n",
|
|
35
35
|
"\n",
|
|
36
36
|
"```bash\n",
|
|
37
|
-
"pip install poelis-sdk\n",
|
|
37
|
+
"pip install -U poelis-sdk\n",
|
|
38
38
|
"```\n",
|
|
39
39
|
"\n",
|
|
40
40
|
"### Requirements\n",
|
|
@@ -45,19 +45,59 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"cell_type": "code",
|
|
48
|
-
"execution_count":
|
|
48
|
+
"execution_count": 1,
|
|
49
49
|
"metadata": {},
|
|
50
50
|
"outputs": [
|
|
51
51
|
{
|
|
52
52
|
"name": "stdout",
|
|
53
53
|
"output_type": "stream",
|
|
54
54
|
"text": [
|
|
55
|
-
"
|
|
55
|
+
"Requirement already satisfied: poelis-sdk in /opt/homebrew/lib/python3.11/site-packages (0.1.7)\n",
|
|
56
|
+
"Requirement already satisfied: build>=1.3.0 in /opt/homebrew/lib/python3.11/site-packages (from poelis-sdk) (1.3.0)\n",
|
|
57
|
+
"Requirement already satisfied: httpx>=0.27 in /opt/homebrew/lib/python3.11/site-packages (from poelis-sdk) (0.28.1)\n",
|
|
58
|
+
"Requirement already satisfied: pydantic>=2.7 in /opt/homebrew/lib/python3.11/site-packages (from poelis-sdk) (2.12.0)\n",
|
|
59
|
+
"Requirement already satisfied: twine>=6.2.0 in /opt/homebrew/lib/python3.11/site-packages (from poelis-sdk) (6.2.0)\n",
|
|
60
|
+
"Requirement already satisfied: packaging>=19.1 in /opt/homebrew/lib/python3.11/site-packages (from build>=1.3.0->poelis-sdk) (25.0)\n",
|
|
61
|
+
"Requirement already satisfied: pyproject_hooks in /opt/homebrew/lib/python3.11/site-packages (from build>=1.3.0->poelis-sdk) (1.2.0)\n",
|
|
62
|
+
"Requirement already satisfied: anyio in /opt/homebrew/lib/python3.11/site-packages (from httpx>=0.27->poelis-sdk) (4.11.0)\n",
|
|
63
|
+
"Requirement already satisfied: certifi in /opt/homebrew/lib/python3.11/site-packages (from httpx>=0.27->poelis-sdk) (2025.10.5)\n",
|
|
64
|
+
"Requirement already satisfied: httpcore==1.* in /opt/homebrew/lib/python3.11/site-packages (from httpx>=0.27->poelis-sdk) (1.0.9)\n",
|
|
65
|
+
"Requirement already satisfied: idna in /opt/homebrew/lib/python3.11/site-packages (from httpx>=0.27->poelis-sdk) (3.10)\n",
|
|
66
|
+
"Requirement already satisfied: h11>=0.16 in /opt/homebrew/lib/python3.11/site-packages (from httpcore==1.*->httpx>=0.27->poelis-sdk) (0.16.0)\n",
|
|
67
|
+
"Requirement already satisfied: annotated-types>=0.6.0 in /opt/homebrew/lib/python3.11/site-packages (from pydantic>=2.7->poelis-sdk) (0.7.0)\n",
|
|
68
|
+
"Requirement already satisfied: pydantic-core==2.41.1 in /opt/homebrew/lib/python3.11/site-packages (from pydantic>=2.7->poelis-sdk) (2.41.1)\n",
|
|
69
|
+
"Requirement already satisfied: typing-extensions>=4.14.1 in /opt/homebrew/lib/python3.11/site-packages (from pydantic>=2.7->poelis-sdk) (4.15.0)\n",
|
|
70
|
+
"Requirement already satisfied: typing-inspection>=0.4.2 in /opt/homebrew/lib/python3.11/site-packages (from pydantic>=2.7->poelis-sdk) (0.4.2)\n",
|
|
71
|
+
"Requirement already satisfied: readme-renderer>=35.0 in /opt/homebrew/lib/python3.11/site-packages (from twine>=6.2.0->poelis-sdk) (44.0)\n",
|
|
72
|
+
"Requirement already satisfied: requests>=2.20 in /opt/homebrew/lib/python3.11/site-packages (from twine>=6.2.0->poelis-sdk) (2.32.5)\n",
|
|
73
|
+
"Requirement already satisfied: requests-toolbelt!=0.9.0,>=0.8.0 in /opt/homebrew/lib/python3.11/site-packages (from twine>=6.2.0->poelis-sdk) (1.0.0)\n",
|
|
74
|
+
"Requirement already satisfied: urllib3>=1.26.0 in /opt/homebrew/lib/python3.11/site-packages (from twine>=6.2.0->poelis-sdk) (2.5.0)\n",
|
|
75
|
+
"Requirement already satisfied: keyring>=21.2.0 in /opt/homebrew/lib/python3.11/site-packages (from twine>=6.2.0->poelis-sdk) (25.6.0)\n",
|
|
76
|
+
"Requirement already satisfied: rfc3986>=1.4.0 in /opt/homebrew/lib/python3.11/site-packages (from twine>=6.2.0->poelis-sdk) (2.0.0)\n",
|
|
77
|
+
"Requirement already satisfied: rich>=12.0.0 in /opt/homebrew/lib/python3.11/site-packages (from twine>=6.2.0->poelis-sdk) (14.1.0)\n",
|
|
78
|
+
"Requirement already satisfied: id in /opt/homebrew/lib/python3.11/site-packages (from twine>=6.2.0->poelis-sdk) (1.5.0)\n",
|
|
79
|
+
"Requirement already satisfied: importlib_metadata>=4.11.4 in /opt/homebrew/lib/python3.11/site-packages (from keyring>=21.2.0->twine>=6.2.0->poelis-sdk) (8.7.0)\n",
|
|
80
|
+
"Requirement already satisfied: jaraco.classes in /opt/homebrew/lib/python3.11/site-packages (from keyring>=21.2.0->twine>=6.2.0->poelis-sdk) (3.4.0)\n",
|
|
81
|
+
"Requirement already satisfied: jaraco.functools in /opt/homebrew/lib/python3.11/site-packages (from keyring>=21.2.0->twine>=6.2.0->poelis-sdk) (4.3.0)\n",
|
|
82
|
+
"Requirement already satisfied: jaraco.context in /opt/homebrew/lib/python3.11/site-packages (from keyring>=21.2.0->twine>=6.2.0->poelis-sdk) (6.0.1)\n",
|
|
83
|
+
"Requirement already satisfied: zipp>=3.20 in /opt/homebrew/lib/python3.11/site-packages (from importlib_metadata>=4.11.4->keyring>=21.2.0->twine>=6.2.0->poelis-sdk) (3.23.0)\n",
|
|
84
|
+
"Requirement already satisfied: nh3>=0.2.14 in /opt/homebrew/lib/python3.11/site-packages (from readme-renderer>=35.0->twine>=6.2.0->poelis-sdk) (0.3.1)\n",
|
|
85
|
+
"Requirement already satisfied: docutils>=0.21.2 in /opt/homebrew/lib/python3.11/site-packages (from readme-renderer>=35.0->twine>=6.2.0->poelis-sdk) (0.22.2)\n",
|
|
86
|
+
"Requirement already satisfied: Pygments>=2.5.1 in /opt/homebrew/lib/python3.11/site-packages (from readme-renderer>=35.0->twine>=6.2.0->poelis-sdk) (2.19.2)\n",
|
|
87
|
+
"Requirement already satisfied: charset_normalizer<4,>=2 in /opt/homebrew/lib/python3.11/site-packages (from requests>=2.20->twine>=6.2.0->poelis-sdk) (3.4.3)\n",
|
|
88
|
+
"Requirement already satisfied: markdown-it-py>=2.2.0 in /opt/homebrew/lib/python3.11/site-packages (from rich>=12.0.0->twine>=6.2.0->poelis-sdk) (4.0.0)\n",
|
|
89
|
+
"Requirement already satisfied: mdurl~=0.1 in /opt/homebrew/lib/python3.11/site-packages (from markdown-it-py>=2.2.0->rich>=12.0.0->twine>=6.2.0->poelis-sdk) (0.1.2)\n",
|
|
90
|
+
"Requirement already satisfied: sniffio>=1.1 in /opt/homebrew/lib/python3.11/site-packages (from anyio->httpx>=0.27->poelis-sdk) (1.3.1)\n",
|
|
91
|
+
"Requirement already satisfied: more-itertools in /opt/homebrew/lib/python3.11/site-packages (from jaraco.classes->keyring>=21.2.0->twine>=6.2.0->poelis-sdk) (10.8.0)\n",
|
|
92
|
+
"Requirement already satisfied: backports.tarfile in /opt/homebrew/lib/python3.11/site-packages (from jaraco.context->keyring>=21.2.0->twine>=6.2.0->poelis-sdk) (1.2.0)\n",
|
|
93
|
+
"\n",
|
|
94
|
+
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m25.1.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m25.2\u001b[0m\n",
|
|
95
|
+
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49m/opt/homebrew/opt/python@3.11/bin/python3.11 -m pip install --upgrade pip\u001b[0m\n"
|
|
56
96
|
]
|
|
57
97
|
}
|
|
58
98
|
],
|
|
59
99
|
"source": [
|
|
60
|
-
"!pip install poelis-sdk"
|
|
100
|
+
"!pip install -U poelis-sdk"
|
|
61
101
|
]
|
|
62
102
|
},
|
|
63
103
|
{
|
|
@@ -12,7 +12,9 @@ class Product(BaseModel):
|
|
|
12
12
|
|
|
13
13
|
id: str = Field(min_length=1)
|
|
14
14
|
name: str = Field(min_length=1)
|
|
15
|
-
|
|
15
|
+
workspaceId: Optional[str] = None
|
|
16
|
+
code: Optional[str] = None
|
|
17
|
+
description: Optional[str] = None
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
class PaginatedProducts(BaseModel):
|
|
@@ -77,10 +77,6 @@ def filter_by_organization(data_list: List[Dict[str, Any]], expected_org_id: str
|
|
|
77
77
|
else:
|
|
78
78
|
cross_org_count += 1
|
|
79
79
|
|
|
80
|
-
if cross_org_count > 0:
|
|
81
|
-
# Log warning about cross-org data (but don't fail)
|
|
82
|
-
print(f"⚠️ Warning: Filtered out {cross_org_count} {data_type} from other organizations")
|
|
83
|
-
|
|
84
80
|
return filtered
|
|
85
81
|
|
|
86
82
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from typing import Generator, Optional,
|
|
3
|
+
from typing import Generator, Optional, TYPE_CHECKING
|
|
4
4
|
|
|
5
5
|
from ._transport import Transport
|
|
6
6
|
from .models import PaginatedProducts, Product
|
|
@@ -32,7 +32,7 @@ class ProductsClient:
|
|
|
32
32
|
|
|
33
33
|
query = (
|
|
34
34
|
"query($ws: ID!, $q: String, $limit: Int!, $offset: Int!) {\n"
|
|
35
|
-
" products(workspaceId: $ws, q: $q, limit: $limit, offset: $offset) { id name code description
|
|
35
|
+
" products(workspaceId: $ws, q: $q, limit: $limit, offset: $offset) { id name workspaceId code description }\n"
|
|
36
36
|
"}"
|
|
37
37
|
)
|
|
38
38
|
variables = {"ws": workspace_id, "q": q, "limit": int(limit), "offset": int(offset)}
|
|
@@ -41,8 +41,10 @@ class ProductsClient:
|
|
|
41
41
|
payload = resp.json()
|
|
42
42
|
if "errors" in payload:
|
|
43
43
|
raise RuntimeError(str(payload["errors"]))
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
|
|
45
|
+
products = payload.get("data", {}).get("products", [])
|
|
46
|
+
|
|
47
|
+
return PaginatedProducts(data=[Product(**r) for r in products], limit=limit, offset=offset)
|
|
46
48
|
|
|
47
49
|
def iter_all_by_workspace(self, *, workspace_id: str, q: Optional[str] = None, page_size: int = 100, start_offset: int = 0) -> Generator[Product, None, None]:
|
|
48
50
|
"""Iterate products via GraphQL with offset pagination for a workspace."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|