OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

DocArray

DocArray is an open-source Python library for representing, transmitting, storing and retrieving multimodal data in machine-learning applications. It defines schema-based documents and typed collections, with serialization and data exchange features for application and service workflows.

Independent OpenViST project profile, based on linked sources.

DocArray — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use DocArray when a Python machine-learning workflow needs structured multimodal records, collections suited to batch or list processing, or documented data exchange between components.

Who it is for

  • Python developers building machine-learning applications with multimodal records.
  • Teams organizing tensor and other document fields for batch processing or streaming.
  • Developers preparing data for model-serving, microservice or distributed workflows.

Documented uses

  • Define typed records combining fields such as text, image URLs and tensors.
  • Group records in DocVec for stacked tensor batches or DocList for list-like processing.
  • Serialize and deserialize documents using formats including JSON and Protobuf.
  • Transmit data using HTTP or gRPC and connect document data to storage workflows.
Before you choose

Requirements & limits

DocArray is installed as a Python library from the command line. The documented installation action does not indicate an account requirement.

  • DocVec stacks document tensors for batch processing; DocList retains tensors as-is and supports list operations.
  • The documentation describes native support for NumPy, PyTorch, TensorFlow and JAX, as well as compatibility with FastAPI and Jina.
  • Data transmission options described include JSON over HTTP and Protobuf over gRPC.
  • The documentation notes significant changes after version 0.21; the current README is for versions above 0.30.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install DocArray and define a multimodal document collection

Install DocArray, model records with a schema, and collect them in a typed document list.

Before you start

  • Python environment with the required dependencies for the example, including PyTorch and NumPy.
  • A DocArray version compatible with the documented API; the documentation distinguishes versions above 0.30 from versions at or below 0.21.

Steps

  1. Install DocArray from the CLI with the command below.

    Documented command
    pip install -U docarray
  2. Define a document schema by subclassing BaseDoc and declaring fields such as text, image URL, or a shaped tensor.

  3. Create records that follow the schema and collect them in DocList[YourSchema](...).

  4. Access collection fields in bulk, or use the documented append, insert, and delete operations to modify the list.

Expected outcome

A schema-defined collection of multimodal documents that can be accessed and modified as a typed list.

Guide limitations

  • The documented example uses specific tensor and image types; corresponding libraries and valid data are needed for those fields.
  • The documentation states that DocArray versions at or below 0.21 require pip install docarray==0.21 and refer users to the older documentation and codebase.
  • This workflow prepares document data; it does not demonstrate a complete model-training pipeline.
Source-based practical guide

Prepare DocList data for a PyTorch DataLoader

Expose schema-defined DocArray records through the documented PyTorch dataset interface.

Before you start

  • DocArray installed in a Python environment.
  • A document schema and records collected in a DocList.
  • PyTorch available for the DataLoader workflow.

Steps

  1. Define a document type by subclassing BaseDoc and declaring the data fields needed by the dataset.

  2. Create records of that type and collect them in DocList[YourSchema](...).

  3. Use the DocList dataset interface with PyTorch's DataLoader as described in the DocArray documentation.

Expected outcome

DocArray document data is prepared for loading through a PyTorch DataLoader in a model workflow.

Guide limitations

  • The documentation describes dataset use inside a PyTorch DataLoader but does not demonstrate a complete model-training pipeline.
  • The detailed DataLoader setup is not included in the available page content.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
12 October 2026