How vespa-engine/pyvespa works
pyvespa is a Python API for creating and modifying Vespa applications, deploying them, interacting with running instances, and evaluating retrieval behavior. The principal workflow is to define an application package, deploy it, then query or feed documents through the application API; evaluation and MTEB benchmarking are additional branches. The repository also includes a Python wrapper for the Vespa CLI. Relationships are limited to those shown in the README or source index; unsampled implementation details are not inferred.
Main entry points: application.py Application API · package.py Application package · _mteb.py MTEB benchmarking · deployment.py Deployment API
Components 19
Application authoring
- Application package
vespa/package.py - XML configuration
vespa/configuration/vt.py - Services config
vespa/configuration/services.py - Deployment config
vespa/configuration/deployment.py - Query profiles
vespa/configuration/query_profiles.py - Query builder
vespa/querybuilder/builder/builder.py - Grouping expressions
vespa/querybuilder/grouping/grouping.py
Serving interactions
- Application API
vespa/application.py - API responses
vespa/io.py - Retry policies
vespa/retries.py - Request throttling
vespa/throttling.py
Deployment and operations
- Deployment API
vespa/deployment.py - Vespa CLI wrapper
vespacli/vespacli/__init__.py - CLI binaries
vespacli/utils/download_binaries.py
Evaluation
- Retrieval evaluation
vespa/evaluation/_base.py - MTEB benchmarking
vespa/evaluation/_mteb.py - Model utilities
vespa/models.py
Other components
- Developer
- Vespa service
Connections 26
- Developer → Application package: defines app
README.md - Developer → Deployment API: deploys app
README.md - Developer → Application API: interacts with
README.md - Application package → XML configuration: uses config
vespa/package.py - Application package → Services config: uses config
vespa/package.py - Application package → Deployment config: uses config
vespa/package.py - Application package → Query profiles: uses profiles
vespa/package.py - Services config → XML configuration: builds tags
vespa/configuration/services.py - Deployment config → XML configuration: builds tags
vespa/configuration/deployment.py - Query profiles → XML configuration: builds tags
vespa/configuration/query_profiles.py - Developer → Query builder: builds queries
README.md - Developer → Grouping expressions: builds expressions
README.md - Application API → Vespa service: sends requests
vespa/application.py - Application API → API responses: creates responses
vespa/application.py - Application API → Retry policies: uses retries
vespa/application.py - Application API → Request throttling: uses throttling
vespa/application.py - Deployment API → Application package: deploys package
vespa/deployment.py - Deployment API → Vespa service: deploys to
vespa/deployment.py - Developer → Vespa CLI wrapper: uses wrapper
README.md - Vespa CLI wrapper → CLI binaries: downloads binaries
- Developer → Retrieval evaluation: evaluates retrieval
README.md - Retrieval evaluation → Application API: queries app
vespa/evaluation/_base.py - Developer → MTEB benchmarking: runs benchmarks
README.md - MTEB benchmarking → Application API: uses app
vespa/evaluation/_mteb.py - MTEB benchmarking → Deployment API: deploys benchmark app
vespa/evaluation/_mteb.py - MTEB benchmarking → Model utilities: uses models
vespa/evaluation/_mteb.py