Skip to main content

devpi-postgresql: a PostgreSQL storage backend for devpi-server

This plugin adds a PostgreSQL storage backend for devpi-server.

Installation

devpi-postgresql needs to be installed alongside devpi-server.

You can install it with:

pip install devpi-postgresql

Requirements

At least PostgreSQL 9.5 is required for ON CONFLICT support.

Usage

When using the PostgreSQL storage, devpi-server expects an empty database. You have to create one like this: createdb devpi Depending on your PostgreSQL setup you have to create a user and grant it permissions on the new database like this:

CREATE ROLE devpi WITH LOGIN;
GRANT CREATE, CONNECT ON DATABASE devpi TO devpi;

Upon first initialization of devpi-server use --storage pg8000 to select the PostgreSQL backend.

By default it’ll use the devpi database on localhost port 5432. To change that, use storage pg8000:host=example.com,port=5433,database=devpi_prod. The possible settings are: database, host, port, unix_sock, user, password, ssl_check_hostname, ssl_ca_certs, ssl_certfile and ssl_keyfile.

If any of the “ssl” settings is specified, a secure Postgres connection will be made. Typically, the name of a file containing a certificate authority certificate will need to be specified via ssl_ca_certs. By default, the server’s hostname will be checked against the certificate it presents. Optionally disable this behavior with the ssl_check_hostname setting. Use ssl_certfile and ssl_keyfile to enable certificate-based client authentication.

All user/index files and metadata of devpi-server are stored in the database. A few things and settings are still stored as files in the directory specified by --serverdir.

Plugins like devpi-web don’t or can’t use the storage backend. They still handle their own storage.

Support

If you find a bug, use the issue tracker at Github.

For general questions use GitHub Discussions or the devpi-dev@python.org mailing list.

For support contracts and paid help contact mail at pyfidelity.com.

Changelog

3.0.1 (2022-04-25)

Bug Fixes

  • Fix #884: Error during startup of devpi-server.

3.0.0 (2022-03-18)

Deprecations and Removals

  • Require at least devpi-server 6.2.0.

Features

  • Support performance and memory optimizations enabled by devpi-server >= 6.2.0.

  • Support new storage interface from devpi-server 6.5.0 to keep files out of memory.

  • Files are stored in a temporary location and committed to the database in one shorter transaction block. This also reduces the time locks are held on the database.

  • Support memory optimizations enabled by devpi-server 6.5.0 to keep cache small.

  • Switch to native interface introduced in pg8000 1.17.0.

  • Stream files directly through database connection using COPY.

Bug Fixes

  • Reduce chances of conflicts by using a postgresql sequence for serials. This can cause serials with no changes due to gaps in the sequence in case of conflicts, but these are harmless.

2.0.0 (2020-04-14)

Deprecations and Removals

  • Python 3.4 isn’t supported anymore, Python 3.5 support will be dropped at its EOL in September 2020.

Features

  • Upgrade pg8000 to version 1.14.0 or newer and take advantage of its improved SSL interface.

1.1.0 (2020-01-31)

Features

  • fix #738: add ssl_cert_reqs, ssl_ca_certs, ssl_certfile and ssl_keyfile settings to the –storage=pg8000 option. Each setting corresponds to the similarly-named key (remove the initial ssl_) in the ssl parameter passed to pg8000.connect(). ssl_cert_reqs should be either “cert_optional” or “cert_required” and the other three settings are file names.

1.0.0 (2019-04-26)

Deprecations and Removals

  • Requires at least PostgreSQL 9.5 for ON CONFLICT support.

  • Dropped support for Python 2.x and PyPy2.

Metadata

Release files for devpi-postgresql 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for devpi-postgresql 3.0.1
File Size Uploaded Provenance Actions
devpi-postgresql-3.0.1.tar.gz 16.1 kB Without provenance Details for devpi-postgresql-3.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for devpi-postgresql 3.0.1
File Interpreter ABI Platform Actions
devpi_postgresql-3.0.1-py3-none-any.whl Python 3 none any Details for devpi_postgresql-3.0.1-py3-none-any.whl

Total release size: 29.0 kB

Release files / devpi-postgresql-3.0.1.tar.gz

Download URL devpi-postgresql-3.0.1.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
06ca1452400e46edacb45f7abd8ae75790c9665211ab2bc7935ba3bd2eb87044
BLAKE2b-256 checksum
How to use checksums
9dbe2f17b48d0b18b1be48e9ce699afaa6d3b8bdfe2db7c664905edac2a11cc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via devpi-server/6.5.0.dev7 (py3.8.11; linux)

Release files / devpi_postgresql-3.0.1-py3-none-any.whl

Download URL devpi_postgresql-3.0.1-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02b31bff3254c3e652ff537c14f745016cedd2a0bd606fa8ef802bbf41845741
BLAKE2b-256 checksum
How to use checksums
6f20f77442f5393e74cc5b0f03cadfdc20b5f35dafb34fede9b95fe96bf45227
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via devpi-server/6.5.0.dev7 (py3.8.11; linux)

Security for devpi-postgresql 3.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page