Skip to content

Vespa python API

Vespa is the scalable open-sourced serving engine to store, compute and rank big data at user serving time. pyvespa provides a python API to Vespa.

We aim for complete feature parity with Vespa, and estimate that we cover > 95% of Vespa features, with all most commonly used features supported.

If you find a Vespa feature that you are not able to express/use with pyvespa, please open an issue.

Quick start

To get a sense of the most basic functionality, check out the Hybrid Search Quick start:

Overview of pyvespa features

Info

There are two main interfaces to Vespa:

  1. Control-plane API: Used to deploy and manage Vespa applications.
    • VespaCloud: Control-plane interface to Vespa Cloud.
    • VespaDocker: Control-plane iterface to local Vespa instance (docker/podman).
  2. Data-plane API: Used to feed and query data in Vespa applications.

Note that VespaCloud and Vespa require two separate authentication methods.

Refer to the Authenticating to Vespa Cloud for details.

Requirements

Install pyvespa:

We recommend using uv to manage your python environments:

uv add pyvespa

or using pip:

pip install pyvespa

Check out the examples

Check out our wide variety of Examples that demonstrate how to use the Vespa Python API to serve various use cases.