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)

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(
        service_account_id="...",
        service_account_secret="...",
    )
    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
from dodil.vbase import FieldSchema, CollectionSchema, DataType

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

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


# Example schema objects 
schema = CollectionSchema(fields=[
    FieldSchema(name="id", dtype=DataType.INT64, is_primary=True, auto_id=False),
    FieldSchema(name="vec", dtype=DataType.FLOAT_VECTOR, dim=768),
], description="example")

vbase.create_collection(schema=schema)

print(vbase.list_collections())

vbase.close()

What VBase does (typical use cases):

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

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.4.tar.gz (16.1 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.4-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dodil-0.0.4.tar.gz
  • Upload date:
  • Size: 16.1 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.4.tar.gz
Algorithm Hash digest
SHA256 8be1c30e871e0cf85680e1734b2a7e6b25980f5992692ee1723ff7ec45a08aaa
MD5 70d761c5c8a8c4b74c74788dc3958b25
BLAKE2b-256 3f34b62abb04f4a5a7b350c0e8eab8636503d76976f28ce49f77e0373a7381f3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dodil-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 20.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c78d3dfa63d76200785d63fd2054601c65cb85bda82bff4d4336a9774804de82
MD5 4450a32d6da07def7c8ce3b452f00bc6
BLAKE2b-256 ad3d53b73c6d69fc131058eb8f23326db81c6932b13b0b6ea3a4fc55992f6f26

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