Skip to main content

DODIL Python SDK

Project description

DODIL Python SDK

The DODIL Python SDK lets you interact with DODIL services from Python.

Today the SDK includes:

  • VNG: ingestion / processing service (primarily gRPC, async-first)
  • VBase: vector database service (Milvus-backed).

Installation

Using Poetry:

poetry add dodil

Using pip:

pip install dodil

Quick start

1) Create a client (service account)

Set your credentials as environment variables (recommended):

export DODIL_SERVICE_ACCOUNT_ID="..."
export DODIL_SERVICE_ACCOUNT_SECRET="..."

Then in Python:

from dodil import Client

client = Client(
    service_account_id="...",
    service_account_secret="...",
)
  • Service Account ID and Secret are found in console IAM page.

2) Use VNG

VNG is designed to be async-first.

import asyncio
from dodil import Client

async def main():
    c = Client(
        profile="staging",
        service_account_id="...",
        service_account_secret="...",
    )

    # Create a bound VNG client (gRPC)
    vng = c.vng.connect()
    await vng.close()
    c.close()

What VNG does (typical use cases):

  • Submit ingestion / processing jobs
  • Track job status via polling
  • Fetch outputs and manifests

3) Use VBase

VBase uses a Milvus-compatible endpoint. Your platform might show host + port (address and port) or a full URI; the SDK supports both.

A) Connect using host + port

from dodil import Client, VBaseConfig

c = Client(
    service_account_id="...",
    service_account_secret="...",
)

vbase = c.vbase.connect(
    VBaseConfig(
        host="vbase-db-<id>.dodil.cloud",
        port=443,
        scheme="https",
        db_name="db_12934",
    )
)

print(vbase.list_collections())

vbase.close()
c.close()

What VBase does (typical use cases):

  • Create collections (schemas)
  • Insert / upsert embeddings
  • Search vectors and query metadata
  • Manage indexes

4) Schema definitions (FieldSchema, CollectionSchema, DataType)

If you want to build Milvus-style schemas, you can import definitions from dodil.vbase.

from dodil.vbase import FieldSchema, CollectionSchema, DataType

# Example schema objects (usage depends on your backend / PyMilvus version)
fields = [
    FieldSchema(name="id", dtype=DataType.INT64, is_primary=True, auto_id=False),
    FieldSchema(name="vec", dtype=DataType.FLOAT_VECTOR, dim=768),
]

schema = CollectionSchema(fields=fields, description="example")

Configuration

Profiles

  • profile="staging" (default): uses staging identity + API endpoints.
  • profile="prod": uses production endpoints.

Timeouts

You can pass timeout_s to the root Client and service configs (where supported).

from dodil import Client

c = Client(
    profile="staging",
    service_account_id="...",
    service_account_secret="...",
    timeout_s=60.0,
)

Testing

Install dev dependencies then run tests:

poetry install
pytest

Integration tests

Integration tests hit real external services and are marked with integration.

pytest -m integration -s

You may need to set environment variables for endpoints and credentials depending on your setup.


Contributing

  • Keep public APIs stable (prefer additive changes).
  • Prefer service handles (client.vng, client.vbase) that create bound clients via .connect(...).

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

dodil-0.0.3.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

dodil-0.0.3-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file dodil-0.0.3.tar.gz.

File metadata

  • Download URL: dodil-0.0.3.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.0 CPython/3.14.2 Darwin/25.2.0

File hashes

Hashes for dodil-0.0.3.tar.gz
Algorithm Hash digest
SHA256 13d20d30f120ed3fbe4d2a9ffda7838c0661ad8d74d69d7252b3a64f47d66bd8
MD5 5bb8f6d2ef18e9ffa66d0ce025239b2b
BLAKE2b-256 0267a6f589c0245fc899289e71ab9630b822f7978b41d3ae4f5bb3c33cd27dd5

See more details on using hashes here.

File details

Details for the file dodil-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: dodil-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.0 CPython/3.14.2 Darwin/25.2.0

File hashes

Hashes for dodil-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2d1a404a88b8bf30b0bf4c2811b1b4d23b4cb8d43877f01c636896ca86d44750
MD5 fd17783fad9d3ecfe81006711c1a751d
BLAKE2b-256 fcf5ba61da0387a2e6de5c0319f4ceab199282fd7c1f8635e0e482107b1c2ab8

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