Registry / devops / devpi-server

devpi-server

JSON →
library6.20.2pypypiunverified

devpi-server is the backend component of the devpi system, providing a robust and flexible solution for hosting private Python package indexes and acting as an on-demand caching mirror for PyPI. It allows users to manage multiple indexes, upload packages and documentation, and configure index inheritance, making it ideal for enterprise environments and local development workflows. The current version is 6.19.3, with a regular release cadence as seen from recent changelog entries.

pip install devpi-server
INSTALL
IMPORT
SIG · DEVPI-SERVER
D
devpi-server
devopspythonv6.20.2
Install
8.3s avg
Import
Disk
77MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.20.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.930 runs
installs and imports cleanly · install 0.0s · import 0.000s · 72.2MB
glibc
py 3.103.930 runs
installs and imports cleanly · install 8.3s · import 0.000s · 72MB
77MB installed
● package 77MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IndexServer
from devpi_server import IndexServer
from devpi_server import IndexServer

This quickstart demonstrates how to programmatically start and stop a `devpi-server` instance using the `devpi-process` library. It sets up a temporary server directory and prints the server's URL. For full user and index management, typically the `devpi-client` command-line tool is used, or a more advanced programmatic interaction with the server's REST API.

import os import shutil from pathlib import Path from devpi_process import Index, IndexServer # Define a temporary directory for the server data server_dir = Path("./devpi_temp_server_data") # Ensure the directory is clean for a fresh start if server_dir.exists(): shutil.rmtree(server_dir) server_dir.mkdir() print(f"Starting devpi-server with data directory: {server_dir}") with IndexServer(server_dir) as server: # The server starts with a 'root' user and a 'root/pypi' index by default. # 'root/pypi' proxies to the public PyPI. print(f"devpi-server running at: {server.url}") # Programmatically create a new user and an index print("Creating user 'myuser' and index 'dev'...") user_name = "myuser" index_name = "dev" # Note: devpi_process handles user/index creation via its API, typically abstracting client commands. # In a real scenario, you might interact via devpi-client or its programmatic equivalent # For simplicity, we'll demonstrate a basic server startup and assume external client interaction. # Example of how you might interact with the server after it's up # (This part would typically use devpi-client commands externally or a more complete devpi_process API) print("You can now interact with the server using devpi-client or pip:") print(f" - Web interface: {server.url}") print(f" - Pip index URL: {server.url}/root/pypi/+simple/") print("Run 'devpi quickstart' in another terminal for client setup examples.") # To keep the server running for a brief moment for demonstration # In a real application, the 'with' block would manage its lifecycle. print("Server will run for 10 seconds. Press Ctrl+C to stop sooner.") import time try: time.sleep(10) except KeyboardInterrupt: print("Stopping server.") print("devpi-server stopped.") if server_dir.exists(): shutil.rmtree(server_dir) print(f"Cleaned up data directory: {server_dir}")
devpi-server --version
Debug
Known issues
deprecatedSeveral command-line options like `--init`, `--gendeploy`, `--export`, `--import`, `--passwd`, `--start`, `--stop`, `--status`, and `--log` for `devpi-server` were deprecated in versions 5.x and later. These functionalities have been replaced by dedicated `devpi-` commands (e.g., `devpi-init`, `devpi-gen-config`, `devpi-export`, `devpi-passwd`, and using process managers like systemd for server control).
fix
Use the dedicated `devpi-` commands for initialization, configuration generation, data management, and password setting. For server lifecycle management, integrate `devpi-server` with a process manager like systemd or Supervisor, running `devpi-server` in the foreground.
affects: 5.0.0+
breakingWhen upgrading `devpi-server` from versions 3.x to 4.0.0, a change in project name normalization required an export/import cycle of your server data. Failure to do so could result in inconsistent project metadata.
fix
Before upgrading to `devpi-server 4.0.0` from 3.x, export your existing data using the older version (`devpi-export`) and then import it into the new `4.0.0` installation (`devpi-import`).
affects: 4.0.0
gotchaBy default, `devpi-server` may bind only to the loopback address (`127.0.0.1` or `localhost`), making it inaccessible from other machines on the network. Attempts to `pip install` or `devpi use` from a remote host will result in 'Connection refused' errors.
fix
Start `devpi-server` with `--host 0.0.0.0` to bind to all available network interfaces. Alternatively, configure a reverse proxy like Nginx to expose `devpi-server` on a specific IP or domain.
affects: All versions
gotchaIncorrect management of the `--serverdir` option or server process lifecycle can lead to perceived data loss or inconsistent server states, especially if the `serverdir` path changes between server starts, or if a new `--init` is run on an existing data directory.
fix
Always use a consistent `--serverdir` path. If managing the server manually, avoid running `devpi-init` on an already initialized directory unless a full reset is intended. For upgrades, refer to specific export/import procedures if data layout changes are involved.
affects: All versions
Upgrade
Version history
6.20.2latest on PyPI · released Jun 11, 2026
Audit
Dependencies
devpi-weboptionalProvides a web-based user interface and search functionality for the devpi-server. Optional but highly recommended for interactive use.
devpi-clientrequiredProvides command-line tools for interacting with devpi-server, including user and index management, package uploading, and testing. Optional but essential for CLI workflows.
Agent activity
32 hits · last 30 days
node
26
Amazon
1
OpenAI (training)
1
Resources
devpi-server — pip install devpi-server · libregistry