Skip to main content

Modern web UI plugin for devpi-server — drop-in replacement for devpi-web

Project description

devpi-admin

A modern web UI plugin for devpi-server — a drop-in replacement for devpi-web. Ships as a Python package that registers itself as a devpi-server plugin via the standard entry point mechanism, so a single pip install devpi-admin is enough.

The UI itself is a bundled single-page application (pure HTML + CSS + vanilla JavaScript, no build step) served under /+admin/. All devpi REST API endpoints remain untouched — the SPA talks to the standard devpi JSON API directly.

Features

  • Dashboard with server info and cache metrics (/+status)
  • Index browser with visual cards color-coded by type (stage / volatile / mirror)
  • Users management — create, edit, delete (admin only)
  • Index management — create / edit / delete, configure bases (drag & drop priority, transitive inheritance detection), volatile, acl_upload (tag picker), mirror_url
  • Package browser with client-side search and pagination, including an explicit download prompt for huge mirrors (e.g. root/pypi's ~780 k packages / 17 MB index)
  • Package detail in a PyPI-like layout: sidebar with metadata, version list, install command, file downloads; main area renders the README (markdown via marked.js)
  • Copy-to-clipboard pip install commands with a pip.conf toggle (short form vs. full --index-url / --trusted-host)
  • pip.conf generator — download a ready-to-use config per index
  • Anonymous browsing — visitors can explore public indexes without logging in; admin actions appear only after authentication
  • Dark / light / auto theme, responsive mobile menu, ESC + outside-click dismissal of dialogs

Installation

pip install devpi-admin

This pulls in devpi-server as a dependency. If you are using devpi in a dedicated venv (recommended), install the plugin into the same venv:

/var/lib/pypi/venv/bin/pip install devpi-admin
systemctl --user restart devpi      # or however you run devpi-server

You should uninstall devpi-web first — devpi-admin provides all the web UI you need:

pip uninstall devpi-web

Usage

After restart, open:

http://<your-devpi-host>:3141/

Browser visits to / are redirected to /+admin/, which serves the SPA. Direct links like http://<host>:3141/+admin/#packages/ci/testing work and can be bookmarked.

devpi CLI tools and other JSON clients are unaffected — they send Accept: application/json and bypass the redirect.

How it works

devpi-admin registers a devpi_server entry point that hooks into devpiserver_pyramid_configure to:

  1. Serve the bundled static assets under /+admin/ via a Pyramid static view.
  2. Add an explicit view at /+admin/ that returns index.html (so the directory itself resolves to the SPA entry point).
  3. Install a tween that redirects HTML browser requests on / to /+admin/ while leaving JSON requests intact.

No changes are made to the devpi REST API.

Requirements

  • Python 3.9+
  • devpi-server 6.0+
  • A browser with ES6 support and Promise, fetch, sessionStorage

Routes (UI)

Routing is hash-based, so any of these URLs can be bookmarked or shared:

  • /+admin/# — Status dashboard (default)
  • /+admin/#indexes — all indexes
  • /+admin/#indexes/<user> — filtered to one user
  • /+admin/#packages/<user>/<index> — packages in an index
  • /+admin/#package/<user>/<index>/<name> — package detail (latest version)
  • /+admin/#package/<user>/<index>/<name>?version=<ver> — specific version
  • /+admin/#users — users admin (requires login)

Project layout

devpi-admin/
├── pyproject.toml
├── README.md
└── src/
    └── devpi_admin/
        ├── __init__.py
        ├── main.py              — Pyramid hooks & tween
        └── static/
            ├── index.html       — SPA entry
            ├── css/style.css
            └── js/
                ├── api.js       — devpi REST wrapper
                ├── theme.js     — theme toggle (light/dark/auto)
                ├── marked.min.js  — vendored markdown renderer
                └── app.js       — routing, views, rendering

Development

git clone <repo>
cd devpi-admin
pip install -e .

The static files live at src/devpi_admin/static/ and can be edited in place — changes show up on the next browser reload, no restart of devpi-server required (static views read from disk on each request).

Run the unit tests:

PYTHONWARNINGS="ignore::UserWarning" python -m unittest discover -v tests/

(The PYTHONWARNINGS shim hides an unrelated deprecation warning emitted by Pyramid 2.1 when it imports pkg_resources.)

Author

Pavel Revak pavelrevak@gmail.com

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devpi_admin-1.0.1.tar.gz (39.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devpi_admin-1.0.1-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file devpi_admin-1.0.1.tar.gz.

File metadata

  • Download URL: devpi_admin-1.0.1.tar.gz
  • Upload date:
  • Size: 39.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for devpi_admin-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b46e9c152ac3bd90e3fe921be847a578136e127b3b5e23c15b4d51e386396e4c
MD5 10f49d56f47a21260575f3771a92f65c
BLAKE2b-256 9d494d7add490da625af0867202ae7adfa19e6749582380181962675795985c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for devpi_admin-1.0.1.tar.gz:

Publisher: publish.yml on pavelrevak/devpi-admin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file devpi_admin-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: devpi_admin-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for devpi_admin-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8acf7d7f7ee7a952bc918c63b011e58aa231e86fd9ee066896d9ed7122cc567b
MD5 76f31a8fb34a56c714e48cc15860e085
BLAKE2b-256 60e06a02e9a632b8e05be51696c2811b2c1d1581fa620e33b2d4b4181b183a15

See more details on using hashes here.

Provenance

The following attestation bundles were made for devpi_admin-1.0.1-py3-none-any.whl:

Publisher: publish.yml on pavelrevak/devpi-admin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page