Skip to main content

dataceen-client (Python)

Python client for the Dataceen GraphQL + gRPC subscription APIs. Parallel to the C# (DataceenClient/) and TypeScript (DataceenClientTs/) reference clients — feature-parity verified against the same Thomas/CandyShopModel/All fixtures.

Status: 0.0.1 alpha. 88 unit tests green. Not yet on PyPI.

Install

python -m venv .venv
.venv\Scripts\activate            # PowerShell
pip install -e ".[dev]"

Requires Python 3.11+ (typing.NotRequired, generic TypedDict).

Configure

Copy .env.example to .env at the repo root and fill in real Azure AD credentials. The example matches the C# appsettings.json's AllClient section.

Quick start

import asyncio
from dataceen_client import DataceenClient, load_config_from_env
from dataceen_client.runtime import do_find

async def main():
    cfg = load_config_from_env()
    async with DataceenClient(cfg) as client:
        result = await do_find(
            client,
            "Customer",
            size=5,
            filter={"CustomerId": {"like": "cst"}},
            fields={
                "_id": True,
                "CustomerId": True,
                "CustomerPlacedOrder": {"Order": {"OrderId": True}},
            },
            order_by=[{"CustomerId": "Ascending"}],
        )
        for item in result["Items"]:
            print(item)

asyncio.run(main())

After running codegen, replace do_find(client, "Customer", ...) with the typed AllClient(client).Customer.find(...).

Subscriptions

async with DataceenClient(cfg) as client:
    sub = client.create_subscription(
        topics=["Customer"],
        baseload_topics=["Customer"],
        start_mode="POSITION_BEGINNING",
        include_complete=True,
    )

    async def on_customer(evt):
        if evt.event_type == "BASELOAD_EVENT":
            ...  # evt.complete is parsed JSON
        elif evt.event_type == "SUBSCRIPTION_EVENT":
            ...  # live event

    sub.on("Customer", on_customer)
    await client.subscribe(sub)   # blocks until sub.cancel()

Codegen

python -m tools.codegen.src.cli fetch          # cache schema.json
python -m tools.codegen.src.cli emit Customer  # Customer + everything it references
python -m tools.codegen.src.cli emit-all       # whole model

Output → src/dataceen_client/generated/ (gitignored). Per entity you get typed TypedDicts for read/create/filter/fields, a change-tracked Update class, and an <Entity>Client wrapping the runtime helpers; AllClient aggregates the top-level entities.

Codegen runs from a source checkout — it is intentionally not part of the published wheel (only the runtime dataceen_client package is shipped).

Tests

pytest                       # 88 unit tests, ~1.7s
RUN_INTEGRATION=1 pytest     # also run live-backend integration tests (needs .env)

Example app

End-to-end example against the live backend:

python -m examples.candy_shop.find
python -m examples.candy_shop.search_and_aggregate
python -m examples.candy_shop.subscriber
python -m examples.candy_shop.program                    # full read-only orchestrator
RUN_DESTRUCTIVE=1 python -m examples.candy_shop.program  # also create/update/delete

Docs

  • docs/plan.md — phase plan
  • docs/decisions.md — decisions and motivation
  • docs/progress.md — live status
  • docs/dsl-comparison.md — why pure-dict DSL for Python
  • docs/porting-guide.md — Python-specific amendments to the canonical guide
  • docs/release.md — version-bump and publish runbook

License

Proprietary — see LICENSE.

Metadata

Release files for dataceen-client 0.0.9

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

Source distribution (sdist)

Source distribution for dataceen-client 0.0.9
File Size Uploaded Provenance Actions
dataceen_client-0.0.9.tar.gz 92.8 kB Without provenance Details for dataceen_client-0.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dataceen-client 0.0.9
File Interpreter ABI Platform Actions
dataceen_client-0.0.9-py3-none-any.whl Python 3 none any Details for dataceen_client-0.0.9-py3-none-any.whl

Total release size: 138.6 kB

Release files / dataceen_client-0.0.9.tar.gz

Download URL dataceen_client-0.0.9.tar.gz
Size 92.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5a454eebf724a19331dfc3fc9884f8147e8377dc42a509d834f92145a9abfcc2
BLAKE2b-256 checksum
How to use checksums
41e05183637081c9adac16ef94c3b03ce05bd76d3a85f97f1d48e328e7c0f352
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / dataceen_client-0.0.9-py3-none-any.whl

Download URL dataceen_client-0.0.9-py3-none-any.whl
Size 45.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92dded1f5ea40886f9809d1ac2308ff63bb4e474dd23b6edce2e036a1a0aced3
BLAKE2b-256 checksum
How to use checksums
f07fc62139496f4c00c4d119462834afd9e0000fd3ffc5fb96a1197f8711b0e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for dataceen-client 0.0.9

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

0.0.9 This release

2 release files No provenance

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