poelis-sdk 0.1.4__tar.gz → 0.1.6__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.4 → poelis_sdk-0.1.6}/.github/workflows/publish-on-push.yml +23 -5
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/PKG-INFO +18 -24
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/README.md +16 -22
- poelis_sdk-0.1.6/notebooks/try_poelis_sdk.ipynb +595 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/pyproject.toml +2 -2
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/poelis_sdk/__init__.py +2 -1
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/poelis_sdk/browser.py +5 -1
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/poelis_sdk/client.py +6 -2
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/poelis_sdk/items.py +29 -6
- poelis_sdk-0.1.6/src/poelis_sdk/logging.py +73 -0
- poelis_sdk-0.1.6/src/poelis_sdk/org_validation.py +161 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/poelis_sdk/products.py +29 -3
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/poelis_sdk/search.py +1 -1
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/poelis_sdk/workspaces.py +27 -4
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/uv.lock +1 -1
- poelis_sdk-0.1.4/notebooks/try_poelis_sdk.ipynb +0 -844
- poelis_sdk-0.1.4/src/poelis_sdk/.github/workflows/sdk-ci.yml +0 -34
- poelis_sdk-0.1.4/src/poelis_sdk/.github/workflows/sdk-docs.yml +0 -55
- poelis_sdk-0.1.4/src/poelis_sdk/.github/workflows/sdk-publish-testpypi.yml +0 -31
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/.github/workflows/ci.yml +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/.github/workflows/codeql.yml +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/.gitignore +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/LICENSE +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/poelis_sdk/_transport.py +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/poelis_sdk/auth0.py +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/poelis_sdk/exceptions.py +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/poelis_sdk/models.py +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/tests/test_client_basic.py +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/tests/test_errors_and_backoff.py +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/tests/test_items_client.py +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/tests/test_search_client.py +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/src/tests/test_transport_and_products.py +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/tests/__init__.py +0 -0
- {poelis_sdk-0.1.4 → poelis_sdk-0.1.6}/tests/test_integration_smoke.py +0 -0
|
@@ -61,9 +61,27 @@ jobs:
|
|
|
61
61
|
run: |
|
|
62
62
|
uv run python -m build
|
|
63
63
|
|
|
64
|
-
- name:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
- name: List built packages
|
|
65
|
+
run: |
|
|
66
|
+
ls -la dist/
|
|
67
|
+
echo "Package contents:"
|
|
68
|
+
for pkg in dist/*; do
|
|
69
|
+
echo "Package: $pkg"
|
|
70
|
+
if [[ $pkg == *.whl ]]; then
|
|
71
|
+
unzip -l "$pkg" | head -10
|
|
72
|
+
elif [[ $pkg == *.tar.gz ]]; then
|
|
73
|
+
tar -tzf "$pkg" | head -10
|
|
74
|
+
fi
|
|
75
|
+
done
|
|
76
|
+
|
|
77
|
+
- name: Install twine
|
|
78
|
+
run: |
|
|
79
|
+
uv add twine
|
|
80
|
+
|
|
81
|
+
- name: Publish to PyPI with twine
|
|
82
|
+
env:
|
|
83
|
+
TWINE_USERNAME: __token__
|
|
84
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
85
|
+
run: |
|
|
86
|
+
uv run twine upload --skip-existing --verbose dist/*
|
|
69
87
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: poelis-sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: Official Python SDK for Poelis
|
|
5
|
-
Project-URL: Homepage, https://poelis.
|
|
5
|
+
Project-URL: Homepage, https://poelis.com
|
|
6
6
|
Project-URL: Source, https://github.com/PoelisTechnologies/poelis-python-sdk
|
|
7
7
|
Project-URL: Issues, https://github.com/PoelisTechnologies/poelis-python-sdk/issues
|
|
8
8
|
Author-email: Matteo Braceschi <matteo@poelis.com>
|
|
@@ -23,7 +23,15 @@ Description-Content-Type: text/markdown
|
|
|
23
23
|
|
|
24
24
|
# Poelis Python SDK
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Python SDK for Poelis.
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install -U poelis-sdk
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Requires Python 3.11+.
|
|
27
35
|
|
|
28
36
|
## Quickstart (API key + org ID)
|
|
29
37
|
|
|
@@ -33,40 +41,27 @@ from poelis_sdk import PoelisClient
|
|
|
33
41
|
client = PoelisClient(
|
|
34
42
|
api_key="poelis_live_A1B2C3...", # Organization Settings → API Keys
|
|
35
43
|
org_id="tenant_uci_001", # same section
|
|
36
|
-
# base_url defaults to https://api.poelis.ai
|
|
37
44
|
)
|
|
38
45
|
|
|
39
|
-
# Workspaces → Products
|
|
46
|
+
# Workspaces → Products
|
|
40
47
|
workspaces = client.workspaces.list(limit=10, offset=0)
|
|
41
48
|
ws_id = workspaces[0]["id"]
|
|
42
49
|
|
|
43
50
|
page = client.products.list_by_workspace(workspace_id=ws_id, limit=10, offset=0)
|
|
44
51
|
print([p.name for p in page.data])
|
|
45
52
|
|
|
46
|
-
# Items for a product
|
|
53
|
+
# Items for a product
|
|
47
54
|
pid = page.data[0].id
|
|
48
55
|
items = client.items.list_by_product(product_id=pid, limit=10, offset=0)
|
|
49
56
|
print([i.get("name") for i in items])
|
|
50
57
|
|
|
51
|
-
# Property search
|
|
58
|
+
# Property search
|
|
52
59
|
props = client.search.properties(q="*", workspace_id=ws_id, limit=10, offset=0)
|
|
53
60
|
print(props["total"], len(props["hits"]))
|
|
54
61
|
```
|
|
55
62
|
|
|
56
63
|
## Configuration
|
|
57
64
|
|
|
58
|
-
### Base URL
|
|
59
|
-
|
|
60
|
-
The SDK defaults to the production API (`https://api.poelis.ai`). You can override this for different environments:
|
|
61
|
-
|
|
62
|
-
- Local development: `base_url="http://localhost:8000"`
|
|
63
|
-
- Staging (example): `base_url="https://api.staging.poelis.ai"`
|
|
64
|
-
- Production (default): No need to specify, uses `https://api.poelis.ai`
|
|
65
|
-
|
|
66
|
-
Confirm the exact URLs for your environments.
|
|
67
|
-
|
|
68
|
-
Note: Multi-tenancy uses `org_id` for scoping. When using API keys, the SDK sets `X-Poelis-Org` automatically from `org_id`.
|
|
69
|
-
|
|
70
65
|
### Getting your API key and org ID
|
|
71
66
|
|
|
72
67
|
1. Navigate to Organization Settings → API Keys.
|
|
@@ -77,8 +72,8 @@ Note: Multi-tenancy uses `org_id` for scoping. When using API keys, the SDK sets
|
|
|
77
72
|
|
|
78
73
|
```bash
|
|
79
74
|
export POELIS_API_KEY=poelis_live_A1B2C3...
|
|
80
|
-
export POELIS_ORG_ID=
|
|
81
|
-
# POELIS_BASE_URL is optional - defaults to
|
|
75
|
+
export POELIS_ORG_ID=tenant_id_001
|
|
76
|
+
# POELIS_BASE_URL is optional - defaults to the managed GCP endpoint
|
|
82
77
|
```
|
|
83
78
|
|
|
84
79
|
|
|
@@ -91,8 +86,7 @@ client.browser # then use TAB to explore
|
|
|
91
86
|
# client.browser.<workspace>.<product>.<item>.<child>.properties
|
|
92
87
|
```
|
|
93
88
|
|
|
94
|
-
|
|
95
|
-
- Autocomplete-friendly in Jupyter/VSCode.
|
|
89
|
+
See the example notebook in `notebooks/try_poelis_sdk.ipynb` for an end-to-end walkthrough (authentication, listing workspaces/products/items, and simple search queries).
|
|
96
90
|
|
|
97
91
|
## Requirements
|
|
98
92
|
|
|
@@ -101,4 +95,4 @@ client.browser # then use TAB to explore
|
|
|
101
95
|
|
|
102
96
|
## License
|
|
103
97
|
|
|
104
|
-
|
|
98
|
+
MIT
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Poelis Python SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Python SDK for Poelis.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install -U poelis-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires Python 3.11+.
|
|
4
12
|
|
|
5
13
|
## Quickstart (API key + org ID)
|
|
6
14
|
|
|
@@ -10,40 +18,27 @@ from poelis_sdk import PoelisClient
|
|
|
10
18
|
client = PoelisClient(
|
|
11
19
|
api_key="poelis_live_A1B2C3...", # Organization Settings → API Keys
|
|
12
20
|
org_id="tenant_uci_001", # same section
|
|
13
|
-
# base_url defaults to https://api.poelis.ai
|
|
14
21
|
)
|
|
15
22
|
|
|
16
|
-
# Workspaces → Products
|
|
23
|
+
# Workspaces → Products
|
|
17
24
|
workspaces = client.workspaces.list(limit=10, offset=0)
|
|
18
25
|
ws_id = workspaces[0]["id"]
|
|
19
26
|
|
|
20
27
|
page = client.products.list_by_workspace(workspace_id=ws_id, limit=10, offset=0)
|
|
21
28
|
print([p.name for p in page.data])
|
|
22
29
|
|
|
23
|
-
# Items for a product
|
|
30
|
+
# Items for a product
|
|
24
31
|
pid = page.data[0].id
|
|
25
32
|
items = client.items.list_by_product(product_id=pid, limit=10, offset=0)
|
|
26
33
|
print([i.get("name") for i in items])
|
|
27
34
|
|
|
28
|
-
# Property search
|
|
35
|
+
# Property search
|
|
29
36
|
props = client.search.properties(q="*", workspace_id=ws_id, limit=10, offset=0)
|
|
30
37
|
print(props["total"], len(props["hits"]))
|
|
31
38
|
```
|
|
32
39
|
|
|
33
40
|
## Configuration
|
|
34
41
|
|
|
35
|
-
### Base URL
|
|
36
|
-
|
|
37
|
-
The SDK defaults to the production API (`https://api.poelis.ai`). You can override this for different environments:
|
|
38
|
-
|
|
39
|
-
- Local development: `base_url="http://localhost:8000"`
|
|
40
|
-
- Staging (example): `base_url="https://api.staging.poelis.ai"`
|
|
41
|
-
- Production (default): No need to specify, uses `https://api.poelis.ai`
|
|
42
|
-
|
|
43
|
-
Confirm the exact URLs for your environments.
|
|
44
|
-
|
|
45
|
-
Note: Multi-tenancy uses `org_id` for scoping. When using API keys, the SDK sets `X-Poelis-Org` automatically from `org_id`.
|
|
46
|
-
|
|
47
42
|
### Getting your API key and org ID
|
|
48
43
|
|
|
49
44
|
1. Navigate to Organization Settings → API Keys.
|
|
@@ -54,8 +49,8 @@ Note: Multi-tenancy uses `org_id` for scoping. When using API keys, the SDK sets
|
|
|
54
49
|
|
|
55
50
|
```bash
|
|
56
51
|
export POELIS_API_KEY=poelis_live_A1B2C3...
|
|
57
|
-
export POELIS_ORG_ID=
|
|
58
|
-
# POELIS_BASE_URL is optional - defaults to
|
|
52
|
+
export POELIS_ORG_ID=tenant_id_001
|
|
53
|
+
# POELIS_BASE_URL is optional - defaults to the managed GCP endpoint
|
|
59
54
|
```
|
|
60
55
|
|
|
61
56
|
|
|
@@ -68,8 +63,7 @@ client.browser # then use TAB to explore
|
|
|
68
63
|
# client.browser.<workspace>.<product>.<item>.<child>.properties
|
|
69
64
|
```
|
|
70
65
|
|
|
71
|
-
|
|
72
|
-
- Autocomplete-friendly in Jupyter/VSCode.
|
|
66
|
+
See the example notebook in `notebooks/try_poelis_sdk.ipynb` for an end-to-end walkthrough (authentication, listing workspaces/products/items, and simple search queries).
|
|
73
67
|
|
|
74
68
|
## Requirements
|
|
75
69
|
|
|
@@ -78,4 +72,4 @@ client.browser # then use TAB to explore
|
|
|
78
72
|
|
|
79
73
|
## License
|
|
80
74
|
|
|
81
|
-
|
|
75
|
+
MIT
|