Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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 notifications

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 the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pydba-1.2.1-py2.py3-none-any.whl (9.6 kB) Copy SHA256 hash SHA256 Wheel 2.7 Nov 30, 2015
pydba-1.2.1.tar.gz (6.8 kB) Copy SHA256 hash SHA256 Source None Nov 30, 2015
pydba-1.2.1.zip (10.4 kB) Copy SHA256 hash SHA256 Source None Nov 30, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page