Jina

raw JSON →
3.34.0 verified Mon Apr 27 auth: no python

Jina is a cloud-native multimodal AI services framework that enables building and deploying scalable AI pipelines with gRPC, Kubernetes, Docker, OpenTelemetry, Prometheus, Jaeger, etc. Current version is 3.34.0. Release cadence is frequent (multiple patch releases per month).

pip install jina
error ModuleNotFoundError: No module named 'jina'
cause Jina not installed or installed in wrong environment.
fix
Run 'pip install jina' in your virtual environment.
error ImportError: cannot import name 'Document' from 'jina'
cause Document class was moved to docarray package.
fix
Install docarray and import from docarray: 'from docarray import Document'.
error AttributeError: module 'jina' has no attribute 'Flow'
cause Old Jina version or incorrect import after API changes.
fix
Upgrade to latest: 'pip install --upgrade jina' and import 'from jina import Flow'.
error ValueError: Unknown executor 'jinahub://DummyEncoder'. Please make sure it is installed.
cause Hub executor not installed.
fix
Install with 'jina hub pull jinahub://DummyEncoder' or use a different executor.
breaking Document class moved from jina to docarray package in v3.x. Import from docarray instead.
fix Use 'from docarray import Document' instead of 'from jina import Document'.
gotcha Executor's @requests decorator must be imported from jina, not from jina.executors.
fix Use 'from jina import requests'.
deprecated Client class is deprecated in favor of Flow.post() or standalone Client().
fix Use Flow.post() or from jina import Client.

Basic Jina Flow example using a Hub executor.

from jina import Flow
from docarray import Document

# Create a simple Flow with an encoder
f = Flow().add(uses='jinahub://DummyEncoder')

with f:
    resp = f.post(
        on='/index',
        inputs=Document(text='hello world'),
        return_results=True
    )
    print(resp[0].text)