Skip to main content

Python tools for DBAs with deadlines!

Project description

A handy Python library for common database admin operations.

https://img.shields.io/pypi/v/pydba.svg

Requirements

https://img.shields.io/pypi/pyversions/pydba.svg

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')
[]

Download files

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

Source Distributions

pydba-1.1.0.zip (8.0 kB view details)

Uploaded Source

pydba-1.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

pydba-1.1.0-py2.py3-none-any.whl (7.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pydba-1.1.0.zip.

File metadata

  • Download URL: pydba-1.1.0.zip
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pydba-1.1.0.zip
Algorithm Hash digest
SHA256 90a5e0386ba0d78ce9c3eafd7eaf179b4a0faf103f18bdf1d079a77715488180
MD5 1602fef1aa1dbc55c80a650a5d6569ab
BLAKE2b-256 046a56daedb9a250a6953c8e5fa1c18f27af0b8a32de269a1010c9e65505acfa

See more details on using hashes here.

File details

Details for the file pydba-1.1.0.tar.gz.

File metadata

  • Download URL: pydba-1.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pydba-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7e5432f4382e3e651621b88bfbc6b6046302f2592174cb202d3ea8d74cf21e4a
MD5 3078f14069fc39a5e569ec23ffc4a314
BLAKE2b-256 dc9098f76a9f1117531bd76a7f7f5e0fd53042fcceaa62c301450e29d2d8ce0b

See more details on using hashes here.

File details

Details for the file pydba-1.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pydba-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3adf90dd1692ba6dee7771c17c44d5ed2180208502a25a77fd697df490e078c1
MD5 83b237d26ac85123e4f5673e388e28b8
BLAKE2b-256 5a6d7fc9ffe6b4029b86ce8acfd8b6a6c4e334ae260bfc947e9b99c571d1843a

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