skillfed

pyvespa

Python API for vespa.ai

pyvespa v1.2.4 17.4M downloads/30d#1,119 on PyPI172
Permissive license Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) Active released

What it is and what it does

pyvespa is a Python wrapper around Vespa, an open-source serving engine designed for large-scale search, ranking, and data computation at query time. It abstracts Vespa's deployment and interaction model into a Python API, allowing developers to programmatically create application schemas, deploy configurations, and execute queries without direct command-line or REST interaction.

The library is built for prototyping and experimentation with Vespa features. It depends on standard HTTP clients (requests, httpx), templating (jinja2), and utility libraries (tenacity for retries, cryptography for secure communication) to manage the full lifecycle of a Vespa application—from schema definition through deployment to live query execution. The package also wraps the Vespa CLI for command-line operations.

Use it for:

  • Prototype a search application with custom ranking models before deploying to production
  • Automate Vespa cluster deployment and configuration management in data science workflows
  • Build integration tests for search and ranking logic by programmatically creating and querying instances
  • Experiment with different schema designs and ranking functions iteratively in notebooks
  • Deploy Vespa applications as part of a larger Python data pipeline or ML workflow

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

pyvespa provides a Python API to create, deploy, and interact with Vespa instances, enabling programmatic control over a scalable serving engine for storing, computing, and ranking data at query time.

Yes, if you are working with Vespa or evaluating it for search and ranking use cases. The package is actively maintained, has low install friction, carries a permissive Apache 2.0 license, and no known vulnerabilities. It is well-positioned for prototyping and integration into Python-based data science and search workflows. Install it if Vespa is already part of your architecture or you are exploring it.

Install

pyvespa on PyPI

pip

pip install pyvespa

uv

uv add pyvespa

poetry

poetry add pyvespa

Installing pyvespa

Before you install

Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release 42 days ago and an active repository. It carries 13 runtime dependencies including standard ecosystem libraries.

License in practice

Licensed under Apache 2.0, a permissive open-source license that allows commercial use, modification, and distribution with minimal restrictions. You may use and modify the code freely provided you include the license and attribution notices.

Quickstart

pip install pyvespa

import pyvespa
from pyvespa import Vespa

app = Vespa(url="http://localhost")
results = app.query(yql="select * from doc where true")

Requires a running Vespa instance accessible at the specified URL; Python 3.10 or later (requires_python >=3.10,<3.14).

Verify before relying

  • Whether docker dependency is a runtime requirement or only for local development
  • Specific Vespa server version compatibility constraints
  • Exact URL format and port requirements for connecting to Vespa instances

Package facts

License Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive)
Python support supports the current Python release (<3.14,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 13 — httpr, docker, jinja2, cryptography, tenacity, typing_extensions, python-dateutil, fastcore, lxml, certifi, requests, requests_toolbelt, httpx
Maintenance actively maintained — 42 days since the last release
Last repo commit
First released
Downloads 17,444,074/month — #1,119 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyvespa-1.2.4-py3-none-any.whl

Keywords: vespa, search engine, data science

License :: OSI Approved :: Apache Software License

Tags

vespa python apisearch engine deploymentranking and retrievaldata serving platformvespa cli wrapperprototype search applicationslarge-scale search indexing
search-engineranking-retrievaldistributed-computing

More Front-Ends packages