Skip to main content

Official Python SDK for Poelis

Project description

Poelis Python SDK

Python SDK for Poelis - explore your data with simple dot notation.

IDE Compatibility & Autocomplete

The Poelis SDK works in all Python environments, but autocomplete behavior varies by IDE:

✅ VS Code (Recommended for Notebooks)

  • Autocomplete: Works perfectly with dynamic attributes
  • Setup: No configuration needed
  • Experience: Full autocomplete at all levels

⚠️ PyCharm (Jupyter Notebooks)

  • Autocomplete: Limited - PyCharm uses static analysis and doesn't see dynamic attributes
  • Code execution: Works perfectly (attributes are real and functional)
  • Workaround: Call the relevant list_*().names at each level to prime autocomplete

Examples

See notebooks/try_poelis_sdk.ipynb for complete examples including authentication, data exploration, and search queries.

Installation

  • Python >= 3.11
  • API base URL reachable from your environment
pip install -U poelis-sdk

Quick Start

  1. Go to Organization Settings → API Keys
  2. Click "Create API key"
  3. Copy the key (shown only once) and store it securely, for example as an environment variable:
from poelis_sdk import PoelisClient

# Create client
poelis_client = PoelisClient(
    api_key="poelis_live_A1B2C3...",    # Get from Organization Settings → API Keys
)

Browser Usage

The browser lets you navigate your Poelis data with simple dot notation:

# Navigate through your data
poelis = poelis_client.browser

# List workspaces
poelis.list_workspaces().names  # ['workspace1', 'workspace2', ...]

# Access workspace
ws = poelis.workspace1

# List products in workspace  
ws.list_products().names  # ['product1', 'product2', ...]

# Access product
product = ws.product1

# List items in product
product.list_items().names  # ['item1', 'item2', ...]

# Access item and its properties
item = product.item1

# List children by type for more control
item.list_items().names       # ['child_item1', 'child_item2'] - only child items
item.list_properties().names  # ['Color', 'Weight', ...] - only properties

# Access property values directly
item_value = item.some_property.value  # Access property values directly
item_category = item.some_property.category  # Access property categories directly
item_unit = item.some_property.unit  # Access property units directly

Formula properties

For property type formula, property.category and property.unit is always None. The unit is part of the value itself: the value is the computed result of the expression (e.g. "10 kg"), so there is no separate unit field. For invalid formulas, property.value is None.

Property Change Detection

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.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poelis_sdk-1.1.0.tar.gz (142.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poelis_sdk-1.1.0-py3-none-any.whl (66.3 kB view details)

Uploaded Python 3

File details

Details for the file poelis_sdk-1.1.0.tar.gz.

File metadata

  • Download URL: poelis_sdk-1.1.0.tar.gz
  • Upload date:
  • Size: 142.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for poelis_sdk-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ba43939684b143b4f950b62e39b96d2727c3da649271759f1d6d8608a42a3909
MD5 4bd19b6ab6491997753b653dde31356d
BLAKE2b-256 66e02b4936e3b0159b11c7c18505c4a51290389df9c6a5def602c763b2066f60

See more details on using hashes here.

File details

Details for the file poelis_sdk-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: poelis_sdk-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 66.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for poelis_sdk-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3da6b98ddae83e813e00544e8f75f3c056e6eae7ba59291c9a2936df09bc6704
MD5 29d35135fe80ca5f4b4ef0bf4460ea07
BLAKE2b-256 0745ac2b27f79d03b69833c4f0c91d92f54d17252f8c5a87353951f25bf5ac56

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page