poelis-sdk 0.4.2__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.
- poelis_sdk-0.4.2/.github/workflows/ci.yml +51 -0
- poelis_sdk-0.4.2/.github/workflows/codeql.yml +39 -0
- poelis_sdk-0.4.2/.github/workflows/publish-on-push.yml +87 -0
- poelis_sdk-0.4.2/.gitignore +216 -0
- poelis_sdk-0.4.2/LICENSE +21 -0
- poelis_sdk-0.4.2/PKG-INFO +128 -0
- poelis_sdk-0.4.2/README.md +105 -0
- poelis_sdk-0.4.2/notebooks/try_poelis_sdk.ipynb +614 -0
- poelis_sdk-0.4.2/pyproject.toml +58 -0
- poelis_sdk-0.4.2/src/poelis_sdk/__init__.py +30 -0
- poelis_sdk-0.4.2/src/poelis_sdk/_transport.py +168 -0
- poelis_sdk-0.4.2/src/poelis_sdk/browser.py +1404 -0
- poelis_sdk-0.4.2/src/poelis_sdk/client.py +123 -0
- poelis_sdk-0.4.2/src/poelis_sdk/exceptions.py +44 -0
- poelis_sdk-0.4.2/src/poelis_sdk/items.py +121 -0
- poelis_sdk-0.4.2/src/poelis_sdk/logging.py +73 -0
- poelis_sdk-0.4.2/src/poelis_sdk/models.py +179 -0
- poelis_sdk-0.4.2/src/poelis_sdk/org_validation.py +157 -0
- poelis_sdk-0.4.2/src/poelis_sdk/products.py +120 -0
- poelis_sdk-0.4.2/src/poelis_sdk/search.py +88 -0
- poelis_sdk-0.4.2/src/poelis_sdk/versions.py +123 -0
- poelis_sdk-0.4.2/src/poelis_sdk/workspaces.py +69 -0
- poelis_sdk-0.4.2/src/tests/test_client_basic.py +93 -0
- poelis_sdk-0.4.2/src/tests/test_errors_and_backoff.py +81 -0
- poelis_sdk-0.4.2/src/tests/test_items_client.py +70 -0
- poelis_sdk-0.4.2/src/tests/test_search_client.py +47 -0
- poelis_sdk-0.4.2/src/tests/test_transport_and_products.py +82 -0
- poelis_sdk-0.4.2/tests/__init__.py +2 -0
- poelis_sdk-0.4.2/tests/test_browser_navigation.py +496 -0
- poelis_sdk-0.4.2/tests/test_integration_smoke.py +28 -0
- poelis_sdk-0.4.2/tests/test_typed_properties.py +258 -0
- poelis_sdk-0.4.2/uv.lock +949 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, develop ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v4
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@v3
|
|
26
|
+
with:
|
|
27
|
+
version: "latest"
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: |
|
|
31
|
+
uv sync --dev
|
|
32
|
+
|
|
33
|
+
- name: Run linting with Ruff
|
|
34
|
+
run: |
|
|
35
|
+
uv run ruff check .
|
|
36
|
+
|
|
37
|
+
- name: Run import sort fix (I001) and type checks
|
|
38
|
+
run: |
|
|
39
|
+
uv run ruff check --select I --fix .
|
|
40
|
+
|
|
41
|
+
- name: Run tests with pytest (temporarily allow failures)
|
|
42
|
+
run: |
|
|
43
|
+
uv run pytest src/tests tests --maxfail=1 --disable-warnings --cov=src/poelis_sdk --cov-report=xml --cov-report=term --cov-fail-under=0 || true
|
|
44
|
+
|
|
45
|
+
- name: Upload coverage to Codecov
|
|
46
|
+
uses: codecov/codecov-action@v3
|
|
47
|
+
with:
|
|
48
|
+
file: ./coverage.xml
|
|
49
|
+
flags: unittests
|
|
50
|
+
name: codecov-umbrella
|
|
51
|
+
fail_ci_if_error: false
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, develop ]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: '0 2 * * 1'
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
analyze:
|
|
13
|
+
name: Analyze
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
actions: read
|
|
17
|
+
contents: read
|
|
18
|
+
security-events: write
|
|
19
|
+
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
language: [ 'python' ]
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout repository
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
|
|
29
|
+
- name: Initialize CodeQL
|
|
30
|
+
uses: github/codeql-action/init@v3
|
|
31
|
+
with:
|
|
32
|
+
languages: ${{ matrix.language }}
|
|
33
|
+
|
|
34
|
+
- name: Autobuild
|
|
35
|
+
uses: github/codeql-action/autobuild@v3
|
|
36
|
+
|
|
37
|
+
- name: Perform CodeQL Analysis
|
|
38
|
+
uses: github/codeql-action/analyze@v3
|
|
39
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: Publish on version bump
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
paths:
|
|
7
|
+
- 'pyproject.toml'
|
|
8
|
+
workflow_dispatch: {}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build-and-publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.12'
|
|
26
|
+
|
|
27
|
+
- name: Install uv
|
|
28
|
+
uses: astral-sh/setup-uv@v3
|
|
29
|
+
with:
|
|
30
|
+
version: 'latest'
|
|
31
|
+
|
|
32
|
+
- name: Extract version
|
|
33
|
+
id: v
|
|
34
|
+
run: |
|
|
35
|
+
VER=$(python -c "import tomllib;print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
|
36
|
+
echo "version=$VER" >> $GITHUB_OUTPUT
|
|
37
|
+
|
|
38
|
+
- name: Check if tag exists
|
|
39
|
+
id: tag
|
|
40
|
+
run: |
|
|
41
|
+
if git rev-parse --verify --quiet refs/tags/v${{ steps.v.outputs.version }}; then
|
|
42
|
+
echo "exists=true" >> $GITHUB_OUTPUT
|
|
43
|
+
else
|
|
44
|
+
echo "exists=false" >> $GITHUB_OUTPUT
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
- name: Create tag
|
|
48
|
+
if: steps.tag.outputs.exists == 'false'
|
|
49
|
+
run: |
|
|
50
|
+
git config user.name "github-actions"
|
|
51
|
+
git config user.email "github-actions@users.noreply.github.com"
|
|
52
|
+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
|
53
|
+
git tag v${{ steps.v.outputs.version }}
|
|
54
|
+
git push origin v${{ steps.v.outputs.version }}
|
|
55
|
+
|
|
56
|
+
- name: Install build tooling
|
|
57
|
+
run: |
|
|
58
|
+
uv sync --dev
|
|
59
|
+
|
|
60
|
+
- name: Build sdist and wheel
|
|
61
|
+
run: |
|
|
62
|
+
uv run python -m build
|
|
63
|
+
|
|
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/*
|
|
87
|
+
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.DS_Store
|
|
6
|
+
|
|
7
|
+
# C extensions
|
|
8
|
+
*.so
|
|
9
|
+
|
|
10
|
+
# Distribution / packaging
|
|
11
|
+
.Python
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py.cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
#Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# UV
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
#uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
#poetry.lock
|
|
110
|
+
#poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
#pdm.lock
|
|
117
|
+
#pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
#pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi
|
|
127
|
+
|
|
128
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
129
|
+
__pypackages__/
|
|
130
|
+
|
|
131
|
+
# Celery stuff
|
|
132
|
+
celerybeat-schedule
|
|
133
|
+
celerybeat.pid
|
|
134
|
+
|
|
135
|
+
# SageMath parsed files
|
|
136
|
+
*.sage.py
|
|
137
|
+
|
|
138
|
+
# Environments
|
|
139
|
+
.env
|
|
140
|
+
.envrc
|
|
141
|
+
.venv
|
|
142
|
+
env/
|
|
143
|
+
venv/
|
|
144
|
+
ENV/
|
|
145
|
+
env.bak/
|
|
146
|
+
venv.bak/
|
|
147
|
+
|
|
148
|
+
# Spyder project settings
|
|
149
|
+
.spyderproject
|
|
150
|
+
.spyproject
|
|
151
|
+
|
|
152
|
+
# Rope project settings
|
|
153
|
+
.ropeproject
|
|
154
|
+
|
|
155
|
+
# mkdocs documentation
|
|
156
|
+
/site
|
|
157
|
+
|
|
158
|
+
# mypy
|
|
159
|
+
.mypy_cache/
|
|
160
|
+
.dmypy.json
|
|
161
|
+
dmypy.json
|
|
162
|
+
|
|
163
|
+
# Pyre type checker
|
|
164
|
+
.pyre/
|
|
165
|
+
|
|
166
|
+
# pytype static type analyzer
|
|
167
|
+
.pytype/
|
|
168
|
+
|
|
169
|
+
# Cython debug symbols
|
|
170
|
+
cython_debug/
|
|
171
|
+
|
|
172
|
+
# PyCharm
|
|
173
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
174
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
175
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
176
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
177
|
+
#.idea/
|
|
178
|
+
|
|
179
|
+
# Abstra
|
|
180
|
+
# Abstra is an AI-powered process automation framework.
|
|
181
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
182
|
+
# Learn more at https://abstra.io/docs
|
|
183
|
+
.abstra/
|
|
184
|
+
|
|
185
|
+
# Visual Studio Code
|
|
186
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
187
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
188
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
189
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
190
|
+
# .vscode/
|
|
191
|
+
|
|
192
|
+
# Ruff stuff:
|
|
193
|
+
.ruff_cache/
|
|
194
|
+
|
|
195
|
+
# PyPI configuration file
|
|
196
|
+
.pypirc
|
|
197
|
+
|
|
198
|
+
# Cursor
|
|
199
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
200
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
201
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
202
|
+
.cursorignore
|
|
203
|
+
.cursorindexingignore
|
|
204
|
+
|
|
205
|
+
# Marimo
|
|
206
|
+
marimo/_static/
|
|
207
|
+
marimo/_lsp/
|
|
208
|
+
__marimo__/
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
# Others
|
|
212
|
+
.cursor/
|
|
213
|
+
# Allow GitHub workflows
|
|
214
|
+
!/.github/
|
|
215
|
+
!/.github/workflows/
|
|
216
|
+
!/.github/workflows/*.yml
|
poelis_sdk-0.4.2/LICENSE
ADDED
|
@@ -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.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: poelis-sdk
|
|
3
|
+
Version: 0.4.2
|
|
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.list_workspaces().names # ['workspace1', 'workspace2', ...]
|
|
76
|
+
|
|
77
|
+
# Access workspace
|
|
78
|
+
ws = poelis.workspace1
|
|
79
|
+
|
|
80
|
+
# List products in workspace
|
|
81
|
+
ws.list_products().names # ['product1', 'product2', ...]
|
|
82
|
+
|
|
83
|
+
# Access product
|
|
84
|
+
product = ws.product1
|
|
85
|
+
|
|
86
|
+
# List items in product
|
|
87
|
+
product.list_items().names # ['item1', 'item2', ...]
|
|
88
|
+
|
|
89
|
+
# Access item and its properties
|
|
90
|
+
item = product.item1
|
|
91
|
+
|
|
92
|
+
# List children by type for more control
|
|
93
|
+
item.list_items().names # ['child_item1', 'child_item2'] - only child items
|
|
94
|
+
item.list_properties().names # ['Color', 'Weight', ...] - only properties
|
|
95
|
+
|
|
96
|
+
# Access property values directly
|
|
97
|
+
item_value = item.some_property.value # Access property values directly
|
|
98
|
+
item_category = item.some_property.category # Access property categories directly
|
|
99
|
+
item_unit = item.some_property.unit # Access property units directly
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## IDE Compatibility & Autocomplete
|
|
104
|
+
|
|
105
|
+
The Poelis SDK works in all Python environments, but autocomplete behavior varies by IDE:
|
|
106
|
+
|
|
107
|
+
### ✅ VS Code (Recommended for Notebooks)
|
|
108
|
+
- **Autocomplete**: Works perfectly with dynamic attributes
|
|
109
|
+
- **Setup**: No configuration needed
|
|
110
|
+
- **Experience**: Full autocomplete at all levels
|
|
111
|
+
|
|
112
|
+
### ⚠️ PyCharm (Jupyter Notebooks)
|
|
113
|
+
- **Autocomplete**: Limited - PyCharm uses static analysis and doesn't see dynamic attributes
|
|
114
|
+
- **Code execution**: Works perfectly (attributes are real and functional)
|
|
115
|
+
- **Workaround**: Call the relevant `list_*().names` at each level to prime autocomplete
|
|
116
|
+
|
|
117
|
+
## Examples
|
|
118
|
+
|
|
119
|
+
See `notebooks/try_poelis_sdk.ipynb` for complete examples including authentication, data exploration, and search queries.
|
|
120
|
+
|
|
121
|
+
## Requirements
|
|
122
|
+
|
|
123
|
+
- Python >= 3.11
|
|
124
|
+
- API base URL reachable from your environment
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
MIT
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Poelis Python SDK
|
|
2
|
+
|
|
3
|
+
Python SDK for Poelis - explore your data with simple dot notation.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install -U poelis-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires Python 3.11+.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from poelis_sdk import PoelisClient
|
|
17
|
+
|
|
18
|
+
# Create client
|
|
19
|
+
poelis = PoelisClient(
|
|
20
|
+
api_key="poelis_live_A1B2C3...", # Get from Organization Settings → API Keys
|
|
21
|
+
org_id="tenant_uci_001", # Same section
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
# Use the browser for easy exploration
|
|
25
|
+
poelis = poelis.browser # Now you can use dot notation!
|
|
26
|
+
|
|
27
|
+
# Explore your data
|
|
28
|
+
poelis.workspace_name.product_name.item_name
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Getting Your Credentials
|
|
32
|
+
|
|
33
|
+
1. Go to **Organization Settings → API Keys**
|
|
34
|
+
2. Click **"Create API key"** (read-only recommended)
|
|
35
|
+
3. Copy the key (shown only once) and your `org_id`
|
|
36
|
+
4. Store securely as environment variables:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
export POELIS_API_KEY=poelis_live_A1B2C3...
|
|
40
|
+
export POELIS_ORG_ID=tenant_uci_001
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Browser Usage
|
|
44
|
+
|
|
45
|
+
The browser lets you navigate your Poelis data with simple dot notation:
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
# Navigate through your data
|
|
49
|
+
poelis = poelis.browser
|
|
50
|
+
|
|
51
|
+
# List workspaces
|
|
52
|
+
poelis.list_workspaces().names # ['workspace1', 'workspace2', ...]
|
|
53
|
+
|
|
54
|
+
# Access workspace
|
|
55
|
+
ws = poelis.workspace1
|
|
56
|
+
|
|
57
|
+
# List products in workspace
|
|
58
|
+
ws.list_products().names # ['product1', 'product2', ...]
|
|
59
|
+
|
|
60
|
+
# Access product
|
|
61
|
+
product = ws.product1
|
|
62
|
+
|
|
63
|
+
# List items in product
|
|
64
|
+
product.list_items().names # ['item1', 'item2', ...]
|
|
65
|
+
|
|
66
|
+
# Access item and its properties
|
|
67
|
+
item = product.item1
|
|
68
|
+
|
|
69
|
+
# List children by type for more control
|
|
70
|
+
item.list_items().names # ['child_item1', 'child_item2'] - only child items
|
|
71
|
+
item.list_properties().names # ['Color', 'Weight', ...] - only properties
|
|
72
|
+
|
|
73
|
+
# Access property values directly
|
|
74
|
+
item_value = item.some_property.value # Access property values directly
|
|
75
|
+
item_category = item.some_property.category # Access property categories directly
|
|
76
|
+
item_unit = item.some_property.unit # Access property units directly
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## IDE Compatibility & Autocomplete
|
|
81
|
+
|
|
82
|
+
The Poelis SDK works in all Python environments, but autocomplete behavior varies by IDE:
|
|
83
|
+
|
|
84
|
+
### ✅ VS Code (Recommended for Notebooks)
|
|
85
|
+
- **Autocomplete**: Works perfectly with dynamic attributes
|
|
86
|
+
- **Setup**: No configuration needed
|
|
87
|
+
- **Experience**: Full autocomplete at all levels
|
|
88
|
+
|
|
89
|
+
### ⚠️ PyCharm (Jupyter Notebooks)
|
|
90
|
+
- **Autocomplete**: Limited - PyCharm uses static analysis and doesn't see dynamic attributes
|
|
91
|
+
- **Code execution**: Works perfectly (attributes are real and functional)
|
|
92
|
+
- **Workaround**: Call the relevant `list_*().names` at each level to prime autocomplete
|
|
93
|
+
|
|
94
|
+
## Examples
|
|
95
|
+
|
|
96
|
+
See `notebooks/try_poelis_sdk.ipynb` for complete examples including authentication, data exploration, and search queries.
|
|
97
|
+
|
|
98
|
+
## Requirements
|
|
99
|
+
|
|
100
|
+
- Python >= 3.11
|
|
101
|
+
- API base URL reachable from your environment
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
MIT
|