Skip to main content
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!

Python tools for DBAs with deadlines!

Project Description

A handy Python library for common database admin operations.

Requirements

Features

Basic imports and class constructor usage.

>>> from pydba import PostgresDB
>>> db = PostgresDB()
>>> db.available()
True
>>> db.names()
['postgres']

Database creation and deletion.

>>> db.create('foo')
>>> db.names()
['postgres', 'foo']
>>> db.rename('foo', 'bar')
>>> db.names()
['postgres', 'bar']

Database backup and restore.

>>> db.dump('bar', 'bar.backup')
>>> db.drop('bar')
>>> db.names()
['postgres']
>>> db.restore('bar', 'bar.backup')
>>> db.names()
['postgres', 'bar']

Querying and shutting down database connections.

>>> db.connections('postgres')
[Connection(datname='postgres', pid=13832, state='idle', query='', usename='drkjam', ...)]
>>> db.kill_connections('postgres')
>>> db.connections('postgres')
[]
Release History

Release History

This version
History Node

1.2.1

History Node

1.2.0

History Node

1.1.0

History Node

1.0.0

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
pydba-1.2.1-py2.py3-none-any.whl (9.6 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Nov 30, 2015
pydba-1.2.1.tar.gz (6.8 kB) Copy SHA256 Checksum SHA256 Source Nov 30, 2015
pydba-1.2.1.zip (10.4 kB) Copy SHA256 Checksum SHA256 Source Nov 30, 2015

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