poelis-sdk 0.5.4__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.
- poelis_sdk/__init__.py +30 -0
- poelis_sdk/_transport.py +147 -0
- poelis_sdk/browser.py +1998 -0
- poelis_sdk/change_tracker.py +769 -0
- poelis_sdk/client.py +204 -0
- poelis_sdk/exceptions.py +44 -0
- poelis_sdk/items.py +121 -0
- poelis_sdk/logging.py +73 -0
- poelis_sdk/models.py +183 -0
- poelis_sdk/org_validation.py +163 -0
- poelis_sdk/products.py +167 -0
- poelis_sdk/search.py +88 -0
- poelis_sdk/versions.py +123 -0
- poelis_sdk/workspaces.py +50 -0
- poelis_sdk-0.5.4.dist-info/METADATA +113 -0
- poelis_sdk-0.5.4.dist-info/RECORD +18 -0
- poelis_sdk-0.5.4.dist-info/WHEEL +4 -0
- poelis_sdk-0.5.4.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: poelis-sdk
|
|
3
|
+
Version: 0.5.4
|
|
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
|
+
## IDE Compatibility & Autocomplete
|
|
29
|
+
|
|
30
|
+
The Poelis SDK works in all Python environments, but autocomplete behavior varies by IDE:
|
|
31
|
+
|
|
32
|
+
### ✅ VS Code (Recommended for Notebooks)
|
|
33
|
+
- **Autocomplete**: Works perfectly with dynamic attributes
|
|
34
|
+
- **Setup**: No configuration needed
|
|
35
|
+
- **Experience**: Full autocomplete at all levels
|
|
36
|
+
|
|
37
|
+
### ⚠️ PyCharm (Jupyter Notebooks)
|
|
38
|
+
- **Autocomplete**: Limited - PyCharm uses static analysis and doesn't see dynamic attributes
|
|
39
|
+
- **Code execution**: Works perfectly (attributes are real and functional)
|
|
40
|
+
- **Workaround**: Call the relevant `list_*().names` at each level to prime autocomplete
|
|
41
|
+
|
|
42
|
+
## Examples
|
|
43
|
+
|
|
44
|
+
See `notebooks/try_poelis_sdk.ipynb` for complete examples including authentication, data exploration, and search queries.
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
- Python >= 3.11
|
|
49
|
+
- API base URL reachable from your environment
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install -U poelis-sdk
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
1. Go to **Organization Settings → API Keys**
|
|
58
|
+
2. Click **\"Create API key\"**
|
|
59
|
+
3. Copy the key (shown only once) and store it securely, for example as an environment variable:
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from poelis_sdk import PoelisClient
|
|
63
|
+
|
|
64
|
+
# Create client
|
|
65
|
+
poelis_client = PoelisClient(
|
|
66
|
+
api_key="poelis_live_A1B2C3...", # Get from Organization Settings → API Keys
|
|
67
|
+
)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Browser Usage
|
|
71
|
+
|
|
72
|
+
The browser lets you navigate your Poelis data with simple dot notation:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
# Navigate through your data
|
|
76
|
+
poelis = poelis_client.browser
|
|
77
|
+
|
|
78
|
+
# List workspaces
|
|
79
|
+
poelis.list_workspaces().names # ['workspace1', 'workspace2', ...]
|
|
80
|
+
|
|
81
|
+
# Access workspace
|
|
82
|
+
ws = poelis.workspace1
|
|
83
|
+
|
|
84
|
+
# List products in workspace
|
|
85
|
+
ws.list_products().names # ['product1', 'product2', ...]
|
|
86
|
+
|
|
87
|
+
# Access product
|
|
88
|
+
product = ws.product1
|
|
89
|
+
|
|
90
|
+
# List items in product
|
|
91
|
+
product.list_items().names # ['item1', 'item2', ...]
|
|
92
|
+
|
|
93
|
+
# Access item and its properties
|
|
94
|
+
item = product.item1
|
|
95
|
+
|
|
96
|
+
# List children by type for more control
|
|
97
|
+
item.list_items().names # ['child_item1', 'child_item2'] - only child items
|
|
98
|
+
item.list_properties().names # ['Color', 'Weight', ...] - only properties
|
|
99
|
+
|
|
100
|
+
# Access property values directly
|
|
101
|
+
item_value = item.some_property.value # Access property values directly
|
|
102
|
+
item_category = item.some_property.category # Access property categories directly
|
|
103
|
+
item_unit = item.some_property.unit # Access property units directly
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Property Change Detection
|
|
107
|
+
|
|
108
|
+
The SDK can automatically warn you when property values change between script/notebook runs. This is useful when you're using property values for calculations and want to be notified if a colleague changes them in the webapp.
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
MIT
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
poelis_sdk/__init__.py,sha256=7nLSHnIDePEtOM3-QFIvcahcbqXmemtctMuOWcKp-zo,924
|
|
2
|
+
poelis_sdk/_transport.py,sha256=IW4A6ix24mmy7AMjhiGInzsK0DIuz1RmUNTB6MRQolA,5818
|
|
3
|
+
poelis_sdk/browser.py,sha256=ieo5I0GPKJb_gOenelL2h2A5YTV03rk0jhsqWmhPwQ0,94681
|
|
4
|
+
poelis_sdk/change_tracker.py,sha256=4d2LyTVAmF9W6eWUMtsZEPgIB-cixbJ98n2jW5TwTio,32726
|
|
5
|
+
poelis_sdk/client.py,sha256=DsiwIVG3l6kHTCg11cvBOuMsug8ZUmFXfzSq5TfFaUE,7302
|
|
6
|
+
poelis_sdk/exceptions.py,sha256=qX5kpAr8ozJUOW-CNhmspWVIE-bvUZT_PUnimYuBxNY,1101
|
|
7
|
+
poelis_sdk/items.py,sha256=LR5InWLZFvWuTN2iWH-sRYc37vXJXv31M1NVFSTVFLM,4219
|
|
8
|
+
poelis_sdk/logging.py,sha256=zmg8Us-7qjDl0n_NfOSvDolLopy7Dc_hQ-pcrC63dY8,2442
|
|
9
|
+
poelis_sdk/models.py,sha256=ohQvimy2UzcIl8ZW42mCvIm0vw2kqn6liT3nLV1FT94,6871
|
|
10
|
+
poelis_sdk/org_validation.py,sha256=YWqw0Fyf_U7gJljvbxjnVcOo-hdhSNlG-_OSG00-6aA,6002
|
|
11
|
+
poelis_sdk/products.py,sha256=kaVQGR4HLodojqNSlOEqdGiqT-7IkQ4PeALwfjza2fo,6391
|
|
12
|
+
poelis_sdk/search.py,sha256=hQcQg2bJkv8TDk1zd2E1F6sa-QIGpNpRPno2Le6ZZWM,4079
|
|
13
|
+
poelis_sdk/versions.py,sha256=RpfsOIrQHQSMctIMacFID65ogIAOj-BLpoV3O21JCXE,3814
|
|
14
|
+
poelis_sdk/workspaces.py,sha256=fIxr3OXe0xfqqbMJTJgZne0JUx6HAcHJ8BJ4DUKfzd4,1594
|
|
15
|
+
poelis_sdk-0.5.4.dist-info/METADATA,sha256=gEn6OsKRqAe6EjynBgJTN_24GIx3FhSjBFzHkrpykL4,3493
|
|
16
|
+
poelis_sdk-0.5.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
17
|
+
poelis_sdk-0.5.4.dist-info/licenses/LICENSE,sha256=EEmE_r8wk_pdXB8CWp1LG6sBOl7--hNSS2kV94cI6co,1075
|
|
18
|
+
poelis_sdk-0.5.4.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 PoelisTechnologies
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|