poelis-sdk 0.3.5__py3-none-any.whl → 0.3.6__py3-none-any.whl

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.

@@ -0,0 +1,121 @@
1
+ Metadata-Version: 2.4
2
+ Name: poelis-sdk
3
+ Version: 0.3.6
4
+ Summary: Official Python SDK for Poelis
5
+ Project-URL: Homepage, https://poelis.com
6
+ Project-URL: Source, https://github.com/PoelisTechnologies/poelis-python-sdk
7
+ Project-URL: Issues, https://github.com/PoelisTechnologies/poelis-python-sdk/issues
8
+ Author-email: Matteo Braceschi <matteo@poelis.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: api,client,poelis,sdk
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Topic :: Software Development :: Libraries
17
+ Requires-Python: >=3.11
18
+ Requires-Dist: build>=1.3.0
19
+ Requires-Dist: httpx>=0.27
20
+ Requires-Dist: pydantic>=2.7
21
+ Requires-Dist: twine>=6.2.0
22
+ Description-Content-Type: text/markdown
23
+
24
+ # Poelis Python SDK
25
+
26
+ Python SDK for Poelis - explore your data with simple dot notation.
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ pip install -U poelis-sdk
32
+ ```
33
+
34
+ Requires Python 3.11+.
35
+
36
+ ## Quick Start
37
+
38
+ ```python
39
+ from poelis_sdk import PoelisClient
40
+
41
+ # Create client
42
+ poelis = PoelisClient(
43
+ api_key="poelis_live_A1B2C3...", # Get from Organization Settings → API Keys
44
+ org_id="tenant_uci_001", # Same section
45
+ )
46
+
47
+ # Use the browser for easy exploration
48
+ poelis = poelis.browser # Now you can use dot notation!
49
+
50
+ # Explore your data
51
+ poelis.workspace_name.product_name.item_name
52
+ ```
53
+
54
+ ## Getting Your Credentials
55
+
56
+ 1. Go to **Organization Settings → API Keys**
57
+ 2. Click **"Create API key"** (read-only recommended)
58
+ 3. Copy the key (shown only once) and your `org_id`
59
+ 4. Store securely as environment variables:
60
+
61
+ ```bash
62
+ export POELIS_API_KEY=poelis_live_A1B2C3...
63
+ export POELIS_ORG_ID=tenant_uci_001
64
+ ```
65
+
66
+ ## Browser Usage
67
+
68
+ The browser lets you navigate your Poelis data with simple dot notation:
69
+
70
+ ```python
71
+ # Navigate through your data
72
+ poelis = poelis.browser
73
+
74
+ # List workspaces
75
+ poelis.names() # ['workspace1', 'workspace2', ...]
76
+
77
+ # Access workspace
78
+ ws = poelis.workspace1
79
+
80
+ # List products in workspace
81
+ ws.names() # ['product1', 'product2', ...]
82
+
83
+ # Access product
84
+ product = ws.product1
85
+
86
+ # List items in product
87
+ product.names() # ['item1', 'item2', ...]
88
+
89
+ # Access item and its properties
90
+ item = product.item1
91
+ item_value = item.some_property.value # Access property values directly
92
+ item_category = item.some_property.category # Access property categories directly
93
+
94
+ ```
95
+
96
+ ## IDE Compatibility & Autocomplete
97
+
98
+ The Poelis SDK works in all Python environments, but autocomplete behavior varies by IDE:
99
+
100
+ ### ✅ VS Code (Recommended for Notebooks)
101
+ - **Autocomplete**: Works perfectly with dynamic attributes
102
+ - **Setup**: No configuration needed
103
+ - **Experience**: Full autocomplete at all levels
104
+
105
+ ### ⚠️ PyCharm (Jupyter Notebooks)
106
+ - **Autocomplete**: Limited - PyCharm uses static analysis and doesn't see dynamic attributes
107
+ - **Code execution**: Works perfectly (attributes are real and functional)
108
+ - **Workaround**: Call `names()` at each level to prime autocomplete
109
+
110
+ ## Examples
111
+
112
+ See `notebooks/try_poelis_sdk.ipynb` for complete examples including authentication, data exploration, and search queries.
113
+
114
+ ## Requirements
115
+
116
+ - Python >= 3.11
117
+ - API base URL reachable from your environment
118
+
119
+ ## License
120
+
121
+ MIT
@@ -10,7 +10,7 @@ poelis_sdk/org_validation.py,sha256=c4fB6ySTvcovWxG4F1wU_OBlP-FyuIaAUzCwqgJKzBE,
10
10
  poelis_sdk/products.py,sha256=wmh0Jh1_k9SNN_w2M_dMy1cpu56LGesAFKF99kOIuNU,3240
11
11
  poelis_sdk/search.py,sha256=3DqFd7ilTpizjOYgWplR7MTslnY89Q8AmUfn865TnKc,4113
12
12
  poelis_sdk/workspaces.py,sha256=_6cic97ByvNckmbaaTUS-5QpgvQcZZfBY-wMwsuTTxU,2383
13
- poelis_sdk-0.3.5.dist-info/METADATA,sha256=e8OaUspKDtJ6GAkRUXeAeRdgo0-qvLv6-hVbKNnoZlQ,2968
14
- poelis_sdk-0.3.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
- poelis_sdk-0.3.5.dist-info/licenses/LICENSE,sha256=EEmE_r8wk_pdXB8CWp1LG6sBOl7--hNSS2kV94cI6co,1075
16
- poelis_sdk-0.3.5.dist-info/RECORD,,
13
+ poelis_sdk-0.3.6.dist-info/METADATA,sha256=ke2cZa5Dm3Xy9zcRvE_mDnMrR_l3-VAgtB6mfvY9vWw,3259
14
+ poelis_sdk-0.3.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
+ poelis_sdk-0.3.6.dist-info/licenses/LICENSE,sha256=EEmE_r8wk_pdXB8CWp1LG6sBOl7--hNSS2kV94cI6co,1075
16
+ poelis_sdk-0.3.6.dist-info/RECORD,,
@@ -1,99 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: poelis-sdk
3
- Version: 0.3.5
4
- Summary: Official Python SDK for Poelis
5
- Project-URL: Homepage, https://poelis.com
6
- Project-URL: Source, https://github.com/PoelisTechnologies/poelis-python-sdk
7
- Project-URL: Issues, https://github.com/PoelisTechnologies/poelis-python-sdk/issues
8
- Author-email: Matteo Braceschi <matteo@poelis.com>
9
- License-Expression: MIT
10
- License-File: LICENSE
11
- Keywords: api,client,poelis,sdk
12
- Classifier: Intended Audience :: Developers
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Topic :: Software Development :: Libraries
17
- Requires-Python: >=3.11
18
- Requires-Dist: build>=1.3.0
19
- Requires-Dist: httpx>=0.27
20
- Requires-Dist: pydantic>=2.7
21
- Requires-Dist: twine>=6.2.0
22
- Description-Content-Type: text/markdown
23
-
24
- # Poelis Python SDK
25
-
26
- Python SDK for Poelis.
27
-
28
- ## Installation
29
-
30
- ```bash
31
- pip install -U poelis-sdk
32
- ```
33
-
34
- Requires Python 3.11+.
35
-
36
- ## Quickstart (API key + org ID)
37
-
38
- ```python
39
- from poelis_sdk import PoelisClient
40
-
41
- client = PoelisClient(
42
- api_key="poelis_live_A1B2C3...", # Organization Settings → API Keys
43
- org_id="tenant_uci_001", # same section
44
- )
45
- ```
46
-
47
- ## Configuration
48
-
49
- ### Getting your API key and org ID
50
-
51
- 1. Navigate to Organization Settings → API Keys.
52
- 2. Click “Create API key”, choose a name and scopes (read-only by default recommended).
53
- 3. Copy the full key when shown (it will be visible only once). Keep it secret.
54
- 4. The `org_id` for your organization is displayed in the same section.
55
- 5. You can rotate or revoke keys anytime. Prefer storing as env vars:
56
-
57
- ```bash
58
- export POELIS_API_KEY=poelis_live_A1B2C3...
59
- export POELIS_ORG_ID=tenant_id_001
60
- ```
61
-
62
-
63
- ### How authentication works
64
-
65
- The SDK does not talk to Auth0. It sends your API key directly to the Poelis backend for validation on every request.
66
-
67
- - Default headers sent by the SDK:
68
-
69
- - `X-API-Key: <api_key>` (and `X-Poelis-Api-Key` as a compatibility alias)
70
- - `Authorization: Api-Key <api_key>` (compatibility for gateways expecting Authorization-only)
71
- - `X-Poelis-Org: <org_id>`
72
-
73
- You can opt into Bearer mode (legacy) by setting `POELIS_AUTH_MODE=bearer`, which will send:
74
-
75
- - `Authorization: Bearer <api_key>`
76
- - `X-Poelis-Org: <org_id>`
77
-
78
- The backend validates the API key against your organization, applies authorization and filtering, and returns data.
79
-
80
-
81
- ## Dot-path browser (Notebook UX)
82
-
83
- The SDK exposes a dot-path browser for easy exploration:
84
-
85
- ```python
86
- client.browser # then use TAB to explore
87
- # client.browser.<workspace>.<product>.<item>.<child>.properties
88
- ```
89
-
90
- 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). The client defaults to `https://api.poelis.ai` unless `POELIS_BASE_URL` is set.
91
-
92
- ## Requirements
93
-
94
- - Python >= 3.11
95
- - API base URL reachable from your environment
96
-
97
- ## License
98
-
99
- MIT