Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ds-provider-aic-py-lib

DS package for ds-provider-aic-py-lib

Installation

Install the package using pip:

pip install ds-provider-aic-py-lib

Or using uv (recommended):

uv pip install ds-provider-aic-py-lib

Quick Start

from uuid import uuid4

from ds_protocol_http_py_lib.enums import AuthType

from ds_provider_aic_py_lib.dataset.gold import (
    AICGoldDataset,
    AICGoldDatasetSettings,
    GoldReadSettings,
)
from ds_provider_aic_py_lib.enums import HistoryMode, PublishMode
from ds_provider_aic_py_lib.linked_service.identity import (
    AICIdentityLinkedService,
    AICIdentityLinkedServiceSettings,
    AICIdentityOAuth2AuthSettings,
)

linked_service = AICIdentityLinkedService(
    id=uuid4(),
    name="aic-identity",
    version="v1.0.0",
    settings=AICIdentityLinkedServiceSettings(
        auth_type=AuthType.OAUTH2,
        oauth2=AICIdentityOAuth2AuthSettings(
            client_id="client",
            client_secret="secret",
        ),
    ),
)
dataset = AICGoldDataset(
    id=uuid4(),
    name="employees",
    version="v1.0.0",
    linked_service=linked_service,
    settings=AICGoldDatasetSettings(
        publish_mode=PublishMode.UPSERT,
        primary_key_fields=["employee_id"],
        history_mode=HistoryMode.SCD2,
        partition_keys=[],
        read=GoldReadSettings(sql="SELECT count(*) AS n FROM gold"),
    ),
)
linked_service.connect()
dataset.read()
dataset.output

Features

  • Identity linked service with OAuth2 client credentials and username/password login
  • Read-only gold dataset over the fetch API
  • SQL is required. Name this dataset gold. That name is rewritten to this dataset id. A quoted reference to another dataset is rejected here. Fetch grants decide any other name
  • A resumed read() returns only the pages from the saved offset. The caller keeps earlier pages and the same SQL in settings
  • A result that spans more than one page needs ORDER BY. Without it, later pages can skip or repeat rows, and read() logs a warning
  • read() deserializes each query page with FetchQueryDeserializer

Usage

Gold mutation is not supported. create, update, upsert, delete, purge, and rename raise NotSupportedError.

The repository examples/ scripts read credentials from .env. They are not installed with the package.

Requirements

  • Python 3.11 or higher
  • ds-resource-plugin-py-lib
  • ds-protocol-http-py-lib
  • ds-common-serde-py-lib
  • pandas
  • pyarrow

Optional Dependencies

  • dev: lint, types, tests, docs, and python-dotenv for the examples
  • test: pytest
  • docs: Sphinx

Documentation

Full documentation is available at:

Development

To contribute or set up a development environment:

# Clone the repository
git clone https://github.com/grasp-labs/ds-provider-aic-py-lib.git
cd ds-provider-aic-py-lib

# Install development dependencies
uv sync --all-extras --dev

# Run tests
make test

See the README for more information.

License

This package is licensed under the Apache License 2.0. See the LICENSE-APACHE file for details.

Support

Metadata

Release files for ds-provider-aic-py-lib 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ds-provider-aic-py-lib 0.1.0a1
File Size Uploaded Provenance Actions
ds_provider_aic_py_lib-0.1.0a1.tar.gz 20.3 kB Without provenance Details for ds_provider_aic_py_lib-0.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ds-provider-aic-py-lib 0.1.0a1
File Interpreter ABI Platform Actions
ds_provider_aic_py_lib-0.1.0a1-py3-none-any.whl Python 3 none any Details for ds_provider_aic_py_lib-0.1.0a1-py3-none-any.whl

Total release size: 41.2 kB

Release files / ds_provider_aic_py_lib-0.1.0a1.tar.gz

Download URL ds_provider_aic_py_lib-0.1.0a1.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7ba5d4449fe0dc4bb7ece6c0edb795dd32d6ec083ab00ac3abd57443d1c26e8d
BLAKE2b-256 checksum
How to use checksums
45e0f8ac5e029b39cee9fc970f020564108102f3f33081d5030f056ae076b636
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ds_provider_aic_py_lib-0.1.0a1-py3-none-any.whl

Download URL ds_provider_aic_py_lib-0.1.0a1-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7b4e3d596fdbc94ef36dbfcd5fb9aab064142d93f3802e925055cdfe6e12e43
BLAKE2b-256 checksum
How to use checksums
95152f27449a492e9703ca7a099fcee32a25f69a979fde77558d3b0333512814
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for ds-provider-aic-py-lib 0.1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page