This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Postgres package manager

Project Description

pgpm is a package manager for Postgres database. Its main features include deployment of postgres objects (schemas, tables, functions, etc.), tracking of DDL changes and execution of arbitrary scripts across multiple data sources.

Installation

Prerequisites: Postgres 9.4+, python 2.7/3.4+.

  1. Install psycopg2. This cannot be easily resolved with pip as the library relies on Postgres binaries. The step is not always trivial, though Google will certainly enlighten the path.
  2. Run
$ pip install pgpm
  1. Install pgpm in every postgres database you’ll be using with pgpm (must be a superuser). E.g.:
$ pgpm install "postgresql://postgres:postgres@localhost:5432/testdb"

Note: connection string must conform libpg format.

Main concepts

Package

In pgpm a package is a set of files in a directory with valid config.json (see below) file. When package is being deployed, pgpm reads the configuration and executes sql scripts from files specified in the package configuration. Note: config.json file must be present in a root directory of the package in order to use deployment feature of pgpm

Config

pgpm uses config.json file for a configuration of a package. Configuration file must be a single valid JSON object with the following properties:

Property name Required/Optional Value Description
name required string Name of the package (for details see section ‘Name of the package’)
description optional string Description of the package
subclass required string, accepts values: basic and versioned Type of the package when deployed as a DB schema. For details see section ‘Versioned or not versioned schema’
scope required string, accepts values: SCHEMA and DATABASE, defaults to SCHEMA Whether the the deployment should be bound to a specific schema or be for the whole DB. For details see section ‘Scope of package’.
version required string, accepts values with the following format: [0..9][0..9]_[0..9][0..9]_[0..9][0..9] Version of the package. For details see section ‘Versioned or not versioned schema’.
functions_path optional string A relative path (relative to the root directory of the package) to the folder with source code for stored procedures For details see section ‘Object types’.
tables_path optional string A relative path (relative to the root directory of the package) to the folder with sql scripts that change table definitions For details see section ‘Object types’.
types_path optional string A relative path (relative to the root directory of the package) to the folder with source code for types definitions For details see section ‘Object types’.
triggers_path optional string A relative path (relative to the root directory of the package) to the folder with source code for triggers (not trigger functions, they go to functions_path) For details see section ‘Object types’.

Name of the package

TODO

Test info

Versioned or not versioned schema

TODO

Scope of package

TODO

Object types

TODO

General config

TODO

Main features

Package deployment

TODO

DDL change logging

TODO

pgpm schema

TODO

TODOs

  • Provide support for DDL evolutions and dependency management.
Release History

Release History

This version
History Node

0.1.62

History Node

0.1.61

History Node

0.1.60

History Node

0.1.59

History Node

0.1.58

History Node

0.1.57

History Node

0.1.56

History Node

0.1.55

History Node

0.1.54

History Node

0.1.53

History Node

0.1.52

History Node

0.1.51

History Node

0.1.50

History Node

0.1.48

History Node

0.1.46

History Node

0.1.44

History Node

0.1.42

History Node

0.1.41

History Node

0.1.39

History Node

0.1.38

History Node

0.1.35

History Node

0.1.34

History Node

0.1.33

History Node

0.1.32

History Node

0.1.31

History Node

0.1.29

History Node

0.1.28

History Node

0.1.27

History Node

0.1.22

History Node

0.1.20

History Node

0.1.15

History Node

0.1.14

History Node

0.1.13

History Node

0.1.12

History Node

0.1.11

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.0.11

History Node

0.0.10

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5b14

History Node

0.0.5b13

History Node

0.0.5b12

History Node

0.0.5b11

History Node

0.0.5b9

History Node

0.0.5b8

History Node

0.0.5b6

History Node

0.0.5b5

History Node

0.0.5b4

History Node

0.0.5b2

History Node

0.0.4b2

History Node

0.0.4b1

History Node

0.0.4a10

History Node

0.0.4a9

History Node

0.0.3-a8

History Node

0.0.3-a2

History Node

0.0.3-a1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pgpm-0.1.62-py2.py3-none-any.whl (50.5 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Feb 24, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting