Registry / devops / devpi-server

devpi-server

JSON →
library6.19.3pypypiunverified

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.

devopshttp-networkingdatabase
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.

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 footguns
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).
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.
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.
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.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
28 hits · last 30 days
gptbot
4
ahrefsbot
4
amazonbot
3
dotbot
2
bytedance
2
script
1
oai-searchbot
1
Resources