Skip to main content

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

Project description

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 the #devpi IRC channel on freenode.net or the devpi-dev@python.org mailing list.

For support contracts and paid help contact merlinux.eu.

Changelog

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.

0.3.0 (2018-09-08)

Bug Fixes

  • Fixes required for bug fixes devpi-server 4.7.0.

0.2.0 (2018-01-17)

Bug Fixes

  • Use advisory locks to serialize writes.

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-postgresql-2.0.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

devpi_postgresql-2.0.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file devpi-postgresql-2.0.0.tar.gz.

File metadata

  • Download URL: devpi-postgresql-2.0.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: devpi-server/5.3.2.dev0 (py3.7.3; linux)

File hashes

Hashes for devpi-postgresql-2.0.0.tar.gz
Algorithm Hash digest
SHA256 28c1365c6d471bd1fcecc51d2cbaed9aaa08540c5ec2a429df92743b5270b187
MD5 76c900268b24ceafbf4cccd830d843cc
BLAKE2b-256 ef710205f26e773e7e6e7d2bc533b706bd0f4fd68fd3f0ddb203a951295716d8

See more details on using hashes here.

File details

Details for the file devpi_postgresql-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for devpi_postgresql-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec5c5a9c0ceaebbd907d1c47f7183d1f7826fd927ed4e110033bd880f38ffafa
MD5 79335af8dbcfe03074b7b97dfd45beb9
BLAKE2b-256 0bb6cc39689e625d6dfa5f94e372bebce183ec8ba2d41b094176245b922a0e6b

See more details on using hashes here.

Supported by

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