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.0.tar.gz (13.7 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.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: polydata_client-0.1.0.tar.gz
  • Upload date:
  • Size: 13.7 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.0.tar.gz
Algorithm Hash digest
SHA256 89b2a96a5fb9b2cb7a37a7abb13f82e6afe5c1222725827602a50a12f78b1975
MD5 5a09b63f81f21e9fbd6c0b455ce128a2
BLAKE2b-256 b2a31670866d3c36b28094fd4d9a55783d48de12e988ba1f9de49f8eaa840b16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polydata_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4fbde35f7bdecc9603963dc888a5e1fbc63a62c772424ff40b8f012a22cd4bfd
MD5 95219b18bc4d1e67c1dad751df01d0b8
BLAKE2b-256 3a80232b656ac8f6cb044586864502082128383495d1dcaca439c7b61cbe8a14

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