Skip to main content

Official Python client for Polydata API

Project description

Polydata Python Client

Official Python client for the Polydata API.

Installation

pip install polydata-client

Quick Start

from polydata import PolydataClient

# Initialize client with your API key
client = PolydataClient(api_key="pd_sk_your_api_key_here")

# Test connection
client.test_connection()

# Get data from a view
df = client.get_data_view(
    hub_schema="my_hub",
    view_name="my_view"
)

Authentication

Get your API key from your Polydata dashboard. You can pass it directly or set it as an environment variable:

export POLYDATA_API_KEY="pd_sk_your_api_key_here"
import os
from polydata import PolydataClient

client = PolydataClient(api_key=os.getenv("POLYDATA_API_KEY"))

Core Features

Get Data

Retrieve data from a view as a pandas DataFrame:

df = client.get_data_view(
    hub_schema="my_hub",
    view_name="my_view"
)

Upload Data

Upload CSV data to create or update tables:

client.upload_data_source(
    file_path="data.csv",
    hub_schema="my_hub",
    table_name="my_table",
    schema_path="schema.json",
    type="create"  # or "replace" or "append"
)

Manage Views

# List all views
views = client.list_data_views(hub_schema="my_hub")

Additional Features

The client also supports:

  • Data apps, pages, components, and widgets
  • Tickers for real-time displays
  • Custom API endpoints
  • Batch uploads for large files

Requirements

  • Python >= 3.8
  • requests >= 2.31.0
  • pandas >= 1.5.0

Links

License

Apache License 2.0

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

polydata_client-0.1.1.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

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

polydata_client-0.1.1-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file polydata_client-0.1.1.tar.gz.

File metadata

  • Download URL: polydata_client-0.1.1.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for polydata_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 575776cba3e651421ed6c2c2c5dbb476df68994e1e33e4cba8ab7321cb56899b
MD5 750a7a5ec2ba98ddd715387039f8ebb7
BLAKE2b-256 6de299d9eb3dab76c72eb260b21c3dec68bdbe014c6c2576a84026ccecda7f1f

See more details on using hashes here.

File details

Details for the file polydata_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for polydata_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9c94a7fda02fb6a14149ed22070be5a8e12203a62a0da00a9a7494dfd0c79f7
MD5 47fa4b0cf56dc59f3a0f1000fd55625f
BLAKE2b-256 2ddcb9af525022778ed8b2230a21ad8ad2b90fc4a766b34fa29cee9b664bbf25

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