pyvespa
Python API for vespa.ai
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 pyvespauv
uv add pyvespapoetry
poetry add pyvespaInstalling 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
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
apache-airflow-providers-vespaIntegrates Apache Airflow with Vespa, enabling…
permissive · top 15,000 on PyPI
tensorflow-serving-apiProvides Python client APIs to communicate with…
permissive · top 5,000 on PyPI
FlashRankFlashRank re-ranks search results using…
permissive · top 15,000 on PyPI
needle-pythonPython client library for the Needle API,…
permissive · top 15,000 on PyPI
trieve-py-clientProvides a Python client library for the Trieve…
unclear · top 15,000 on PyPI
apache-sedonaPython wrapper for Apache Sedona, a cluster…
permissive · top 5,000 on PyPI
pypsaPyPSA is a Python framework for optimizing and…
permissive · top 15,000 on PyPI
pagefindProvides an async Python API to index and…
permissive · top 5,000 on PyPI
python-lsp-ruffIntegrates ruff's linting, formatting, and…
permissive · top 15,000 on PyPI