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.2.1.zip (10.4 kB view details)

Uploaded Source

pydba-1.2.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

pydba-1.2.1-py2.py3-none-any.whl (9.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pydba-1.2.1.zip.

File metadata

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

File hashes

Hashes for pydba-1.2.1.zip
Algorithm Hash digest
SHA256 b91ded1efad5e3fce870594737e02e0ad917af648ada5e1cc5ebe2858a8f19b1
MD5 ba973059b1bcb2ce0ce0461bc0042651
BLAKE2b-256 c40c1e625a0c1954c23bce11a0075697d2cee6c0d073387a92711c95b919a791

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pydba-1.2.1.tar.gz
Algorithm Hash digest
SHA256 ffa666b1d4b743484202f1ee8d239bd3c4121af6498f0c2a5ced933f0b2d1ad1
MD5 1df5bdde8993e6432723e2331e3f7117
BLAKE2b-256 f98ad91ca3c79be152ba13c46f7d241387d7d680938112a8360198b66adb6b87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pydba-1.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4d25911d665599e2230040e43114dfcb870d790d9fc9e993170dfc9e541eb917
MD5 2584a82a3d0fba1d84e68f3c019ba212
BLAKE2b-256 d7c2a2e5a52c3468e5760cf6fa1445743f0a5a5803259e320b447c904913c87f

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